15 color_source_(
std::move(color_source)),
16 mask_rect_(mask_rect),
17 blend_mode_(blend_mode) {}
22 if (!
context->IsSubtreeDirty()) {
24 if (color_source_ != prev->color_source_ ||
25 mask_rect_ != prev->mask_rect_ || blend_mode_ != prev->blend_mode_) {
26 context->MarkSubtreeDirty(
context->GetOldLayerPaintRegion(old_layer));
29 if (
context->has_raster_cache()) {
30 context->WillPaintWithIntegralTransform();
34 context->SetLayerPaintRegion(
this,
context->CurrentSubtreeRegion());
53 auto mutator =
context.state_stack.save();
57 mutator.integralTransform();
61 context.state_stack.fill(paint))) {
78 context.canvas->DrawRect(shader_rect, dl_paint);
std::unique_ptr< LayerRasterCacheItem > layer_raster_cache_item_
void Preroll(PrerollContext *context) override
void PaintChildren(PaintContext &context) const override
virtual void DiffChildren(DiffContext *context, const ContainerLayer *old_layer)
DlPaint & setBlendMode(DlBlendMode mode)
DlPaint & setColorSource(std::nullptr_t source)
static AutoPrerollSaveLayerState Create(PrerollContext *preroll_context, bool save_layer_is_active=true, bool layer_itself_performs_readback=false)
static constexpr int kSaveLayerRenderFlags
bool needs_painting(PaintContext &context) const
const DlRect & paint_bounds() const
void Diff(DiffContext *context, const Layer *old_layer) override
ShaderMaskLayer(std::shared_ptr< DlColorSource > color_source, const DlRect &mask_rect, DlBlendMode blend_mode)
void Paint(PaintContext &context) const override
void Preroll(PrerollContext *context) override
#define FML_DCHECK(condition)
std::shared_ptr< ContextGLES > context
constexpr auto GetTop() const
constexpr TSize< Type > GetSize() const
Returns the size of the rectangle which may be negative in either width or height and may have been c...
constexpr auto GetLeft() const
static constexpr TRect MakeSize(const TSize< U > &size)