Bug 1450346. Properly initialize mAppUnitsPerDevPixel. r=mstange
--- a/gfx/layers/wr/WebRenderCommandBuilder.cpp
+++ b/gfx/layers/wr/WebRenderCommandBuilder.cpp
@@ -284,16 +284,18 @@ struct DIGroup
nsPoint mLastAnimatedGeometryRootOrigin;
IntRect mInvalidRect;
nsRect mGroupBounds;
int32_t mAppUnitsPerDevPixel;
gfx::Size mScale;
IntPoint mGroupOffset;
Maybe<wr::ImageKey> mKey;
+ DIGroup() : mAppUnitsPerDevPixel(0) {}
+
void InvalidateRect(const IntRect& aRect)
{
// Empty rects get dropped
mInvalidRect = mInvalidRect.Union(aRect);
}
IntRect ItemBounds(nsDisplayItem* aItem)
{
@@ -1042,17 +1044,17 @@ WebRenderCommandBuilder::DoGroupingForDi
auto q = groupBounds;
gfx::Size scale = aSc.GetInheritedScale();
GP("Inherrited scale %f %f\n", scale.width, scale.height);
GP("Bounds: %d %d %d %d vs %d %d %d %d\n", p.x, p.y, p.width, p.height, q.x, q.y, q.width, q.height);
if (!group.mGroupBounds.IsEqualEdges(groupBounds) ||
group.mAppUnitsPerDevPixel != appUnitsPerDevPixel ||
group.mScale != scale) {
if (group.mAppUnitsPerDevPixel != appUnitsPerDevPixel) {
- printf("app unit %d %d\n", group.mAppUnitsPerDevPixel, appUnitsPerDevPixel);
+ GP("app unit %d %d\n", group.mAppUnitsPerDevPixel, appUnitsPerDevPixel);
}
// The bounds have changed so we need to discard the old image and add all
// the commands again.
auto p = group.mGroupBounds;
auto q = groupBounds;
GP("Bounds change: %d %d %d %d vs %d %d %d %d\n", p.x, p.y, p.width, p.height, q.x, q.y, q.width, q.height);
group.ClearItems();