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

Sync changes from mozilla-central gfx/wr #3852

Merged
merged 1 commit into from Feb 7, 2020
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Bug 1613316 - Fix panic in TileCache::pre_update. r=Bert

  • Loading branch information
gw3583 authored and moz-gfx committed Feb 7, 2020
commit 7bb678bd3aee8666539a00b3f964c50a4921d0ca
@@ -826,7 +826,19 @@ impl Tile {
ctx: &TilePreUpdateContext,
) {
self.local_tile_rect = local_tile_rect;
self.local_valid_rect = local_tile_rect.intersection(&ctx.local_rect).unwrap();
// TODO(gw): In theory, the local tile rect should always have an
// intersection with the overall picture rect. In practice,
// due to some accuracy issues with how fract_offset (and
// fp accuracy) are used in the calling method, this isn't
// always true. In this case, it's safe to set the local
// valid rect to zero, which means it will be clipped out
// and not affect the scene. In future, we should fix the
// accuracy issue above, so that this assumption holds, but
// it shouldn't have any noticeable effect on performance
// or memory usage (textures should never get allocated).
self.local_valid_rect = local_tile_rect
.intersection(&ctx.local_rect)
.unwrap_or_else(PictureRect::zero);
self.invalidation_reason = None;

self.world_tile_rect = ctx.pic_to_world_mapper
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.