Merge mozilla-central to fx-team. a=merge
authorSebastian Hengst <archaeopteryx@coole-files.de>
Thu, 07 Jul 2016 17:43:50 +0200
changeset 304093 5eee8c97b40876ba9b529d70bd6ccec249fc5dce
parent 304092 e2f5a7c70b47be82f2a8f85cac59482c8f77550a (current diff)
parent 304001 63cc31d6cc1c8089590461016ce0b4a2fb77ecbc (diff)
child 304094 6d33f8c374e8e5b832ad6c644fccd25e8041d7b2
push id30411
push userkwierso@gmail.com
push dateFri, 08 Jul 2016 00:26:45 +0000
treeherdermozilla-central@23dc78b7b57e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmerge
milestone50.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
Merge mozilla-central to fx-team. a=merge
--- a/gfx/layers/basic/BasicCompositor.cpp
+++ b/gfx/layers/basic/BasicCompositor.cpp
@@ -616,20 +616,16 @@ BasicCompositor::BeginFrame(const nsIntR
   if (!aOpaqueRegion.IsEmpty()) {
     LayoutDeviceIntRegion clearRegion = mInvalidRegion;
     clearRegion.SubOut(LayoutDeviceIntRegion::FromUnknownRegion(aOpaqueRegion));
     clearRect = clearRegion.GetBounds();
   } else {
     clearRect = mInvalidRect;
   }
 
-  // Prevent CreateRenderTargetForWindow from clearing unwanted area.
-  gfxUtils::ClipToRegion(mDrawTarget,
-                         mInvalidRegion.ToUnknownRegion());
-
   // Setup an intermediate render target to buffer all compositing. We will
   // copy this into mDrawTarget (the widget), and/or mTarget in EndFrame()
   RefPtr<CompositingRenderTarget> target =
     CreateRenderTargetForWindow(mInvalidRect,
                                 clearRect,
                                 bufferMode);
   if (!target) {
     if (!mTarget) {
@@ -638,20 +634,18 @@ BasicCompositor::BeginFrame(const nsIntR
     return;
   }
   SetRenderTarget(target);
 
   // We only allocate a surface sized to the invalidated region, so we need to
   // translate future coordinates.
   mRenderTarget->mDrawTarget->SetTransform(Matrix::Translation(-mRenderTarget->GetOrigin()));
 
-  if (mRenderTarget->mDrawTarget != mDrawTarget) {
-    gfxUtils::ClipToRegion(mRenderTarget->mDrawTarget,
-                           mInvalidRegion.ToUnknownRegion());
-  }
+  gfxUtils::ClipToRegion(mRenderTarget->mDrawTarget,
+                         mInvalidRegion.ToUnknownRegion());
 
   if (aRenderBoundsOut) {
     *aRenderBoundsOut = rect;
   }
 
   if (aClipRectIn) {
     mRenderTarget->mDrawTarget->PushClipRect(Rect(*aClipRectIn));
   } else {
@@ -676,20 +670,17 @@ BasicCompositor::EndFrame()
     float b = float(rand()) / RAND_MAX;
     // We're still clipped to mInvalidRegion, so just fill the bounds.
     mRenderTarget->mDrawTarget->FillRect(
       IntRectToRect(mInvalidRegion.GetBounds()).ToUnknownRect(),
       ColorPattern(Color(r, g, b, 0.2f)));
   }
 
   // Pop aInvalidregion
-  mDrawTarget->PopClip();
-  if (mRenderTarget->mDrawTarget != mDrawTarget) {
-    mRenderTarget->mDrawTarget->PopClip();
-  }
+  mRenderTarget->mDrawTarget->PopClip();
 
   if (mTarget || mRenderTarget->mDrawTarget != mDrawTarget) {
     // Note: Most platforms require us to buffer drawing to the widget surface.
     // That's why we don't draw to mDrawTarget directly.
     RefPtr<SourceSurface> source;
     if (mRenderTarget->mDrawTarget != mDrawTarget) {
       source = mWidget->EndBackBufferDrawing();
     } else {