class Layer
Defined at line 47 of file ../../src/graphics/display/drivers/coordinator/layer.h
Manages Client-created Layer configurations.
Instances are not thread-safe. Concurrent access must be synchronized
externally.
Public Methods
void Layer (const Layer & )
Defined at line 52 of file ../../src/graphics/display/drivers/coordinator/layer.h
void Layer (Layer && )
Defined at line 53 of file ../../src/graphics/display/drivers/coordinator/layer.h
Layer & operator= (const Layer & )
Defined at line 54 of file ../../src/graphics/display/drivers/coordinator/layer.h
Layer & operator= (Layer && )
Defined at line 55 of file ../../src/graphics/display/drivers/coordinator/layer.h
fbl::RefPtr<Image> committed_image ()
Defined at line 59 of file ../../src/graphics/display/drivers/coordinator/layer.h
void Layer (display::LayerId id)
`controller` must be non-null.
Defined at line 59 of file ../../src/graphics/display/drivers/coordinator/layer.cc
bool is_skipped ()
Defined at line 61 of file ../../src/graphics/display/drivers/coordinator/layer.h
bool in_use ()
Defined at line 68 of file ../../src/graphics/display/drivers/coordinator/layer.h
void ~Layer ()
Defined at line 70 of file ../../src/graphics/display/drivers/coordinator/layer.cc
const display::ImageMetadata & draft_image_metadata ()
Defined at line 73 of file ../../src/graphics/display/drivers/coordinator/layer.h
bool ResolveDraftLayerProperties ()
If the layer properties were changed in the draft configuration, this
retires all images as they are invalidated with layer properties change.
Defined at line 75 of file ../../src/graphics/display/drivers/coordinator/layer.cc
bool ResolveDraftImage (FenceCollection * fence, display::ConfigStamp stamp)
This sets up the fence and config stamp for pending images on this layer.
- If the layer image has a fence to wait before presentation, this prepares
the new fence and start async waiting for the fence.
- The layer's latest pending (waiting) image will be associated with the
client configuration |stamp|, as it reflects the latest configuration
state; this will overwrite all the previous stamp states for this image.
The stamp will be used later when display core integrates stamps of all
layers to determine the current frame state.
Returns false if there were any errors.
Defined at line 91 of file ../../src/graphics/display/drivers/coordinator/layer.cc
void CommitChanges ()
Set the committed layer configuration to the draft layer configuration.
Defined at line 116 of file ../../src/graphics/display/drivers/coordinator/layer.cc
void DiscardChanges ()
Set the draft layer configuration to the committed layer configuration.
This discards any changes in the draft layer configuration.
Defined at line 141 of file ../../src/graphics/display/drivers/coordinator/layer.cc
const display::DriverLayer & committed_driver_layer_config ()
Defined at line 145 of file ../../src/graphics/display/drivers/coordinator/layer.h
bool CleanUpAllImages ()
Removes references to all Images associated with this Layer.
Returns true if the committed config has been affected.
Defined at line 150 of file ../../src/graphics/display/drivers/coordinator/layer.cc
bool CleanUpImage (const Image & image)
Removes references to the provided Image. `image` must be valid.
Returns true if the committed config has been affected.
Defined at line 158 of file ../../src/graphics/display/drivers/coordinator/layer.cc
bool ActivateLatestReadyImage ()
If a new image is available, retire applied_image() and other pending images. Returns false if
no images were ready.
Defined at line 178 of file ../../src/graphics/display/drivers/coordinator/layer.cc
std::optional<display::ConfigStamp> GetCurrentClientConfigStamp ()
Get the stamp of configuration that is associated (at ResolveDraftImage)
with the image that is currently being displayed on the device.
If no image is being displayed on this layer, returns nullopt.
Defined at line 171 of file ../../src/graphics/display/drivers/coordinator/layer.cc
bool AppendToConfigLayerList (fbl::DoublyLinkedList<LayerNode *> & config_layer_list)
Adds the layer's draft config to a display configuration's layer list.
Returns true if the method succeeds. The layer's draft config is be at
the end of the display configuration's list of layer configs.
Returns false if the layer's draft config is already in a display
configuration's layer list. No changes are made.
Defined at line 219 of file ../../src/graphics/display/drivers/coordinator/layer.cc
void SetPrimaryConfig (display::ImageMetadata image_metadata)
Defined at line 228 of file ../../src/graphics/display/drivers/coordinator/layer.cc
void SetPrimaryPosition (display::CoordinateTransformation image_source_transformation, display::Rectangle image_source, display::Rectangle display_destination)
Defined at line 252 of file ../../src/graphics/display/drivers/coordinator/layer.cc
void SetPrimaryAlpha (display::AlphaMode alpha_mode, float alpha_coefficient)
Defined at line 269 of file ../../src/graphics/display/drivers/coordinator/layer.cc
void SetColorConfig (display::Color color, display::Rectangle display_destination)
Defined at line 284 of file ../../src/graphics/display/drivers/coordinator/layer.cc
void SetImage (fbl::RefPtr<Image> image_id, display::EventId wait_event_id)
Defined at line 305 of file ../../src/graphics/display/drivers/coordinator/layer.cc
bool MarkFenceReady (Fence & fence)
Called on all waiting images when any fence is signaled.
Returns true if an image is ready for use by the display engine.
Defined at line 310 of file ../../src/graphics/display/drivers/coordinator/layer.cc
bool HasWaitingImages ()
Returns true if the layer has any waiting images. An image transitions from "draft" to
"waiting" (in the context of a specific layer) when that layer appears in a committed config.
Defined at line 312 of file ../../src/graphics/display/drivers/coordinator/layer.cc
Friends
class LayerTest
class Client