Bug 1251937 - Don't align to tiles when displayport suppression is enabled. r=BenWa a=ritu
authorKartikaya Gupta <kgupta@mozilla.com>
Mon, 07 Mar 2016 16:23:23 -0500
changeset 323394 fdaa88cdffe3e988f341fe8b625d5f40a784e454
parent 323393 f61853686f6afca01d269dd77229f46e78e7b502
child 323395 bdd33575fbfe737edc7d4caa642a2c6e10001fa6
push id5913
push userjlund@mozilla.com
push dateMon, 25 Apr 2016 16:57:49 +0000
treeherdermozilla-beta@dcaf0a6fa115 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersBenWa, ritu
bugs1251937
milestone47.0a2
Bug 1251937 - Don't align to tiles when displayport suppression is enabled. r=BenWa a=ritu MozReview-Commit-ID: JMSqpMPUcpv
layout/base/nsLayoutUtils.cpp
--- a/layout/base/nsLayoutUtils.cpp
+++ b/layout/base/nsLayoutUtils.cpp
@@ -942,17 +942,17 @@ 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()) {
+  if (gfxPrefs::LayersTilesEnabled() && !APZCCallbackHelper::IsDisplayportSuppressed()) {
     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);
   }