36 , fTileMode(tileMode) {
90 return this->cropRect(mapping).
relevantSubset(outputBounds, fTileMode);
157 buffer.writeInt(
static_cast<int32_t
>(fTileMode));
170 return childOutput.
applyCrop(context, this->cropRect(context.
mapping()), fTileMode);
189 return this->getChildInputLayerBounds(0, mapping, requiredInput, contentBounds);
192std::optional<skif::LayerSpace<SkIRect>> SkCropImageFilter::onGetOutputLayerBounds(
198 auto childOutput = this->getChildOutputLayerBounds(0, mapping, contentBounds);
201 if (childOutput && !crop.
intersect(*childOutput)) {
222 SkRect inputBounds = this->getInput(0) ? this->getInput(0)->computeFastBounds(
bounds) :
bounds;
void SkRegisterCropImageFilterFlattenable()
#define SK_FLATTENABLE_HOOKS(type)
#define SK_REGISTER_FLATTENABLE(type)
#define SK_IMAGEFILTER_UNFLATTEN_COMMON(localVar, expectedCount)
static bool SkIsValidRect(const SkRect &rect)
static void Register(const char name[], Factory)
virtual skif::LayerSpace< SkIRect > onGetInputLayerBounds(const skif::Mapping &mapping, const skif::LayerSpace< SkIRect > &desiredOutput, std::optional< skif::LayerSpace< SkIRect > > contentBounds) const =0
virtual bool onAffectsTransparentBlack() const
void flatten(SkWriteBuffer &) const override
virtual bool ignoreInputsAffectsTransparentBlack() const
virtual std::optional< skif::LayerSpace< SkIRect > > onGetOutputLayerBounds(const skif::Mapping &mapping, std::optional< skif::LayerSpace< SkIRect > > contentBounds) const =0
virtual skif::FilterResult onFilterImage(const skif::Context &context) const =0
virtual SkRect computeFastBounds(const SkRect &bounds) const
static sk_sp< SkImageFilter > Empty()
static sk_sp< SkImageFilter > Crop(const SkRect &rect, SkTileMode tileMode, sk_sp< SkImageFilter > input)
static sk_sp< SkImageFilter > Tile(const SkRect &src, const SkRect &dst, sk_sp< SkImageFilter > input)
@ kCropImageFilterSupportsTiling
static SkRect MakeLargeS32()
const LayerSpace< SkIRect > & desiredOutput() const
Context withNewDesiredOutput(const LayerSpace< SkIRect > &desiredOutput) const
const Mapping & mapping() const
FilterResult applyCrop(const Context &ctx, const LayerSpace< SkIRect > &crop, SkTileMode tileMode=SkTileMode::kDecal) const
bool intersect(const LayerSpace< SkIRect > &r)
LayerSpace< SkIRect > relevantSubset(const LayerSpace< SkIRect > dstRect, SkTileMode) const
LayerSpace< SkIRect > roundOut() const
LayerSpace< SkIRect > roundIn() const
LayerSpace< T > paramToLayer(const ParameterSpace< T > ¶mGeometry) const
Optional< SkRect > bounds
sk_sp< SkBlender > blender SkRect rect
SK_API sk_sp< SkShader > Empty()
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir Path to the cache directory This is different from the persistent_cache_path in embedder which is used for Skia shader cache icu native lib Path to the library file that exports the ICU data vm service The hostname IP address on which the Dart VM Service should be served If not defaults to or::depending on whether ipv6 is specified vm service A custom Dart VM Service port The default is to pick a randomly available open port disable vm Disable the Dart VM Service The Dart VM Service is never available in release mode disable vm service Disable mDNS Dart VM Service publication Bind to the IPv6 localhost address for the Dart VM Service Ignored if vm service host is set endless trace buffer
static constexpr SkRect MakeEmpty()
bool intersect(const SkRect &r)