Flutter Engine
The Flutter Engine
|
#include <SkLocalMatrixImageFilter.h>
Public Member Functions | |
SkRect | computeFastBounds (const SkRect &) const override |
Public Member Functions inherited from SkImageFilter_Base | |
skif::FilterResult | filterImage (const skif::Context &context) const |
sk_sp< SkImage > | makeImageWithFilter (sk_sp< skif::Backend > backend, sk_sp< SkImage > src, const SkIRect &subset, const SkIRect &clipBounds, SkIRect *outSubset, SkIPoint *offset) const |
skif::LayerSpace< SkIRect > | getInputBounds (const skif::Mapping &mapping, const skif::DeviceSpace< SkIRect > &desiredOutput, std::optional< skif::ParameterSpace< SkRect > > knownContentBounds) const |
std::optional< skif::DeviceSpace< SkIRect > > | getOutputBounds (const skif::Mapping &mapping, const skif::ParameterSpace< SkRect > &contentBounds) const |
bool | affectsTransparentBlack () const |
bool | usesSource () const |
MatrixCapability | getCTMCapability () const |
uint32_t | uniqueID () const |
SkFlattenable::Type | getFlattenableType () const override |
Public Member Functions inherited from SkImageFilter | |
SkIRect | filterBounds (const SkIRect &src, const SkMatrix &ctm, MapDirection, const SkIRect *inputRect=nullptr) const |
bool | isColorFilterNode (SkColorFilter **filterPtr) const |
bool | asColorFilter (SkColorFilter **filterPtr) const |
bool | asAColorFilter (SkColorFilter **filterPtr) const |
int | countInputs () const |
const SkImageFilter * | getInput (int i) const |
bool | canComputeFastBounds () const |
sk_sp< SkImageFilter > | makeWithLocalMatrix (const SkMatrix &matrix) const |
Public Member Functions inherited from SkFlattenable | |
SkFlattenable () | |
virtual Factory | getFactory () const =0 |
virtual const char * | getTypeName () const =0 |
sk_sp< SkData > | serialize (const SkSerialProcs *=nullptr) const |
size_t | serialize (void *memory, size_t memory_size, const SkSerialProcs *=nullptr) const |
Public Member Functions inherited from SkRefCntBase | |
SkRefCntBase () | |
virtual | ~SkRefCntBase () |
bool | unique () const |
void | ref () const |
void | unref () const |
Static Public Member Functions | |
static sk_sp< SkImageFilter > | Make (const SkMatrix &localMatrix, sk_sp< SkImageFilter > input) |
Static Public Member Functions inherited from SkImageFilter_Base | |
static SkFlattenable::Type | GetFlattenableType () |
static std::pair< sk_sp< SkImageFilter >, std::optional< SkRect > > | Unflatten (SkReadBuffer &buffer) |
Static Public Member Functions inherited from SkImageFilter | |
static sk_sp< SkImageFilter > | Deserialize (const void *data, size_t size, const SkDeserialProcs *procs=nullptr) |
Static Public Member Functions inherited from SkFlattenable | |
static Factory | NameToFactory (const char name[]) |
static const char * | FactoryToName (Factory) |
static void | Register (const char name[], Factory) |
static sk_sp< SkFlattenable > | Deserialize (Type, const void *data, size_t length, const SkDeserialProcs *procs=nullptr) |
Protected Member Functions | |
void | flatten (SkWriteBuffer &) const override |
Protected Member Functions inherited from SkImageFilter_Base | |
SkImageFilter_Base (sk_sp< SkImageFilter > const *inputs, int inputCount, std::optional< bool > usesSrc={}) | |
~SkImageFilter_Base () override | |
skif::LayerSpace< SkIRect > | getChildInputLayerBounds (int index, const skif::Mapping &mapping, const skif::LayerSpace< SkIRect > &desiredOutput, std::optional< skif::LayerSpace< SkIRect > > contentBounds) const |
std::optional< skif::LayerSpace< SkIRect > > | getChildOutputLayerBounds (int index, const skif::Mapping &mapping, std::optional< skif::LayerSpace< SkIRect > > contentBounds) const |
skif::FilterResult | getChildOutput (int index, const skif::Context &ctx) const |
Protected Member Functions inherited from SkImageFilter | |
sk_sp< SkImageFilter > | refMe () const |
Private Member Functions | |
MatrixCapability | onGetCTMCapability () const override |
skif::FilterResult | onFilterImage (const skif::Context &ctx) const override |
skif::LayerSpace< SkIRect > | onGetInputLayerBounds (const skif::Mapping &, const skif::LayerSpace< SkIRect > &desiredOutput, std::optional< skif::LayerSpace< SkIRect > > contentBounds) const override |
std::optional< skif::LayerSpace< SkIRect > > | onGetOutputLayerBounds (const skif::Mapping &, std::optional< skif::LayerSpace< SkIRect > > contentBounds) const override |
Additional Inherited Members | |
Public Types inherited from SkImageFilter_Base | |
using | MatrixCapability = skif::MatrixCapability |
Public Types inherited from SkImageFilter | |
enum | MapDirection { kForward_MapDirection , kReverse_MapDirection } |
Public Types inherited from SkFlattenable | |
enum | Type { kSkColorFilter_Type , kSkBlender_Type , kSkDrawable_Type , kSkDrawLooper_Type , kSkImageFilter_Type , kSkMaskFilter_Type , kSkPathEffect_Type , kSkShader_Type } |
typedef sk_sp< SkFlattenable >(* | Factory) (SkReadBuffer &) |
Wraps another imagefilter + matrix, such that using this filter will give the same result as using the wrapped filter with the matrix applied to its context.
Definition at line 28 of file SkLocalMatrixImageFilter.h.
Reimplemented from SkImageFilter.
Definition at line 81 of file SkLocalMatrixImageFilter.cpp.
|
overrideprotectedvirtual |
Override this if your subclass needs to record data that it will need to recreate itself from its CreateProc (returned by getFactory()).
DEPRECATED public : will move to protected ... use serialize() instead
Reimplemented from SkImageFilter_Base.
Definition at line 45 of file SkLocalMatrixImageFilter.cpp.
|
static |
Definition at line 14 of file SkLocalMatrixImageFilter.cpp.
|
overrideprivatevirtual |
This is the virtual which should be overridden by the derived class to perform image filtering. Subclasses are responsible for recursing to their input filters, although the filterInput() function is provided to handle all necessary details of this.
If the image cannot be created (either because of an error or if the result would be empty because it was clipped out), this should return a filtered Image with a null SkSpecialImage. In these situations, callers that do not affect transparent black can end early, since the "transparent" implicit image would be unchanged. Callers that affect transparent black need to safely handle these null and empty images and return an image filling the context's clip bounds as if its input filtered image were transparent black.
Implements SkImageFilter_Base.
Definition at line 59 of file SkLocalMatrixImageFilter.cpp.
|
inlineoverrideprivatevirtual |
Return the most complex matrix type this filter can support (mapping from its parameter space to a layer space). If this returns anything less than kComplex, the filter only needs to worry about mapping from parameter to layer using a matrix that is constrained in that way (eg, scale+translate).
Reimplemented from SkImageFilter_Base.
Definition at line 47 of file SkLocalMatrixImageFilter.h.
|
overrideprivatevirtual |
Calculates the necessary input layer size in order for the final output of the filter to cover the desired output bounds. The provided 'desiredOutput' represents the requested input bounds for this node's parent filter node, i.e. this function answers "what does this node require for input in order to satisfy (as its own output), the input needs of its parent?".
'contentBounds' represents the bounds of the non-transparent content that will form the source image when the filter graph is invoked. If it's not instantiated, implementations should treat the content as extending infinitely. However, since the output is known and bounded, implementations should still be able to determine a finite input bounds under these circumstances.
Unlike the public getInputBounds(), all internal bounds calculations are done in the shared layer space defined by 'mapping'.
Implements SkImageFilter_Base.
Definition at line 64 of file SkLocalMatrixImageFilter.cpp.
|
overrideprivatevirtual |
Calculates the output bounds that this filter node would touch when processing an input sized to 'contentBounds'. This function is responsible for recursing to its child image filters and accounting for what they output. It is up to the filter to determine how to aggregate the outputs of its children.
'contentBounds' represents the bounds of the non-transparent content that will form the source image when the filter graph is invoked. If it's not instantiated, implementations should treat the content as extending infinitely. However, since the output is known and bounded, implementations should still be able to determine a finite input bounds under these circumstances.
If the non-transparent output extends infinitely, subclasses should return an uninstantiated optional. Implementations must also be able to handle when their children return such unbounded "outputs" and react accordingly.
Unlike the public getOutputBounds(), all internal bounds calculations are done in the shared layer space defined by 'mapping'.
Implements SkImageFilter_Base.
Definition at line 75 of file SkLocalMatrixImageFilter.cpp.