Bug 1216924 - Don't align to tiles (either real or virtual) if displayport suppression is enabled. r=BenWa
☠☠ backed out by 29f0eadfe982 ☠ ☠
authorKartikaya Gupta <kgupta@mozilla.com>
Fri, 11 Mar 2016 12:01:28 -0500
changeset 339581 21884d000eded02b02e4c221ba9f80ac03fe53f6
parent 339580 50c03319c341910196103c4451f17299eb144313
child 339582 622e8779744631d6a6a8e445ee4325717b392f6b
push id12762
push userbmo:rail@mozilla.com
push dateFri, 11 Mar 2016 19:47:45 +0000
reviewersBenWa
bugs1216924
milestone48.0a1
Bug 1216924 - Don't align to tiles (either real or virtual) if displayport suppression is enabled. r=BenWa MozReview-Commit-ID: 15XWTTM0tZI
layout/base/nsLayoutUtils.cpp
--- a/layout/base/nsLayoutUtils.cpp
+++ b/layout/base/nsLayoutUtils.cpp
@@ -943,17 +943,19 @@ GetDisplayPortFromMarginsData(nsIContent
   //   render (it chooses that in FrameLayerBuilder, but this can be called
   //   during display list building). Therefore, we perform the alignment in
   //   Screen space, which basically assumes that Layout chose to render at
   //   screen resolution; since this is what Layout does most of the time,
   //   this is a good approximation. A proper solution would involve moving
   //   the choosing of the resolution to display-list building time.
   ScreenSize alignment;
 
-  if (gfxPrefs::LayersTilesEnabled() && !APZCCallbackHelper::IsDisplayportSuppressed()) {
+  if (APZCCallbackHelper::IsDisplayportSuppressed()) {
+    alignment = ScreenSize(1, 1);
+  } else if (gfxPrefs::LayersTilesEnabled()) {
     alignment = ScreenSize(gfxPlatform::GetPlatform()->GetTileWidth(),
                            gfxPlatform::GetPlatform()->GetTileHeight());
   } else {
     // If we're not drawing with tiles then we need to be careful about not
     // hitting the max texture size and we only need 1 draw call per layer
     // so we can align to a smaller multiple.
     alignment = ScreenSize(128, 128);
   }