5#ifndef FLUTTER_DISPLAY_LIST_DISPLAY_LIST_H_
6#define FLUTTER_DISPLAY_LIST_DISPLAY_LIST_H_
55#define FOR_EACH_DISPLAY_LIST_OP(V) \
70 V(SetPodColorFilter) \
73 V(SetPodColorSource) \
74 V(SetImageColorSource) \
75 V(SetRuntimeEffectColorSource) \
78 V(SetPodImageFilter) \
79 V(SetSharedImageFilter) \
86 V(SaveLayerBackdrop) \
93 V(Transform2DAffine) \
94 V(TransformFullPerspective) \
97 V(ClipIntersectRect) \
98 V(ClipIntersectOval) \
99 V(ClipIntersectRoundRect) \
100 V(ClipIntersectRoundSuperellipse) \
101 V(ClipIntersectPath) \
102 V(ClipDifferenceRect) \
103 V(ClipDifferenceOval) \
104 V(ClipDifferenceRoundRect) \
105 V(ClipDifferenceRoundSuperellipse) \
106 V(ClipDifferencePath) \
117 V(DrawDiffRoundRect) \
118 V(DrawRoundSuperellipse) \
128 V(DrawImageWithAttr) \
131 V(DrawImageNineWithAttr) \
139 V(DrawShadowTransparentOccluder)
141#define DL_OP_TO_ENUM_VALUE(name) k##name,
149#undef DL_OP_TO_ENUM_VALUE
165class DisplayListBuilder;
279 size_t bytes(
bool nested =
true)
const {
281 (nested ? nested_byte_count_ : 0);
285 return op_count_ + (nested ? nested_op_count_ : 0);
295 sk_sp<const DlRTree>
rtree()
const {
return rtree_; }
299 bool Equals(
const sk_sp<const DisplayList>& other)
const {
300 return Equals(other.get());
316 return modifies_transparent_black_;
505 std::vector<size_t>&& offsets,
507 size_t nested_byte_count,
508 uint32_t nested_op_count,
512 bool is_ui_thread_safe,
517 sk_sp<const DlRTree>
rtree);
519 static uint32_t next_unique_id();
522 const std::vector<size_t>& offsets);
525 const std::vector<size_t> offsets_;
527 const uint32_t op_count_;
528 const size_t nested_byte_count_;
529 const uint32_t nested_op_count_;
531 const uint32_t total_depth_;
533 const uint32_t unique_id_;
536 const bool can_apply_group_opacity_;
537 const bool is_ui_thread_safe_;
538 const bool modifies_transparent_black_;
539 const bool root_has_backdrop_filter_;
540 const bool root_is_unbounded_;
543 const sk_sp<const DlRTree> rtree_;
545 void DispatchOneOp(
DlOpReceiver& receiver,
const uint8_t* ptr)
const;
547 void RTreeResultsToIndexVector(std::vector<DlIndex>& indices,
548 const std::vector<int>& rtree_results)
const;
Iterator utility class used for the |DisplayListbegin| and |DisplayListend| methods....
bool operator!=(const Iterator &other)
DlIndex operator*() const
DlIndex GetRecordCount() const
Return the number of stored records in the DisplayList.
bool Equals(const sk_sp< const DisplayList > &other) const
DisplayListOpType GetOpType(DlIndex index) const
Return an enum describing the specific op type stored at the indicated index.
bool root_has_backdrop_filter() const
Indicates if there are any saveLayer operations at the root surface level of the DisplayList that use...
bool Equals(const DisplayList &other) const
Iterator end() const
Return an iterator to the end of the stored records, enabling the iteration form of a for loop.
uint32_t unique_id() const
DisplayListOpCategory GetOpCategory(DlIndex index) const
Return an enum describing the general category of the operation record stored at the indicated index.
const DlRect & GetBounds() const
const DisplayListStorage & GetStorage() const
bool modifies_transparent_black() const
Indicates if there are any rendering operations in this DisplayList that will modify a surface of tra...
bool can_apply_group_opacity() const
DlBlendMode max_root_blend_mode() const
Indicates the maximum DlBlendMode used on any rendering op in the root surface of the DisplayList.
bool Equals(const DisplayList *other) const
bool root_is_unbounded() const
Indicates if a rendering operation at the root level of the DisplayList had an unbounded result,...
uint32_t total_depth() const
Iterator begin() const
Return an iterator to the start of the stored records, enabling the iteration form of a for loop.
size_t bytes(bool nested=true) const
bool isUIThreadSafe() const
uint32_t op_count(bool nested=false) const
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...
void Dispatch(DlOpReceiver &ctx) const
sk_sp< const DlRTree > rtree() const
size_t size() const
Returns the currently allocated size.
Internal API for rendering recorded display lists to backends.
bool content_is_clipped() const
SaveLayerOptions with_content_is_unbounded() const
static const SaveLayerOptions kNoAttributes
SaveLayerOptions with_renders_with_attributes() const
unsigned fContentIsUnbounded
SaveLayerOptions & operator=(const SaveLayerOptions &other)
unsigned fHasBackdropFilter
SaveLayerOptions with_can_distribute_opacity() const
bool renders_with_attributes() const
bool operator==(const SaveLayerOptions &other) const
SaveLayerOptions with_bounds_from_caller() const
SaveLayerOptions(const SaveLayerOptions *options)
bool bounds_from_caller() const
unsigned fContentIsClipped
bool content_is_unbounded() const
unsigned fBoundsFromCaller
bool bounds_were_calculated() const
SaveLayerOptions with_contains_backdrop_filter() const
SaveLayerOptions without_bounds_from_caller() const
static const SaveLayerOptions kWithAttributes
SaveLayerOptions without_optimizations() const
unsigned fRendersWithAttributes
bool contains_backdrop_filter() const
unsigned fCanDistributeOpacity
SaveLayerOptions with_content_is_clipped() const
SaveLayerOptions(const SaveLayerOptions &options)
bool can_distribute_opacity() const
#define FOR_EACH_DISPLAY_LIST_OP(V)
#define DL_OP_TO_ENUM_VALUE(name)