mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-25 20:01:50 +00:00
Bug 1570081 - Put the blob dirty rect in the same space as the drawing commands and visible rect. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D43223 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
dfe0f0cf10
commit
b80a2c908a
@ -715,14 +715,11 @@ struct DIGroup {
|
||||
|
||||
// Convert mInvalidRect to image space by subtracting the corner of the
|
||||
// image bounds
|
||||
auto dirtyRect = ViewAs<ImagePixel>(
|
||||
mInvalidRect - mVisibleRect.ToUnknownRect().TopLeft());
|
||||
auto dirtyRect = ViewAs<ImagePixel>(mInvalidRect);
|
||||
|
||||
auto bottomRight = dirtyRect.BottomRight();
|
||||
GP("check invalid %d %d - %d %d\n", bottomRight.x, bottomRight.y,
|
||||
dtSize.width, dtSize.height);
|
||||
MOZ_RELEASE_ASSERT(bottomRight.x <= dtSize.width &&
|
||||
bottomRight.y <= dtSize.height);
|
||||
GP("Update Blob %d %d %d %d\n", mInvalidRect.x, mInvalidRect.y,
|
||||
mInvalidRect.width, mInvalidRect.height);
|
||||
if (!aResources.UpdateBlobImage(
|
||||
|
@ -380,7 +380,7 @@ impl<'a> CachedReader<'a> {
|
||||
/// the first not-yet-copied item with those bounds in the old list and copy that.
|
||||
/// Any items found in the old list but not the new one can be safely assumed to
|
||||
/// have been deleted.
|
||||
fn merge_blob_images(old_buf: &[u8], new_buf: &[u8], mut dirty_rect: Box2d) -> Vec<u8> {
|
||||
fn merge_blob_images(old_buf: &[u8], new_buf: &[u8], dirty_rect: Box2d) -> Vec<u8> {
|
||||
|
||||
let mut result = BlobWriter::new();
|
||||
dlog!("dirty rect: {:?}", dirty_rect);
|
||||
@ -395,11 +395,6 @@ fn merge_blob_images(old_buf: &[u8], new_buf: &[u8], mut dirty_rect: Box2d) -> V
|
||||
// we currently only support merging blobs that have the same origin
|
||||
assert_eq!(old_reader.reader.origin, new_reader.origin);
|
||||
|
||||
dirty_rect.x1 += new_reader.origin.x;
|
||||
dirty_rect.y1 += new_reader.origin.y;
|
||||
dirty_rect.x2 += new_reader.origin.x;
|
||||
dirty_rect.y2 += new_reader.origin.y;
|
||||
|
||||
// Loop over both new and old entries merging them.
|
||||
// Both new and old must have the same number of entries that
|
||||
// overlap but are not contained by the dirty rect, and they
|
||||
|
Loading…
x
Reference in New Issue
Block a user