5#ifndef FLUTTER_DISPLAY_LIST_DISPLAY_LIST_H_
6#define FLUTTER_DISPLAY_LIST_DISPLAY_LIST_H_
11#include "flutter/display_list/dl_blend_mode.h"
12#include "flutter/display_list/dl_sampling_options.h"
13#include "flutter/display_list/geometry/dl_rtree.h"
14#include "flutter/fml/logging.h"
58#define FOR_EACH_DISPLAY_LIST_OP(V) \
73 V(SetPodColorFilter) \
76 V(SetPodColorSource) \
77 V(SetImageColorSource) \
78 V(SetRuntimeEffectColorSource) \
81 V(SetPodImageFilter) \
82 V(SetSharedImageFilter) \
89 V(SaveLayerBackdrop) \
96 V(Transform2DAffine) \
97 V(TransformFullPerspective) \
100 V(ClipIntersectRect) \
101 V(ClipIntersectRRect) \
102 V(ClipIntersectPath) \
103 V(ClipDifferenceRect) \
104 V(ClipDifferenceRRect) \
105 V(ClipDifferencePath) \
126 V(DrawImageWithAttr) \
129 V(DrawImageNineWithAttr) \
138 V(DrawShadowTransparentOccluder)
140#define DL_OP_TO_ENUM_VALUE(name) k##name,
143#ifdef IMPELLER_ENABLE_3D
147#undef DL_OP_TO_ENUM_VALUE
150class DisplayListBuilder;
172 options.fRendersWithAttributes =
true;
179 options.fCanDistributeOpacity =
true;
189 options.fBoundsFromCaller =
true;
194 options.fBoundsFromCaller =
false;
206 options.fContentIsClipped =
true;
213 options.fHasBackdropFilter =
true;
247 uint8_t*
get() {
return ptr_.get(); }
249 const uint8_t*
get()
const {
return ptr_.get(); }
258 void operator()(uint8_t*
p) { std::free(
p); }
260 std::unique_ptr<uint8_t, FreeDeleter> ptr_;
281 size_t bytes(
bool nested =
true)
const {
283 (nested ? nested_byte_count_ : 0);
287 return op_count_ + (nested ? nested_op_count_ : 0);
318 return modifies_transparent_black_;
345 size_t nested_byte_count,
346 uint32_t nested_op_count,
350 bool is_ui_thread_safe,
356 static uint32_t next_unique_id();
358 static void DisposeOps(
const uint8_t* ptr,
const uint8_t* end);
361 const size_t byte_count_;
362 const uint32_t op_count_;
364 const size_t nested_byte_count_;
365 const uint32_t nested_op_count_;
367 const uint32_t total_depth_;
369 const uint32_t unique_id_;
372 const bool can_apply_group_opacity_;
373 const bool is_ui_thread_safe_;
374 const bool modifies_transparent_black_;
375 const bool root_has_backdrop_filter_;
void realloc(size_t count)
DisplayListStorage()=default
DisplayListStorage(DisplayListStorage &&)=default
const uint8_t * get() const
bool Equals(const sk_sp< const DisplayList > &other) const
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
const SkRect & bounds() const
uint32_t unique_id() 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
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)
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
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)
#define FML_CHECK(condition)
void * realloc(void *ptr, size_t size)