18 sk_sp<DisplayList> display_list,
21 : offset_(offset), display_list_(
std::move(display_list)) {
23 bounds_ = display_list_->GetBounds().Shift(offset_.
x, offset_.
y);
26 display_list_,
ToSkPoint(offset_), is_complex, will_change);
32 const Layer* layer)
const {
37 return old_layer !=
nullptr && offset_ == old_layer->offset_ &&
38 Compare(
context->statistics(),
this, old_layer);
43 if (!
context->IsSubtreeDirty()) {
50 Compare(dummy_statistics,
this, prev));
54 if (
context->has_raster_cache()) {
55 context->WillPaintWithIntegralTransform();
58 context->SetLayerPaintRegion(
this,
context->CurrentSubtreeRegion());
64 const auto& dl1 = l1->display_list_;
65 const auto& dl2 = l2->display_list_;
66 if (dl1.get() == dl2.get()) {
70 const auto op_cnt_1 = dl1->op_count();
71 const auto op_cnt_2 = dl2->op_count();
72 const auto op_bytes_1 = dl1->bytes();
73 const auto op_bytes_2 = dl2->bytes();
74 if (op_cnt_1 != op_cnt_2 || op_bytes_1 != op_bytes_2 ||
75 dl1->GetBounds() != dl2->GetBounds()) {
87 auto res = dl1->Equals(*dl2);
101 context->state_stack.matrix());
113 auto mutator =
context.state_stack.save();
114 mutator.translate(offset_.
x, offset_.
y);
120 mutator.integralTransform();
122 if (display_list_raster_cache_item_) {
124 if (display_list_raster_cache_item_->Draw(
134 context.canvas->DrawDisplayList(display_list_, opacity);
void AddSameInstancePicture()
void AddPictureTooComplexToCompare()
void AddDifferentInstanceButEqualPicture()
void AddDeepComparePicture()
bool can_apply_group_opacity() const
DisplayListLayer(const DlPoint &offset, sk_sp< DisplayList > display_list, bool is_complex, bool will_change)
bool IsReplacing(DiffContext *context, const Layer *layer) const override
void Preroll(PrerollContext *frame) override
void Diff(DiffContext *context, const Layer *old_layer) override
DisplayList * display_list() const
static constexpr size_t kMaxBytesToCompare
void Paint(PaintContext &context) const override
static std::unique_ptr< DisplayListRasterCacheItem > Make(const sk_sp< DisplayList > &, const SkPoint &offset, bool is_complex, bool will_change)
void set_paint_bounds(const DlRect &paint_bounds)
bool needs_painting(PaintContext &context) const
virtual const DisplayListLayer * as_display_list_layer() const
static constexpr int kCallerCanApplyOpacity
#define FML_DCHECK(condition)
impeller::Scalar DlScalar
const SkPoint & ToSkPoint(const DlPoint &point)
std::shared_ptr< ContextGLES > context
static constexpr Matrix MakeTranslation(const Vector3 &t)
#define TRACE_EVENT_INSTANT0(category_group, name)