Closed Bug 1382200 Opened 7 years ago Closed 7 years ago

Clean up IsScrollInfoLayer functions

Categories

(Core :: Panning and Zooming, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla56
Tracking Status
firefox56 --- fixed

People

(Reporter: kats, Assigned: kats)

References

Details

(Whiteboard: [gfx-noted])

Attachments

(3 files)

There's a IsScrollInfoLayer function in LayerMetricsWrapper/WebRenderScrollDataWrapper which uses the "complicated" check to determine if the metrics is for a scrollinfo layer. The "complicated" check is the one used in Layer::IsScrollInfoLayer [1]. Instead, it could use the much simpler check from FrameMetrics::IsScrollInfoLayer [2]. The reason it doesn't do so already is that the simpler FrameMetrics function was added later. However, the two should be equivalent. There are a couple of call sites that still call Layer::IsScrollInfoLayer and I'd like to rename that function also to better reflect what the call sites really want to be checking for. The main driver for doing this is that the less layers-specific stuff we have in WebRenderScrollData, the easier it is to hook up APZ to layers-free webrender. [1] http://searchfox.org/mozilla-central/rev/88180977d79654af025158d8ebeb8c2aa11940eb/gfx/layers/Layers.cpp#670 [2] http://searchfox.org/mozilla-central/rev/88180977d79654af025158d8ebeb8c2aa11940eb/gfx/layers/FrameMetrics.h#491
Priority: -- → P3
Whiteboard: [gfx-noted]
Comment on attachment 8887912 [details] Bug 1382200 - Rename Layer::IsScrollInfoLayer to better capture what the call sites care about. https://reviewboard.mozilla.org/r/158824/#review164238
Attachment #8887912 - Flags: review?(botond) → review+
Comment on attachment 8887913 [details] Bug 1382200 - Change implementation of the LayerMetricsWrapper IsScrollInfoLayer to use the metrics flag. https://reviewboard.mozilla.org/r/158826/#review164240
Attachment #8887913 - Flags: review?(botond) → review+
Comment on attachment 8887914 [details] Bug 1382200 - Eliminate LayerMetricsWrapper::IsScrollInfoLayer entirely by inlining it. https://reviewboard.mozilla.org/r/158828/#review164242
Attachment #8887914 - Flags: review?(botond) → review+
Pushed by kgupta@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/90b186b95d75 Rename Layer::IsScrollInfoLayer to better capture what the call sites care about. r=botond https://hg.mozilla.org/integration/autoland/rev/d6f3312bc785 Change implementation of the LayerMetricsWrapper IsScrollInfoLayer to use the metrics flag. r=botond https://hg.mozilla.org/integration/autoland/rev/46fb0382583c Eliminate LayerMetricsWrapper::IsScrollInfoLayer entirely by inlining it. r=botond
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: