зеркало из https://github.com/mozilla/gecko-dev.git
3b8aaa896a
Instead of the WebRenderLayerScrollData code knowing about all the different display item types, it makes more sense to move this logic into the display items. In addition to avoiding dis-encapsulating the data from nsDisplayItem subclasses, this makes it easier to handle two specific scenarios: (1) the case where an nsDisplayItem A subclasses another nsDisplayItem B, but A and B have different types returned by GetType(). Previously A and B would have to be handled explicitly in the WebRenderLayerScrollData switch statements, which doesn't scale well if new types are added. With the new approach the virtual function is shared down from A to B and so takes care of it. This is particularly relevant for types like nsDisplayOwnLayer which have a number of subclasses. (2) the case where a display item *might* have APZ-relevant information. In this case the type of the item alone is not sufficient to determine if we need to create a new WebRenderLayerScrollData for it. Instead, we need to access specific state inside the display item. This is now handled by the UpdateScrollData function returning true when passed nullptr arguments, and replaces the switch statement in WebRenderLayerManager that updated forceNewLayerData. MozReview-Commit-ID: FlfHlgSccSn --HG-- extra : rebase_source : d1fe841724cc6020433aea31ffb5214d8a44d0a9 |
||
---|---|---|
.. | ||
PRenderFrame.ipdl | ||
PVsync.ipdl | ||
RenderFrameChild.cpp | ||
RenderFrameChild.h | ||
RenderFrameParent.cpp | ||
RenderFrameParent.h | ||
VsyncChild.cpp | ||
VsyncChild.h | ||
VsyncParent.cpp | ||
VsyncParent.h | ||
moz.build |