5#ifndef FLUTTER_DISPLAY_LIST_DISPLAY_LIST_H_
6#define FLUTTER_DISPLAY_LIST_DISPLAY_LIST_H_
11#include "flutter/display_list/dl_sampling_options.h"
12#include "flutter/display_list/geometry/dl_rtree.h"
13#include "flutter/fml/logging.h"
57#define FOR_EACH_DISPLAY_LIST_OP(V) \
75 V(SetPodColorFilter) \
78 V(SetPodColorSource) \
79 V(SetImageColorSource) \
80 V(SetRuntimeEffectColorSource) \
83 V(SetPodImageFilter) \
84 V(SetSharedImageFilter) \
91 V(SaveLayerBackdrop) \
98 V(Transform2DAffine) \
99 V(TransformFullPerspective) \
102 V(ClipIntersectRect) \
103 V(ClipIntersectRRect) \
104 V(ClipIntersectPath) \
105 V(ClipDifferenceRect) \
106 V(ClipDifferenceRRect) \
107 V(ClipDifferencePath) \
127 V(DrawImageWithAttr) \
130 V(DrawImageNineWithAttr) \
139 V(DrawShadowTransparentOccluder)
141#define DL_OP_TO_ENUM_VALUE(name) k##name,
144#ifdef IMPELLER_ENABLE_3D
148#undef DL_OP_TO_ENUM_VALUE
151class DisplayListBuilder;
173 options.fRendersWithAttributes =
true;
180 options.fCanDistributeOpacity =
true;
190 options.fBoundsFromCaller =
true;
195 options.fBoundsFromCaller =
false;
207 options.fContentIsClipped =
true;
240 uint8_t*
get()
const {
return ptr_.get(); }
243 ptr_.reset(
static_cast<uint8_t*
>(std::realloc(ptr_.release(),
count)));
249 void operator()(uint8_t* p) { std::free(p); }
251 std::unique_ptr<uint8_t, FreeDeleter> ptr_;
272 size_t bytes(
bool nested =
true)
const {
274 (nested ? nested_byte_count_ : 0);
278 return op_count_ + (nested ? nested_op_count_ : 0);
309 return modifies_transparent_black_;
316 size_t nested_byte_count,
317 uint32_t nested_op_count,
321 bool is_ui_thread_safe,
325 static uint32_t next_unique_id();
327 static void DisposeOps(uint8_t* ptr, uint8_t*
end);
330 const size_t byte_count_;
331 const uint32_t op_count_;
333 const size_t nested_byte_count_;
334 const uint32_t nested_op_count_;
336 const uint32_t total_depth_;
338 const uint32_t unique_id_;
341 const bool can_apply_group_opacity_;
342 const bool is_ui_thread_safe_;
343 const bool modifies_transparent_black_;
void realloc(size_t count)
DisplayListStorage()=default
DisplayListStorage(DisplayListStorage &&)=default
bool Equals(const sk_sp< const DisplayList > &other) const
bool Equals(const DisplayList &other) const
const SkRect & bounds() const
uint32_t unique_id() 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
bool Equals(const DisplayList *other) const
uint32_t total_depth() const
size_t bytes(bool nested=true) const
bool isUIThreadSafe() const
uint32_t op_count(bool nested=false) const
void Dispatch(DlOpReceiver &ctx) const
sk_sp< const DlRTree > rtree() const
Internal API for rendering recorded display lists to backends.
bool content_is_clipped() const
bool operator!=(const SaveLayerOptions &other) const
static const SaveLayerOptions kNoAttributes
SaveLayerOptions with_renders_with_attributes() const
SaveLayerOptions & operator=(const SaveLayerOptions &other)
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
unsigned fBoundsFromCaller
bool bounds_were_calculated() const
SaveLayerOptions without_bounds_from_caller() const
static const SaveLayerOptions kWithAttributes
SaveLayerOptions without_optimizations() const
unsigned fRendersWithAttributes
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)
#define FML_CHECK(condition)