Bug 1450346. Properly initialize mAppUnitsPerDevPixel. r=mstange
authorJeff Muizelaar <jmuizelaar@mozilla.com>
Fri, 30 Mar 2018 16:24:13 -0400
changeset 467404 62428c85a2780e2c632fdc9d4340f1626357c3c5
parent 467403 317c00f07c399fbe97abcea33029bc416e064347
child 467405 24f434072ecd13a2c11742245d019aa242ce1345
push id1728
push userjlund@mozilla.com
push dateMon, 18 Jun 2018 21:12:27 +0000
treeherdermozilla-release@c296fde26f5f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmstange
bugs1450346
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 1450346. Properly initialize mAppUnitsPerDevPixel. r=mstange
gfx/layers/wr/WebRenderCommandBuilder.cpp
--- 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();