Changes

Jump to: navigation, search

Gecko:Overview

49 bytes removed, 16:35, 16 July 2019
Fix outdated references to OMTC
* Batching (TODO)
* Picture-caching (TODO)
 
The WebRender code path reuses the layers IPC infrastructure for sharing textures between the content process and the renderer. For example The ImageBridge protocol described in the Compositing section is also used to transfer video frames when WebRender is enabled.
==== Painting/Rasterizing (Layers aka Non-WebRender) ====
Compositing is the action of flattening the layers into the final image that is shown on the screen.
On some platform, compositing happens on the Content thread. However, on other platforms we We paint and composite on a separate thread threads (it is called Off-main-thread compositing, or OMTC). OMTC is at the moment the default behavior on mobile platforms, but the goal is to do it on all platforms in the and a long runtime ago Firefox did not have this separation).
The Layers architecture is built on the following notions:
[[File:LayersRefactoring.png|thumb|650px|New layers architecture, with OGL backend]]
The above abstractions Since painting and compositing are sufficient to perform compositing on the main thread, but performed on the OMTC casedifferent threads/processes, we need a mechanism to synchronize a client layer tree that is constructed on the content thread, and a host layer tree that is used for compositing on the compositor thread.
This synchronization process must ensure that the host layer tree reflects the state of the current layer tree while remaining in a consistent state, and must transfer texture data from a thread to the other. Moreover, on some platforms the content and compositor threads may live in separate processes.
* [http://dxr.mozilla.org/mozilla-central/source/gfx/layers/client/CompositableClient.h gfx/layers/client/CompositableClient.h]
To visualize how a web page is layered, turn on the pref "layers.draw-borders" in about:config. When this pref is on, the borders of layers and tiles are displayed on top of the content. This only works when using the new Compositor API, that is when off-main-thread compositing WebRender is activated. OMTC is activated by default on all mobile platformsdisabled, and will progressively get activated on desktop platforms (since WebRender does not yet, though). On platforms where OMTC is not used, this pref has no effecthave the same concept of layers.
Blog posts with information on Layers that should be integrated here:
Confirm
137
edits

Navigation menu