Changes

Jump to: navigation, search

Platform/GFX/APZ

171 bytes added, 12:41, 17 July 2018
Misc updates
* When the compositor receives an update to the layer tree, it propagates this update to the APZCTreeManager by calling APZCTreeManager::UpdatePanZoomControllerTree(). This function updates the tree of APZCs to reflect the tree of scrollable layers in the updated layer tree.
* Every time the compositor composites a frame, it queries each APZC for its current async transform (see AsyncPanZoomController::GetCurrentAsyncTransform()). The APZC modifies this transform as the user pans and zooms.
* APZCs can schedule a composite (for the next frame of a scroll animation, for instance) by calling CompositorParent::ScheduleRenderOnCompositorThread().
=== Widget code ===
When OMTC is enabled on a platform (which is a requirement for using the APZC), the compositor runs on its own thread, called the '''compositor thread'''. APZCs and the APZCTreeManager can be thought of as living on the compositor thread, although they can be used in certain ways by other threads (usually the Gecko thread, or the platform UI thread if there is one). [http://dxr.mozilla.org/mozilla-central/source/gfx/layers/apz/src/APZCTreeManager.h APZCTreeManager.h] documents which APZCTreeManager methods can be called on which threads.
On some platforms there are not only multiple threads but also multiple processes. In this setup, the compositor lives in the GPU process (if there is one - currently Windows only ), or the parent UI process has a compositor thread, and all otherwise. All the APZCs live in the parent same processas the compositor, even ones corresponding to layers from a child content process.
== Coordinate systems ==
* [https://staktrace.com/spout/entry.php?id=800 Unraveling coordinate systems]
* [https://staktrace.com/spout/entry.php?id=801 Unraveling coordinate systems, part 2]
* [httphttps://dxr.mozillasearchfox.org/mozilla-central/sourcerev/6f86cc3479f80ace97f62634e2c82a483d1ede40/gfx/layers/apz/src/APZCTreeManager.cpp#1052 2795 The comment above APZCTreeManager::GetInputTransformsGetScreenToAPZCTransform()]
* [https://bug935219.bugzilla.mozilla.org/attachment.cgi?id=8380975 Diagram illustrating the coordinate confusion that gave rise to bug 935219]
== Where to go for more answers ==
APZ now has its own IRC channel, #apz. You can also try #gfx and #developers. Ping kats, botond, tnikkel, rbarkermstange, or dvanderrhunt.
Confirm
586
edits

Navigation menu