Closed Bug 1473136 Opened 4 years ago Closed 4 years ago

NeedsActiveLayer is frequently checked when it could be cached

Categories

(Core :: Web Painting, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla63
Tracking Status
firefox63 --- fixed

People

(Reporter: bas.schouten, Assigned: bas.schouten)

Details

Attachments

(1 file)

NeedsActiveLayer does not mutate without a new DisplayItem being created. This means we only need to run it once for nsDisplayOpacity rather than calling it multiple times. This makes for a big performance improvement.
Comment on attachment 8989546 [details]
Bug 1473136: Cache mNeedsActiveLayer once for nsDisplayOpacity.

https://reviewboard.mozilla.org/r/254570/#review261414

::: layout/generic/nsFrame.cpp:2956
(Diff revision 1)
>        nsSVGIntegrationUtils::GetRequiredSourceForInvalidArea(this, visibleRect);
>      aBuilder->EnterSVGEffectsContents(&hoistedScrollInfoItemsStorage);
>    }
>  
> +
> +  bool needsActiveLayer = false;

Probably worth calling this needsActiveOpacityLayer, too many layers things going on in this function.
Attachment #8989546 - Flags: review?(matt.woodrow) → review+
Pushed by bschouten@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/bf97c22331fa
Cache mNeedsActiveLayer once for nsDisplayOpacity. r=mattwoodrow
https://hg.mozilla.org/mozilla-central/rev/bf97c22331fa
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
You need to log in before you can comment on or make changes to this bug.