Bug 1450403. blob-invalidation: hookup paint flashing. r=mstange
authorJeff Muizelaar <jmuizelaar@mozilla.com>
Fri, 30 Mar 2018 22:01:10 -0400
changeset 411617 a260d56ab3a331cfa82364ef2ccf767cdd4b9454
parent 411616 da0a77f37d802efd0f4f9321cc6ba3eefaccc17c
child 411618 9d5db4dacc58fe526ac7d4eb8cb757babad363bd
push id101712
push userebalazs@mozilla.com
push dateWed, 04 Apr 2018 09:52:15 +0000
treeherdermozilla-inbound@dd31fb345c11 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmstange
bugs1450403
milestone61.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1450403. blob-invalidation: hookup paint flashing. r=mstange
gfx/layers/wr/WebRenderCommandBuilder.cpp
--- a/gfx/layers/wr/WebRenderCommandBuilder.cpp
+++ b/gfx/layers/wr/WebRenderCommandBuilder.cpp
@@ -581,22 +581,23 @@ struct DIGroup
         aWrManager->AddImageKeyForDiscard(mKey.value());
         mKey = Nothing();
       }
       return;
     }
 
     PaintItemRange(aGrouper, aStartItem, aEndItem, context, recorder);
 
-    if (!mKey) {
-#if 0
+    if (aStartItem->Frame()->PresContext()->GetPaintFlashing()) {
       context->SetMatrix(Matrix());
-      dt->FillRect(gfx::Rect(0, 0, size.width, size.height), gfx::ColorPattern(gfx::Color(0., 1., 0., 0.5)));
+      float r = float(rand()) / RAND_MAX;
+      float g = float(rand()) / RAND_MAX;
+      float b = float(rand()) / RAND_MAX;
+      dt->FillRect(gfx::Rect(0, 0, size.width, size.height), gfx::ColorPattern(gfx::Color(r, g, b, 0.5)));
       dt->FlushItem(IntRect(IntPoint(0, 0), size));
-#endif
     }
 
     // XXX: set this correctly perhaps using aItem->GetOpaqueRegion(aDisplayListBuilder, &snapped).Contains(paintBounds);?
     bool isOpaque = false;
 
     bool hasItems = recorder->Finish();
     GP("%d Finish\n", hasItems);
     Range<uint8_t> bytes((uint8_t*)recorder->mOutputStream.mData, recorder->mOutputStream.mLength);