Bug 962278 - Propagate device DPI to APZC on B2G/gonk. r=kats
authorDoug Sherk <bugzilla@sherk.me>
Thu, 23 Jan 2014 16:34:31 -0500
changeset 180991 2a082f03cd1d64c8bfff9641284f2dc23617f806
parent 180990 39acb0de3d5a8b0fb5831ed77686b22cf397aab5
child 180992 feaf8bd56a82749f5d0d8869b7c0a1c01e300362
push id3343
push userffxbld
push dateMon, 17 Mar 2014 21:55:32 +0000
treeherdermozilla-beta@2f7d3415f79f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskats
bugs962278
milestone29.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 962278 - Propagate device DPI to APZC on B2G/gonk. r=kats
widget/gonk/nsWindow.cpp
--- a/widget/gonk/nsWindow.cpp
+++ b/widget/gonk/nsWindow.cpp
@@ -38,16 +38,17 @@
 #include "nsWindow.h"
 #include "nsIWidgetListener.h"
 #include "cutils/properties.h"
 #include "ClientLayerManager.h"
 #include "BasicLayers.h"
 #include "libdisplay/GonkDisplay.h"
 #include "pixelflinger/format.h"
 #include "mozilla/BasicEvents.h"
+#include "mozilla/layers/APZCTreeManager.h"
 #include "mozilla/layers/CompositorParent.h"
 #include "ParentProcessController.h"
 #include "nsThreadUtils.h"
 #include "HwcComposer2D.h"
 
 #define LOG(args...)  __android_log_print(ANDROID_LOG_INFO, "Gonk" , ## args)
 #define LOGW(args...) __android_log_print(ANDROID_LOG_WARN, "Gonk", ## args)
 #define LOGE(args...) __android_log_print(ANDROID_LOG_ERROR, "Gonk", ## args)
@@ -568,16 +569,17 @@ nsWindow::GetLayerManager(PLayerTransact
         return nullptr;
     }
 
     if (sUsingOMTC) {
         CreateCompositor();
         if (mCompositorParent) {
             uint64_t rootLayerTreeId = mCompositorParent->RootLayerTreeId();
             CompositorParent::SetControllerForLayerTree(rootLayerTreeId, new ParentProcessController());
+            CompositorParent::GetAPZCTreeManager(rootLayerTreeId)->SetDPI(GetDPI());
         }
         if (mLayerManager)
             return mLayerManager;
     }
 
     if (mUseLayersAcceleration) {
         DebugOnly<nsIntRect> fbBounds = gScreenBounds;
         if (!sGLContext) {