Bug 1450403. blob-invalidation: hookup paint flashing. r=mstange
--- a/gfx/layers/wr/WebRenderCommandBuilder.cpp
+++ b/gfx/layers/wr/WebRenderCommandBuilder.cpp
@@ -579,22 +579,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);