Bug 1545262 - Stop clearing mFullWindowRenderTarget. r=mattwoodrow
authorMarkus Stange <mstange@themasta.com>
Wed, 14 Aug 2019 01:18:07 +0000
changeset 488368 759f7dabeddf8e4d78fbc6c8fb29eaab9b88f4b9
parent 488367 9798b876061ebbc28eb23ab5d456c094855a4ce9
child 488369 77c8de59e66a2f416cfb3f5254f6c3f6c8e0d246
push id36440
push userncsoregi@mozilla.com
push dateFri, 16 Aug 2019 03:57:48 +0000
treeherdermozilla-central@a58b7dc85887 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmattwoodrow
bugs1545262
milestone70.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 1545262 - Stop clearing mFullWindowRenderTarget. r=mattwoodrow These areas only need to be cleared in rt->mDrawTarget. Once the invalid area gets copied over to mFullWindowRenderTarget, any cleared pixels will be copied over and clear those pixels in mFullWindowRenderTarget. This clear wasn't only necessary, it also sometimes cleared to much, because the clip to the invalid region that the caller sets does not apply to this DrawTarget. Differential Revision: https://phabricator.services.mozilla.com/D41612
gfx/layers/basic/BasicCompositor.cpp
--- a/gfx/layers/basic/BasicCompositor.cpp
+++ b/gfx/layers/basic/BasicCompositor.cpp
@@ -319,20 +319,16 @@ BasicCompositor::CreateRenderTargetForWi
     // Adjust bounds rect to account for new origin at (0, 0).
     if (windowRect.Size() != mDrawTarget->GetSize()) {
       windowRect.ExpandToEnclose(IntPoint(0, 0));
     }
     rt = new BasicCompositingRenderTarget(mDrawTarget, windowRect);
     if (!aClearRect.IsEmpty()) {
       IntRect clearRect = aClearRect.ToUnknownRect();
       mDrawTarget->ClearRect(Rect(clearRect - rt->GetOrigin()));
-
-      if (mFullWindowRenderTarget) {
-        mFullWindowRenderTarget->mDrawTarget->ClearRect(Rect(clearRect));
-      }
     }
   }
 
   return rt.forget();
 }
 
 already_AddRefed<DataTextureSource> BasicCompositor::CreateDataTextureSource(
     TextureFlags aFlags) {