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

Introduce the DirtyRect type #3277

Merged
merged 6 commits into from Nov 23, 2018
Merged

Introduce the DirtyRect type #3277

merged 6 commits into from Nov 23, 2018

Commits on Nov 23, 2018

  1. Store tile dirty rects in tile space.

    Before this PR each tile stores its own dirty rect relative to the entire image. This is somewhat confusing because this field is used to track partial uploads correctly and uploads reason about dirty rects relative to the tiles so it has to do some conversions. Storing relative to the tile is also truer to the "device space" the rects are tagged with.
    Last but not least the image-relative coordinates will make even less sense for tiled blob images as we start trating them as virtually infinite planes.
    nical committed Nov 23, 2018
  2. Introduce the DirtyRect type.

    Previously dirty rects were set up in a subtle way where early in the
    pipeline None is used to mean "no information" and therefore "all clean",
    but then later on is used to mean "all dirty" on the assumption that if
    a texture is still being handled, some dirty information must have been
    sent. None is therefore used by the internals as a way to signal
    things like missing cache entries without actually bothering to look up
    the dimensions of the image (note that "clean" can always be expressed
    without knowing dimensions, as it is always the same empty rect).
    
    I change the system to just consistently use a custom enum that has
    AllDirty and SomeDirty(empty_rect) to represent these two states. As
    a result the code seems much easier to understand.
    nical committed Nov 23, 2018
  3. Separate blob creation/update/deletion APIs from other types of images.

    Blobs will need some extra APIs that don't apply to regular images.
    This change will make it easier to add these extra functionalities
    without messing with the rest of the code.
    The new BlobImageKey type also adds a tiny bit of type safety to
    prevent some mixing blob and non blob data on the same image which
    is invalid.
    nical committed Nov 23, 2018
  4. Use separate enum to describe image storage in the API and the resour…

    …ce cache.
    nical committed Nov 23, 2018
You can’t perform that action at this time.