31 , fShader(
std::move(
sh)) {
48 , fShader(
std::move(shader)) {
65 fShader = std::move(
sh);
73 fShader->revalidate(ic, ctm);
105 , fImageFilter(
std::move(filter)) {
117 fImageFilter->setCropRect(content_bounds);
119 fImageFilter->setCropRect(std::nullopt);
123 fImageFilter->revalidate(ic, ctm);
125 const auto& filter = fImageFilter->getFilter();
131 return filter ? filter->computeFastBounds(content_bounds)
144 const auto filter_ctx =
147 fImageFilter->getFilter());
162ExternalImageFilter:: ExternalImageFilter() =
default;
169DropShadowImageFilter::DropShadowImageFilter()
177 fColor,
nullptr, this->getCropRect());
180 fColor,
nullptr, this->getCropRect());
188BlurImageFilter::BlurImageFilter()
206 , fBlender (
std::move(blender)) {}
232void LayerEffect::onRender(
SkCanvas* canvas,
const RenderContext* ctx)
const {
236 const auto local_ctx = ScopedRenderContext(canvas, ctx).setIsolation(this->
bounds(),
247 canvas->
saveLayer(
nullptr, &layer_paint);
#define INHERITED(method,...)
int saveLayer(const SkRect *bounds, const SkPaint *paint)
SkMatrix getTotalMatrix() const
static sk_sp< SkImageFilter > DropShadow(SkScalar dx, SkScalar dy, SkScalar sigmaX, SkScalar sigmaY, SkColor color, sk_sp< SkImageFilter > input, const CropRect &cropRect={})
static sk_sp< SkImageFilter > DropShadowOnly(SkScalar dx, SkScalar dy, SkScalar sigmaX, SkScalar sigmaY, SkColor color, sk_sp< SkImageFilter > input, const CropRect &cropRect={})
static sk_sp< SkImageFilter > Blur(SkScalar sigmaX, SkScalar sigmaY, SkTileMode tileMode, sk_sp< SkImageFilter > input, const CropRect &cropRect={})
void setBlendMode(SkBlendMode mode)
void onRender(SkCanvas *, const RenderContext *) const override
const RenderNode * onNodeAt(const SkPoint &) const override
static sk_sp< BlenderEffect > Make(sk_sp< RenderNode > child, sk_sp< SkBlender >=nullptr)
~BlenderEffect() override
~BlurImageFilter() override
static sk_sp< BlurImageFilter > Make()
sk_sp< SkImageFilter > onRevalidateFilter() override
static sk_sp< DropShadowImageFilter > Make()
~DropShadowImageFilter() override
sk_sp< SkImageFilter > onRevalidateFilter() override
const sk_sp< RenderNode > & getChild() const
const RenderNode * onNodeAt(const SkPoint &) const override
void onRender(SkCanvas *, const RenderContext *) const override
SkRect onRevalidate(InvalidationController *, const SkMatrix &) override
~ExternalImageFilter() override
const RenderNode * onNodeAt(const SkPoint &) const override
SkRect onRevalidate(InvalidationController *, const SkMatrix &) override
~ImageFilterEffect() override
static sk_sp< RenderNode > Make(sk_sp< RenderNode > child, sk_sp< ImageFilter > filter)
void onRender(SkCanvas *, const RenderContext *) const override
SkRect onRevalidate(InvalidationController *, const SkMatrix &) final
virtual sk_sp< SkImageFilter > onRevalidateFilter()=0
static sk_sp< LayerEffect > Make(sk_sp< RenderNode > child, SkBlendMode mode=SkBlendMode::kSrcOver)
static sk_sp< MaskShaderEffect > Make(sk_sp< RenderNode >, sk_sp< SkShader >=nullptr)
void onRender(SkCanvas *, const RenderContext *) const override
void observeInval(const sk_sp< Node > &)
void unobserveInval(const sk_sp< Node > &)
const SkRect & bounds() const
ScopedRenderContext && setFilterIsolation(const SkRect &bounds, const SkMatrix &ctm, sk_sp< SkImageFilter >)
ScopedRenderContext && modulateMaskShader(sk_sp< SkShader >, const SkMatrix &ms_ctm)
ScopedRenderContext && modulateBlender(sk_sp< SkBlender >)
ScopedRenderContext && modulateShader(sk_sp< SkShader >, const SkMatrix &shader_ctm)
friend class ImageFilterEffect
SkRect onRevalidate(InvalidationController *, const SkMatrix &) override
void setShader(sk_sp< Shader >)
static sk_sp< ShaderEffect > Make(sk_sp< RenderNode > child, sk_sp< Shader > shader=nullptr)
void onRender(SkCanvas *, const RenderContext *) const override
SkRect onRevalidate(InvalidationController *, const SkMatrix &) final
virtual sk_sp< SkShader > onRevalidateShader()=0
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive mode
constexpr bool contains(std::string_view str, std::string_view needle)
constexpr float y() const
constexpr float x() const
static constexpr SkRect MakeEmpty()