зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1570081 - Don't insert blob images with empty visible rects. r=jrmuizel
Depends on D41389 Differential Revision: https://phabricator.services.mozilla.com/D43222 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
af26140db1
Коммит
563b86112a
|
@ -340,6 +340,8 @@ bool IpcResourceUpdateQueue::UpdateBlobImage(BlobImageKey aKey,
|
|||
Range<uint8_t> aBytes,
|
||||
ImageIntRect aVisibleRect,
|
||||
ImageIntRect aDirtyRect) {
|
||||
MOZ_ASSERT(aVisibleRect.width > 0 && aVisibleRect.height > 0);
|
||||
|
||||
auto bytes = mWriter.Write(aBytes);
|
||||
if (!bytes.length()) {
|
||||
return false;
|
||||
|
|
|
@ -587,6 +587,10 @@ struct DIGroup {
|
|||
GP("\n\n");
|
||||
GP("Begin EndGroup\n");
|
||||
|
||||
if (mVisibleRect.IsEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Invalidate any unused items
|
||||
GP("mDisplayItems\n");
|
||||
for (auto iter = mDisplayItems.Iter(); !iter.Done(); iter.Next()) {
|
||||
|
@ -688,9 +692,12 @@ struct DIGroup {
|
|||
Range<uint8_t> bytes((uint8_t*)recorder->mOutputStream.mData,
|
||||
recorder->mOutputStream.mLength);
|
||||
if (!mKey) {
|
||||
if (!hasItems) // we don't want to send a new image that doesn't have any
|
||||
// items in it
|
||||
// we don't want to send a new image that doesn't have any
|
||||
// items in it
|
||||
if (!hasItems || mVisibleRect.IsEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
wr::BlobImageKey key =
|
||||
wr::BlobImageKey{aWrManager->WrBridge()->GetNextImageKey()};
|
||||
GP("No previous key making new one %d\n", key._0.mHandle);
|
||||
|
|
Загрузка…
Ссылка в новой задаче