#include <display_list.h>
Classes | |
| class | Iterator |
| Iterator utility class used for the |DisplayListbegin| and |DisplayListend| methods. It implements just the basic methods to enable iteration-style for loops. More... | |
Public Member Functions | |
| DisplayList () | |
| ~DisplayList () | |
| void | Dispatch (DlOpReceiver &ctx) const |
| void | Dispatch (DlOpReceiver &ctx, const DlRect &cull_rect) const |
| void | Dispatch (DlOpReceiver &ctx, const DlIRect &cull_rect) const |
| size_t | bytes (bool nested=true) const |
| uint32_t | op_count (bool nested=false) const |
| uint32_t | total_depth () const |
| uint32_t | unique_id () const |
| const DlRect & | GetBounds () const |
| bool | has_rtree () const |
| sk_sp< const DlRTree > | rtree () const |
| bool | Equals (const DisplayList *other) const |
| bool | Equals (const DisplayList &other) const |
| bool | Equals (const sk_sp< const DisplayList > &other) const |
| bool | can_apply_group_opacity () const |
| bool | isUIThreadSafe () const |
| bool | modifies_transparent_black () const |
| Indicates if there are any rendering operations in this DisplayList that will modify a surface of transparent black pixels. | |
| const DisplayListStorage & | GetStorage () const |
| bool | root_has_backdrop_filter () const |
| Indicates if there are any saveLayer operations at the root surface level of the DisplayList that use a backdrop filter. | |
| bool | root_is_unbounded () const |
| Indicates if a rendering operation at the root level of the DisplayList had an unbounded result, not otherwise limited by a clip operation. | |
| DlBlendMode | max_root_blend_mode () const |
| Indicates the maximum DlBlendMode used on any rendering op in the root surface of the DisplayList. | |
| DlIndex | GetRecordCount () const |
| Return the number of stored records in the DisplayList. | |
| Iterator | begin () const |
| Return an iterator to the start of the stored records, enabling the iteration form of a for loop. | |
| Iterator | end () const |
| Return an iterator to the end of the stored records, enabling the iteration form of a for loop. | |
| bool | Dispatch (DlOpReceiver &receiver, DlIndex index) const |
| Dispatch a single stored operation by its index. | |
| DisplayListOpType | GetOpType (DlIndex index) const |
| Return an enum describing the specific op type stored at the indicated index. | |
| DisplayListOpCategory | GetOpCategory (DlIndex index) const |
| Return an enum describing the general category of the operation record stored at the indicated index. | |
| std::vector< DlIndex > | GetCulledIndices (const DlRect &cull_rect) const |
| Return a vector of valid indices for records stored in the DisplayList that must be dispatched if you are restricted to the indicated cull_rect. | |
Static Public Member Functions | |
| static DisplayListOpCategory | GetOpCategory (DisplayListOpType type) |
| Return an enum describing the general category of the operation record with the given type. | |
Friends | |
| class | DisplayListBuilder |
Definition at line 266 of file display_list.h.
| flutter::DisplayList::DisplayList | ( | ) |
Definition at line 18 of file display_list.cc.
References FML_DCHECK, and flutter::DisplayListStorage::size().
Referenced by bytes().
| flutter::DisplayList::~DisplayList | ( | ) |
Definition at line 66 of file display_list.cc.
|
inline |
Return an iterator to the start of the stored records, enabling the iteration form of a for loop.
Each stored record represents a dispatchable operation that will be sent to a |DlOpReceiver| by the |Dispatch| method. You can directly simulate the |Dispatch| method using a simple for loop on the indices:
{ for (DlIndex i : *display_list) { display_list->Dispatch(my_receiver, i); } }
Definition at line 404 of file display_list.h.
|
inline |
Definition at line 279 of file display_list.h.
References DisplayList(), and flutter::DisplayListStorage::size().
|
inline |
Definition at line 303 of file display_list.h.
Referenced by flutter::DisplayListLayer::Preroll().
| void flutter::DisplayList::Dispatch | ( | DlOpReceiver & | ctx | ) | const |
Definition at line 182 of file display_list.cc.
References flutter::DisplayListStorage::base().
Referenced by flutter::DisplayListGLComplexityCalculator::Compute(), flutter::DisplayListMetalComplexityCalculator::Compute(), Dispatch(), Dispatch(), and std::operator<<().
| void flutter::DisplayList::Dispatch | ( | DlOpReceiver & | ctx, |
| const DlIRect & | cull_rect | ||
| ) | const |
Definition at line 189 of file display_list.cc.
References Dispatch(), and impeller::TRect< Scalar >::Make().
| void flutter::DisplayList::Dispatch | ( | DlOpReceiver & | ctx, |
| const DlRect & | cull_rect | ||
| ) | const |
Definition at line 194 of file display_list.cc.
References flutter::DisplayListStorage::base(), impeller::TRect< T >::Contains(), Dispatch(), GetBounds(), GetCulledIndices(), has_rtree(), and impeller::TRect< T >::IsEmpty().
| bool flutter::DisplayList::Dispatch | ( | DlOpReceiver & | receiver, |
| DlIndex | index | ||
| ) | const |
Dispatch a single stored operation by its index.
Each stored record represents a dispatchable operation that will be sent to a |DlOpReceiver| by the |Dispatch| method. You can use this method to dispatch a single operation to your receiver with an index between |0u| (inclusive) and |GetRecordCount()| (exclusive), as in:
{ for (DlIndex i = 0u; i < display_list->GetRecordCount(); i++) { display_list->Dispatch(my_receiver, i); } }
If the index is out of the range of the stored records, this method will not call any methods on the receiver and return false. You can check the return value for true if you want to make sure you are using valid indices.
Definition at line 385 of file display_list.cc.
References flutter::DisplayListStorage::base(), FML_DCHECK, and flutter::DisplayListStorage::size().
|
inline |
Return an iterator to the end of the stored records, enabling the iteration form of a for loop.
Each stored record represents a dispatchable operation that will be sent to a |DlOpReceiver| by the |Dispatch| method. You can directly simulate the |Dispatch| method using a simple for loop on the indices:
{ for (DlIndex i : *display_list) { display_list->Dispatch(my_receiver, i); } }
Definition at line 421 of file display_list.h.
|
inline |
Definition at line 298 of file display_list.h.
References Equals().
Referenced by Equals().
| bool flutter::DisplayList::Equals | ( | const DisplayList * | other | ) | const |
Definition at line 466 of file display_list.cc.
References flutter::DisplayListStorage::base(), flutter::CompareOps(), and flutter::DisplayListStorage::size().
Referenced by flutter::testing::DisplayListsEQ_Verbose(), flutter::testing::DisplayListsNE_Verbose(), and Equals().
|
inline |
Definition at line 299 of file display_list.h.
References Equals().
|
inline |
Definition at line 292 of file display_list.h.
Referenced by Dispatch(), and flutter::IsDisplayListWorthRasterizing().
Return a vector of valid indices for records stored in the DisplayList that must be dispatched if you are restricted to the indicated cull_rect.
This method can be used along with indexed dispatching to implement RTree culling while still maintaining control over planning of operations to be rendered, as in:
{ std::vector<DlIndex> indices = display_list->GetCulledIndices(cull-rect); for (DlIndex i : indices) { display_list->Dispatch(my_receiver, i); } }
The indices returned in the vector will automatically deal with including or culling related operations such as attributes, clips and transforms that will provide state for any rendering operations selected by the culling checks.
Definition at line 370 of file display_list.cc.
References flutter::FillAllIndices(), and impeller::TRect< T >::IsEmpty().
Referenced by Dispatch().
|
static |
Return an enum describing the general category of the operation record with the given type.
Definition at line 260 of file display_list.cc.
References flutter::kAttribute, flutter::kClip, flutter::kInvalidCategory, flutter::kInvalidOp, flutter::kRendering, flutter::kRestore, flutter::kSave, flutter::kSaveLayer, flutter::kSubDisplayList, flutter::kTransform, and type.
| DisplayListOpCategory flutter::DisplayList::GetOpCategory | ( | DlIndex | index | ) | const |
Return an enum describing the general category of the operation record stored at the indicated index.
The categories are general and stable and can be used fairly safely in production code to plan how to dispatch or reorder ops during final rendering.
Definition at line 256 of file display_list.cc.
References GetOpCategory(), and GetOpType().
Referenced by GetOpCategory(), and flutter::testing::DisplayListGeneralReceiver::RecordByType().
| DisplayListOpType flutter::DisplayList::GetOpType | ( | DlIndex | index | ) | const |
Return an enum describing the specific op type stored at the indicated index.
The specific types of the records are subject to change without notice as the DisplayList code is developed and optimized. These values are useful mostly for debugging purposes and should not be used in production code.
Definition at line 349 of file display_list.cc.
References flutter::DisplayListStorage::base(), FML_DCHECK, flutter::kInvalidOp, flutter::DisplayListStorage::size(), and flutter::DLOp::type.
Referenced by GetOpCategory().
|
inline |
Return the number of stored records in the DisplayList.
Each stored record represents a dispatchable operation that will be sent to a |DlOpReceiver| by the |Dispatch| method. You can directly simulate the |Dispatch| method using a simple for loop on the indices:
{ for (DlIndex i = 0u; i < display_list->GetRecordCount(); i++) { display_list->Dispatch(my_receiver, i); } }
Definition at line 387 of file display_list.h.
|
inline |
Definition at line 319 of file display_list.h.
|
inline |
Definition at line 294 of file display_list.h.
Referenced by Dispatch().
|
inline |
Definition at line 304 of file display_list.h.
|
inline |
Indicates the maximum DlBlendMode used on any rendering op in the root surface of the DisplayList.
This condition can be used to determine what kind of surface to create for the root layer into which to render the DisplayList as some GPUs can support surfaces that do or do not support the readback that would be required for the indicated blend mode to do its work.
Definition at line 349 of file display_list.h.
|
inline |
Indicates if there are any rendering operations in this DisplayList that will modify a surface of transparent black pixels.
This condition can be used to determine whether to create a cleared surface, render a DisplayList into it, and then composite the result into a scene. It is not uncommon for code in the engine to come across such degenerate DisplayList objects when slicing up a frame between platform views.
Definition at line 315 of file display_list.h.
|
inline |
Definition at line 284 of file display_list.h.
Referenced by flutter::DisplayListNaiveComplexityCalculator::Compute().
|
inline |
Indicates if there are any saveLayer operations at the root surface level of the DisplayList that use a backdrop filter.
This condition can be used to determine what kind of surface to create for the root layer into which to render the DisplayList as some GPUs can support surfaces that do or do not support the readback that would be required for the backdrop filter to do its work.
Definition at line 328 of file display_list.h.
|
inline |
Indicates if a rendering operation at the root level of the DisplayList had an unbounded result, not otherwise limited by a clip operation.
This condition can occur in a number of situations. The most common situation is when there is a drawPaint or drawColor rendering operation which fills out the entire drawable surface unless it is bounded by a clip. Other situations include an operation rendered through an ImageFilter that cannot compute the resulting bounds or when an unclipped backdrop filter is applied by a save layer.
Definition at line 340 of file display_list.h.
|
inline |
Definition at line 295 of file display_list.h.
|
inline |
Definition at line 288 of file display_list.h.
|
inline |
Definition at line 290 of file display_list.h.
|
friend |
Definition at line 550 of file display_list.h.