10 const std::shared_ptr<DlImageFilter>& filter,
12 std::optional<int64_t> backdrop_id)
13 : filter_(filter), blend_mode_(blend_mode), backdrop_id_(backdrop_id) {}
18 if (!
context->IsSubtreeDirty()) {
21 context->MarkSubtreeDirty(
context->GetOldLayerPaintRegion(old_layer));
33 filter_->get_input_device_bounds(filter_target_bounds,
context->GetMatrix(),
35 context->AddReadbackRegion(filter_target_bounds, filter_input_bounds);
40 context->SetLayerPaintRegion(
this,
context->CurrentSubtreeRegion());
46 if (filter_ &&
context->view_embedder !=
nullptr) {
47 context->view_embedder->PushFilterToVisitedPlatformViews(
48 filter_,
context->state_stack.device_cull_rect());
61 auto mutator =
context.state_stack.save();
62 mutator.applyBackdropFilter(
paint_bounds(), filter_, blend_mode_,
void Preroll(PrerollContext *context) override
BackdropFilterLayer(const std::shared_ptr< DlImageFilter > &filter, DlBlendMode blend_mode, std::optional< int64_t > backdrop_id=std::nullopt)
void Paint(PaintContext &context) const override
void Diff(DiffContext *context, const Layer *old_layer) override
const DlRect & child_paint_bounds() const
void PrerollChildren(PrerollContext *context, DlRect *child_paint_bounds)
void PaintChildren(PaintContext &context) const override
virtual void DiffChildren(DiffContext *context, const ContainerLayer *old_layer)
static AutoPrerollSaveLayerState Create(PrerollContext *preroll_context, bool save_layer_is_active=true, bool layer_itself_performs_readback=false)
static constexpr int kSaveLayerRenderFlags
void set_paint_bounds(const DlRect &paint_bounds)
bool needs_painting(PaintContext &context) const
const DlRect & paint_bounds() const
#define FML_DCHECK(condition)
bool NotEquals(const T *a, const U *b)
std::shared_ptr< ContextGLES > context
constexpr TRect Union(const TRect &o) const
RoundOut(const TRect< U > &r)