Bug 1265468 - Invalidate all layers when dragging a tab to a new window. r=nical
authorMatt Woodrow <mwoodrow@mozilla.com>
Thu, 26 May 2016 18:40:07 +1200
changeset 338228 42d2e0afa3bc00d4c559148de237794164bd0012
parent 338227 37b6187d1bc3cf3efa3a5b8afab696bfd3799f0e
child 338229 a0365d37a510dca7411c6043da29992d26490ff9
push id6249
push userjlund@mozilla.com
push dateMon, 01 Aug 2016 13:59:36 +0000
treeherdermozilla-beta@bad9d4f5bf7e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnical
bugs1265468
milestone49.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 1265468 - Invalidate all layers when dragging a tab to a new window. r=nical
gfx/layers/composite/ContainerLayerComposite.h
gfx/layers/opengl/CompositorOGL.cpp
layout/ipc/RenderFrameParent.cpp
--- a/gfx/layers/composite/ContainerLayerComposite.h
+++ b/gfx/layers/composite/ContainerLayerComposite.h
@@ -63,16 +63,17 @@ protected:
 public:
   // LayerComposite Implementation
   virtual Layer* GetLayer() override { return this; }
 
   virtual void SetLayerManager(LayerManagerComposite* aManager) override
   {
     LayerComposite::SetLayerManager(aManager);
     mManager = aManager;
+    mLastIntermediateSurface = nullptr;
 
     for (Layer* l = GetFirstChild(); l; l = l->GetNextSibling()) {
       LayerComposite* child = l->AsLayerComposite();
       child->SetLayerManager(aManager);
     }
   }
 
   virtual void Destroy() override;
--- a/gfx/layers/opengl/CompositorOGL.cpp
+++ b/gfx/layers/opengl/CompositorOGL.cpp
@@ -1000,16 +1000,18 @@ CompositorOGL::DrawQuad(const Rect& aRec
   MOZ_ASSERT(mFrameInProgress, "frame not started");
   MOZ_ASSERT(mCurrentRenderTarget, "No destination");
 
   if (aEffectChain.mPrimaryEffect->mType == EffectTypes::VR_DISTORTION) {
     DrawVRDistortion(aRect, aClipRect, aEffectChain, aOpacity, aTransform);
     return;
   }
 
+  MakeCurrent();
+
   IntPoint offset = mCurrentRenderTarget->GetOrigin();
   IntSize size = mCurrentRenderTarget->GetSize();
 
   Rect renderBound(0, 0, size.width, size.height);
   renderBound.IntersectRect(renderBound, Rect(aClipRect));
   renderBound.MoveBy(offset);
 
   Rect destRect = aTransform.TransformAndClipBounds(aRect, renderBound);
--- a/layout/ipc/RenderFrameParent.cpp
+++ b/layout/ipc/RenderFrameParent.cpp
@@ -207,16 +207,17 @@ RenderFrameParent::OwnerContentChanged(n
 {
   MOZ_ASSERT(!mFrameLoader || mFrameLoader->GetOwnerContent() == aContent,
              "Don't build new map if owner is same!");
 
   RefPtr<LayerManager> lm = mFrameLoader ? GetFrom(mFrameLoader) : nullptr;
   // Perhaps the document containing this frame currently has no presentation?
   if (lm && lm->AsClientLayerManager()) {
     lm->AsClientLayerManager()->GetRemoteRenderer()->SendAdoptChild(mLayersId);
+    FrameLayerBuilder::InvalidateAllLayers(lm);
   }
 }
 
 void
 RenderFrameParent::ActorDestroy(ActorDestroyReason why)
 {
   if (mLayersId != 0) {
     if (XRE_IsParentProcess()) {