Make OMTC changes not effect desktop
authorBenoit Girard <b56girard@gmail.com>
Mon, 13 Feb 2012 17:17:12 -0500
changeset 92441 b16913549a581f9baa44916986376263dc6951ac
parent 92440 82c41b346dcfc8cb0e2b915080576dcb828b2d9a
child 92442 0caae99f75d3c8436d7cdadf78e3f752f6193809
push id886
push userlsblakk@mozilla.com
push dateMon, 04 Jun 2012 19:57:52 +0000
treeherdermozilla-beta@bbd8d5efd6d1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone13.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
Make OMTC changes not effect desktop
gfx/layers/opengl/LayerManagerOGL.cpp
layout/base/FrameLayerBuilder.cpp
widget/android/nsWindow.cpp
--- a/gfx/layers/opengl/LayerManagerOGL.cpp
+++ b/gfx/layers/opengl/LayerManagerOGL.cpp
@@ -777,17 +777,17 @@ LayerManagerOGL::Render()
     WorldTransformRect(r);
     mGLContext->fScissor(r.x, r.y, r.width, r.height);
   } else {
     mGLContext->fScissor(0, 0, width, height);
   }
 
   mGLContext->fEnable(LOCAL_GL_SCISSOR_TEST);
 
-  mGLContext->fClearColor(1.0, 1.0, 1.0, 0.0);
+  mGLContext->fClearColor(0.0, 0.0, 0.0, 0.0);
   mGLContext->fClear(LOCAL_GL_COLOR_BUFFER_BIT | LOCAL_GL_DEPTH_BUFFER_BIT);
 
   // Allow widget to render a custom background.
   mWidget->DrawWindowUnderlay(this, rect);
 
   // Render our layers.
   RootLayer()->RenderLayer(mGLContext->IsDoubleBuffered() ? 0 : mBackBufferFBO,
                            nsIntPoint(0, 0));
--- a/layout/base/FrameLayerBuilder.cpp
+++ b/layout/base/FrameLayerBuilder.cpp
@@ -867,17 +867,17 @@ ContainerState::CreateOrRecycleThebesLay
       NSAppUnitsToDoublePixels(offset.x, appUnitsPerDevPixel)*mParameters.mXScale,
       NSAppUnitsToDoublePixels(offset.y, appUnitsPerDevPixel)*mParameters.mYScale);
   nsIntPoint pixOffset(NSToIntRoundUp(scaledOffset.x), NSToIntRoundUp(scaledOffset.y));
   gfxMatrix matrix;
   matrix.Translate(gfxPoint(pixOffset.x, pixOffset.y));
   layer->SetTransform(gfx3DMatrix::From2D(matrix));
 
    // FIXME: Temporary workaround for bug 681192 and bug 724786. Uncomment this code before review!
-#if 0
+#ifndef MOZ_JAVA_COMPOSITOR
   // Calculate exact position of the top-left of the active scrolled root.
   // This might not be 0,0 due to the snapping in ScaleToNearestPixels.
   gfxPoint activeScrolledRootTopLeft = scaledOffset - matrix.GetTranslation();
   // If it has changed, then we need to invalidate the entire layer since the
   // pixels in the layer buffer have the content at a (subpixel) offset
   // from what we need.
   if (activeScrolledRootTopLeft != data->mActiveScrolledRootPosition) {
     data->mActiveScrolledRootPosition = activeScrolledRootTopLeft;
--- a/widget/android/nsWindow.cpp
+++ b/widget/android/nsWindow.cpp
@@ -916,18 +916,24 @@ nsWindow::OnGlobalAndroidEvent(AndroidGe
             for (PRUint32 i = 0; i < win->mChildren.Length(); i++) {
                 win->mChildren[i]->mBounds.width = 0;
                 win->mChildren[i]->mBounds.height = 0;
             }
         case AndroidGeckoEvent::SIZE_CHANGED: {
             nsTArray<nsIntPoint> points = ae->Points();
             NS_ASSERTION(points.Length() != 3, "Size changed does not have enough coordinates");
 
+#ifdef MOZ_JAVA_COMPOSITOR
             int nw = points[1].x;
             int nh = points[1].y;
+#else
+            int nw = points[0].x;
+            int nh = points[0].y;
+#endif
+
 
             if (ae->Type() == AndroidGeckoEvent::FORCED_RESIZE || nw != gAndroidBounds.width ||
                 nh != gAndroidBounds.height) {
 
                 gAndroidBounds.width = nw;
                 gAndroidBounds.height = nh;
 
                 // tell all the windows about the new size