Bug 1216924 - Don't align to tiles (either real or virtual) if displayport suppression is enabled. r=BenWa
authorKartikaya Gupta <kgupta@mozilla.com>
Mon, 14 Mar 2016 14:07:31 -0400
changeset 288615 fbe36b282024d49c78a5699d8e9e2824ef03c85a
parent 288614 48c0d3800c35628ccae44935ba822c91b15632aa
child 288616 a794e56f887dbae57132223678fb00f7d01d6fae
push id18174
push usercbook@mozilla.com
push dateTue, 15 Mar 2016 09:44:58 +0000
treeherderfx-team@dd0baa33759d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
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
@@ -945,17 +945,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);
   }