Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apply dirty rect updates consistently. #2856

Merged
merged 3 commits into from Jul 5, 2018

Commits on Jul 5, 2018

  1. Apply dirty rect updates consistently.

    This patch moves the dirty rect storage from ImageResource to
    CachedImageInfo. This is because cache entries may be updated
    independently across frame updates, and thus cannot share the dirty rect
    state.
    
    We no longer clear the dirty rect when we get an update without a dirty
    rect. This is because we can get a subsequent update (before applying
    the previous) which provides a new dirty rect, and we still want to
    reupload the whole image. Instead we now store a dirty rect for the
    whole descriptor.
    
    In addition to special handling for tiled requests, we also properly
    handle requests which change the ImageRendering type. Before we would
    take the dirty rect for the first request and ignore it for the rest.
    aosmond committed Jul 5, 2018
  2. Refactor image cache to avoid scanning the whole cache when updating …

    …tiled images.
    
    ImageCache is now represented as an enum with three types:
    - Err, as before.
    
    - UntiledAuto, the fast path for untiled images using ImageRendering::Auto,
    which contains a CachedImageInfo.
    
    - Multi, the slower path used for tiled images or images that use other
    ImageRendering types, which stores a hash map containing CachedImageInfo
    objects for all of the variants/subsections of the image.
    aosmond committed Jul 5, 2018
  3. Remove epoch from ImageResource as unused.

    aosmond committed Jul 5, 2018
You can’t perform that action at this time.