class SkCanvasPriv {
public: // The lattice has pointers directly into the readbuffer
[[nodiscard]] staticbool ReadLattice(SkReadBuffer&, SkCanvas::Lattice*);
// return the byte-size of the lattice, even if the buffer is null // storage must be 4-byte aligned static size_t WriteLattice(void* storage, const SkCanvas::Lattice&);
// The experimental_DrawEdgeAAImageSet API accepts separate dstClips and preViewMatrices arrays, // where entries refer into them, but no explicit size is provided. Given a set of entries, // computes the minimum length for these arrays that would provide index access errors. staticvoid GetDstClipAndMatrixCounts(const SkCanvas::ImageSetEntry set[], int count, int* totalDstClipCount, int* totalMatrixCount);
// Attempts to convert an image filter to its equivalent color filter, which if possible, // modifies the paint to compose the image filter's color filter into the paint's color filter // slot. // Returns true if the paint has been modified. // Requires the paint to have an image filter and the copy-on-write be initialized. staticbool ImageToColorFilter(SkPaint*);
};
/** *WeimplementImageFiltersandMaskFiltersforagivendrawbycreatingalayer,thenapplying *thefiltertothepixelsofthatlayer(itsbackingsurface/image),andthenwecallrestore() *toblendthatlayertothemaincanvas. * *Ifthepainthasneitheranimagefilternoramaskfilter,therewillbenolayerandpaint() *returnstheoriginalwithoutmodification. * *NOTE:ThisworksbyassumingallsourcesofcolorandshadingarerepresentedbytheSkPaint. *OperationslikedrawImageRectmustconverttoanequivalentdrawRectcallifthere'samask *filter,orotherwiseensuretherearenomaskfilters(e.g.drawAtlas).
*/ class AutoLayerForImageFilter {
public: // `rawBounds` is the original bounds of the primitive about to be drawn, unmodified by the // paint. It's used to determine the size of the offscreen layer for filters. // If null, the clip will be used instead. // // If `skipMaskFilterLayer` is true, any SkMaskFilter on `paint` will be left as-is and is // assumed to be handled by the SkDevice that handles the draw. // // Draw functions should use layer->paint() instead of the passed-in paint.
AutoLayerForImageFilter(SkCanvas* canvas, const SkPaint& paint, const SkRect* rawBounds, bool skipMaskFilterLayer);
// This is public so that a canvas can attempt to specially handle mask filters, specifically // for blurs, and then if the attempt fails fall back on a regular draw with the same autolayer. void addMaskFilterLayer(const SkRect* drawBounds);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.