Bug 1534250. Always paint the entire mask. r=mattwoodrow
authorJeff Muizelaar <jrmuizel@gmail.com>
Wed, 13 Mar 2019 15:43:56 +0000
changeset 521715 69f7e56e68bc94a682265731fd503a58597c6be5
parent 521714 5dc0ae1f1b48630aeee9ee07c2dcbda345ad3a2b
child 521716 c2beaac7130578945db2e7ee33e8667791017f2d
push id10867
push userdvarga@mozilla.com
push dateThu, 14 Mar 2019 15:20:45 +0000
treeherdermozilla-beta@abad13547875 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmattwoodrow
bugs1534250, 1460491
milestone67.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 1534250. Always paint the entire mask. r=mattwoodrow Previously we would only paint the building area but we would not do anything to check that the building area had changed. Since, we're already allocating a surface for the entire item it's better to just paint it and not worry about doing extra invalidations. Originally, we used mVisibleRect here. That was changed to GetPaintRect() in part 1 of 1460491 and then to GetBuildingRect in part 2. However, I think the original code was always wrong and we should've been using mBounds the whole time. Differential Revision: https://phabricator.services.mozilla.com/D23215
layout/painting/nsDisplayList.cpp
--- a/layout/painting/nsDisplayList.cpp
+++ b/layout/painting/nsDisplayList.cpp
@@ -8967,17 +8967,17 @@ bool nsDisplayMasksAndClipPaths::PaintMa
                                            bool* aMaskPainted) {
   MOZ_ASSERT(aMaskContext->GetDrawTarget()->GetFormat() == SurfaceFormat::A8);
 
   imgDrawingParams imgParams(aBuilder->ShouldSyncDecodeImages()
                                  ? imgIContainer::FLAG_SYNC_DECODE
                                  : imgIContainer::FLAG_SYNC_DECODE_IF_FAST);
   nsRect borderArea = nsRect(ToReferenceFrame(), mFrame->GetSize());
   nsSVGIntegrationUtils::PaintFramesParams params(
-      *aMaskContext, mFrame, GetBuildingRect(), borderArea, aBuilder, nullptr,
+      *aMaskContext, mFrame, mBounds, borderArea, aBuilder, nullptr,
       mHandleOpacity, imgParams);
   ComputeMaskGeometry(params);
   bool painted = nsSVGIntegrationUtils::PaintMask(params);
   if (aMaskPainted) {
     *aMaskPainted = painted;
   }
 
   nsDisplayMasksAndClipPathsGeometry::UpdateDrawResult(this, imgParams.result);