Bug 773192: Only proxy drawing to a non-default target in BasicShadowableLayerManager, i.e. drawWindow(USE_WIDGET_LAYERS) for a content context, when the request is same-process. r=ajuma
authorChris Jones <jones.chris.g@gmail.com>
Thu, 12 Jul 2012 14:07:13 -0700
changeset 99111 4f0c3cb6d91180399a5d41c3558c68098f313d5f
parent 99110 741b4ebd050f1bfe39f0ff8d5be5ead2a72b18c7
child 99112 363077c10ba97eef283a2d9cb5fb198f654b96f5
push id23105
push useremorley@mozilla.com
push dateFri, 13 Jul 2012 12:23:43 +0000
treeherdermozilla-central@a2d40b91eea9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersajuma
bugs773192
milestone16.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 773192: Only proxy drawing to a non-default target in BasicShadowableLayerManager, i.e. drawWindow(USE_WIDGET_LAYERS) for a content context, when the request is same-process. r=ajuma
gfx/layers/basic/BasicLayerManager.cpp
--- a/gfx/layers/basic/BasicLayerManager.cpp
+++ b/gfx/layers/basic/BasicLayerManager.cpp
@@ -5,16 +5,17 @@
 
 #include "mozilla/layers/PLayerChild.h"
 #include "mozilla/layers/PLayersChild.h"
 #include "mozilla/layers/PLayersParent.h"
 
 #include "gfxSharedImageSurface.h"
 #include "gfxImageSurface.h"
 #include "gfxUtils.h"
+#include "nsXULAppAPI.h"
 #include "RenderTrace.h"
 #include "sampler.h"
 
 #define PIXMAN_DONT_DEFINE_STDINT
 #include "pixman.h"
 
 #include "BasicTiledThebesLayer.h"
 #include "BasicLayersImpl.h"
@@ -945,17 +946,18 @@ BasicShadowLayerManager::BeginTransactio
   // If the last transaction was incomplete (a failed DoEmptyTransaction),
   // don't signal a new transaction to ShadowLayerForwarder. Carry on adding
   // to the previous transaction.
   if (HasShadowManager()) {
     ShadowLayerForwarder::BeginTransaction();
 
     // If we have a non-default target, we need to let our shadow manager draw
     // to it. This will happen at the end of the transaction.
-    if (aTarget && (aTarget != mDefaultTarget)) {
+    if (aTarget && (aTarget != mDefaultTarget) &&
+        XRE_GetProcessType() == GeckoProcessType_Default) {
       mShadowTarget = aTarget;
 
       // Create a temporary target for ourselves, so that mShadowTarget is only
       // drawn to by our shadow manager.
       nsRefPtr<gfxASurface> targetSurface = gfxPlatform::GetPlatform()->
         CreateOffscreenSurface(aTarget->OriginalSurface()->GetSize(),
                                aTarget->OriginalSurface()->GetContentType());
       targetContext = new gfxContext(targetSurface);