Closed Bug 1519654 Opened 1 year ago Closed 1 year ago

Implement CONTENT_FRAME_TIME_WITH_SVG for non-WebRender

Categories

(Core :: Graphics: WebRender, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla66
Tracking Status
firefox66 --- fixed

People

(Reporter: jrmuizel, Assigned: jrmuizel)

Details

Attachments

(2 files)

This will make comparisons with WebRender enabled/disabled more meaningful.

Matt, when/where do you think is the best place to record this? During FLB?

Flags: needinfo?(matt.woodrow)

Yeah, during ProcessDisplayItems is probably the easiest time to detect SVG items.

Unfortunately finding the outermost LayerManager to store the result is non-trivial.

FrmeLayerBuilder::mContainingPaintedLayer will be non-null if the current FLB is for an inactive layer, and you can get the outer Layer* (and then LayerManager*) from that. Looking up the gLayerManagerLayerBuilder UserData on the LayerManager will find the outer FrameLayerBuilder*. Loop until you find a FLB that doesn't have mContainingPaintedLayer.

Alternatively you can use nsDisplayListBuilder::GetWidgetLayerManager() to look it up via the widget.

Flags: needinfo?(matt.woodrow)
Assignee: nobody → jmuizelaar

This patch doesn't quite work because we lose SVGWrapper during flattening:

https://searchfox.org/mozilla-central/rev/a5d71a93f106df1f4d43935cd1f5d8babe7c3381/layout/painting/nsDisplayList.cpp#10293

I'm not sure the best way to fix that.

Suggestions?

Flags: needinfo?(matt.woodrow)
Comment on attachment 9036504 [details] [diff] [review]
A path to mostly do this

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

::: layout/painting/FrameLayerBuilder.cpp
@@ +4448,5 @@
>  
> +    if (itemType == DisplayItemType::TYPE_SVG_WRAPPER) {
> +      printf_stderr("SVG!!\n");
> +      mBuilder->GetWidgetLayerManager()->SetContainsSVG(true);
> +    }

Put this code here instead - https://searchfox.org/mozilla-central/rev/b29663c6c9c61b0bf29e8add490cbd6bad293a67/layout/painting/FrameLayerBuilder.cpp#1666
Flags: needinfo?(matt.woodrow)
Pushed by jmuizelaar@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/2a889da359ee
Implement CONTENT_FRAME_TIME_WITH_SVG for non-WebRender contains svg. r=mattwoodrow
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla66
You need to log in before you can comment on or make changes to this bug.