Closed Bug 1367991 Opened 2 years ago Closed 2 years ago

Mask layer may not repaint if the draw result is not SUCCESS

Categories

(Core :: Graphics: WebRender, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla55
Tracking Status
firefox55 --- fixed

People

(Reporter: ethlin, Assigned: ethlin)

References

Details

Attachments

(1 file)

The draw result of the nsDisplayMask[1] is correct, but the next transaction will skip the painting when checking the user data[2].


[1] https://dxr.mozilla.org/mozilla-central/source/layout/painting/nsDisplayList.cpp#8417
[2] https://dxr.mozilla.org/mozilla-central/source/layout/painting/FrameLayerBuilder.cpp#3891
Attachment #8871637 - Attachment description: bug_1367991.patch → Check mask layer's draw result to make sure we will repaint it
Comment on attachment 8871637 [details] [diff] [review]
Check mask layer's draw result to make sure we will repaint it

Review of attachment 8871637 [details] [diff] [review]:
-----------------------------------------------------------------

::: layout/painting/FrameLayerBuilder.cpp
@@ +3921,5 @@
>      return;
>    }
>    maskLayer->SetContainer(imgContainer);
>  
> +  if (drawFinished) {

move #3916 down to here, and drop drawFinished

::: layout/painting/nsDisplayList.cpp
@@ +8403,5 @@
>    nsSVGIntegrationUtils::PaintMask(params);
>  
>    nsDisplayMaskGeometry::UpdateDrawResult(this, imgParmas.result);
> +
> +  return imgParmas.result == mozilla::image::DrawResult::SUCCESS ||

We care about SUCCESS only

::: layout/painting/nsDisplayList.h
@@ +4434,5 @@
>                      nsRenderingContext* aCtx,
>                      LayerManager* aManager);
>  
>    /*
>     * Paint mask onto aMaskContext in mFrame's coordinate space.

Comment what return value means
Attachment #8871637 - Flags: review?(cku) → review+
I will keep the PaintMask position since for some layer managers we need to paint mask before creating image container. 
try result: https://treeherder.mozilla.org/#/jobs?repo=try&revision=697a17c66ea44ec492b455856e9a46d024b0bc8c&selectedJob=103274905
Pushed by ethlin@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/25a24642c6dc
Check mask layer's draw result to make sure we will repaint it in the next transaction if the image is not ready. r=cjku
https://hg.mozilla.org/mozilla-central/rev/25a24642c6dc
https://hg.mozilla.org/mozilla-central/rev/34d32278afbf
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in before you can comment on or make changes to this bug.