Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
SkRecorder Class Referencefinal

#include <SkRecorder.h>

Inheritance diagram for SkRecorder:
SkCanvasVirtualEnforcer< SkNoDrawCanvas > SkNoDrawCanvas SkCanvasVirtualEnforcer< SkCanvas > SkCanvas

Public Member Functions

 SkRecorder (SkRecord *, int width, int height)
 
 SkRecorder (SkRecord *, const SkRect &bounds)
 
void reset (SkRecord *, const SkRect &bounds)
 
size_t approxBytesUsedBySubPictures () const
 
SkDrawableListgetDrawableList () const
 
std::unique_ptr< SkDrawableListdetachDrawableList ()
 
void forgetRecord ()
 
void willSave () override
 
SaveLayerStrategy getSaveLayerStrategy (const SaveLayerRec &) override
 
bool onDoSaveBehind (const SkRect *) override
 
void willRestore () override
 
void didRestore () override
 
void didConcat44 (const SkM44 &) override
 
void didSetM44 (const SkM44 &) override
 
void didScale (SkScalar, SkScalar) override
 
void didTranslate (SkScalar, SkScalar) override
 
void onDrawDRRect (const SkRRect &, const SkRRect &, const SkPaint &) override
 
void onDrawDrawable (SkDrawable *, const SkMatrix *) override
 
void onDrawTextBlob (const SkTextBlob *blob, SkScalar x, SkScalar y, const SkPaint &paint) override
 
void onDrawSlug (const sktext::gpu::Slug *slug, const SkPaint &paint) override
 
void onDrawGlyphRunList (const sktext::GlyphRunList &glyphRunList, const SkPaint &paint) override
 
void onDrawPatch (const SkPoint cubics[12], const SkColor colors[4], const SkPoint texCoords[4], SkBlendMode, const SkPaint &paint) override
 
void onDrawPaint (const SkPaint &) override
 
void onDrawBehind (const SkPaint &) override
 
void onDrawPoints (PointMode, size_t count, const SkPoint pts[], const SkPaint &) override
 
void onDrawRect (const SkRect &, const SkPaint &) override
 
void onDrawRegion (const SkRegion &, const SkPaint &) override
 
void onDrawOval (const SkRect &, const SkPaint &) override
 
void onDrawArc (const SkRect &, SkScalar, SkScalar, bool, const SkPaint &) override
 
void onDrawRRect (const SkRRect &, const SkPaint &) override
 
void onDrawPath (const SkPath &, const SkPaint &) override
 
void onDrawImage2 (const SkImage *, SkScalar, SkScalar, const SkSamplingOptions &, const SkPaint *) override
 
void onDrawImageRect2 (const SkImage *, const SkRect &, const SkRect &, const SkSamplingOptions &, const SkPaint *, SrcRectConstraint) override
 
void onDrawImageLattice2 (const SkImage *, const Lattice &, const SkRect &, SkFilterMode, const SkPaint *) override
 
void onDrawAtlas2 (const SkImage *, const SkRSXform[], const SkRect[], const SkColor[], int, SkBlendMode, const SkSamplingOptions &, const SkRect *, const SkPaint *) override
 
void onDrawVerticesObject (const SkVertices *, SkBlendMode, const SkPaint &) override
 
void onDrawMesh (const SkMesh &, sk_sp< SkBlender >, const SkPaint &) override
 
void onDrawShadowRec (const SkPath &, const SkDrawShadowRec &) override
 
void onClipRect (const SkRect &rect, SkClipOp, ClipEdgeStyle) override
 
void onClipRRect (const SkRRect &rrect, SkClipOp, ClipEdgeStyle) override
 
void onClipPath (const SkPath &path, SkClipOp, ClipEdgeStyle) override
 
void onClipShader (sk_sp< SkShader >, SkClipOp) override
 
void onClipRegion (const SkRegion &deviceRgn, SkClipOp) override
 
void onResetClip () override
 
void onDrawPicture (const SkPicture *, const SkMatrix *, const SkPaint *) override
 
void onDrawAnnotation (const SkRect &, const char[], SkData *) override
 
void onDrawEdgeAAQuad (const SkRect &, const SkPoint[4], QuadAAFlags, const SkColor4f &, SkBlendMode) override
 
void onDrawEdgeAAImageSet2 (const ImageSetEntry[], int count, const SkPoint[], const SkMatrix[], const SkSamplingOptions &, const SkPaint *, SrcRectConstraint) override
 
sk_sp< SkSurfaceonNewSurface (const SkImageInfo &, const SkSurfaceProps &) override
 
template<typename T , typename... Args>
void append (Args &&... args)
 
template<>
char * copy (const char src[], size_t count)
 
template<>
char * copy (const char *src)
 
- Public Member Functions inherited from SkNoDrawCanvas
 SkNoDrawCanvas (int width, int height)
 
 SkNoDrawCanvas (const SkIRect &)
 
void resetCanvas (int w, int h)
 
void resetCanvas (const SkIRect &rect)
 
- Public Member Functions inherited from SkCanvas
 SkCanvas ()
 
 SkCanvas (int width, int height, const SkSurfaceProps *props=nullptr)
 
 SkCanvas (sk_sp< SkDevice > device)
 
 SkCanvas (const SkBitmap &bitmap)
 
 SkCanvas (const SkBitmap &bitmap, const SkSurfaceProps &props)
 
virtual ~SkCanvas ()
 
SkImageInfo imageInfo () const
 
bool getProps (SkSurfaceProps *props) const
 
SkSurfaceProps getBaseProps () const
 
SkSurfaceProps getTopProps () const
 
virtual SkISize getBaseLayerSize () const
 
sk_sp< SkSurfacemakeSurface (const SkImageInfo &info, const SkSurfaceProps *props=nullptr)
 
virtual GrRecordingContextrecordingContext () const
 
virtual skgpu::graphite::Recorderrecorder () const
 
SkSurfacegetSurface () const
 
void * accessTopLayerPixels (SkImageInfo *info, size_t *rowBytes, SkIPoint *origin=nullptr)
 
SkRasterHandleAllocator::Handle accessTopRasterHandle () const
 
bool peekPixels (SkPixmap *pixmap)
 
bool readPixels (const SkImageInfo &dstInfo, void *dstPixels, size_t dstRowBytes, int srcX, int srcY)
 
bool readPixels (const SkPixmap &pixmap, int srcX, int srcY)
 
bool readPixels (const SkBitmap &bitmap, int srcX, int srcY)
 
bool writePixels (const SkImageInfo &info, const void *pixels, size_t rowBytes, int x, int y)
 
bool writePixels (const SkBitmap &bitmap, int x, int y)
 
int save ()
 
int saveLayer (const SkRect *bounds, const SkPaint *paint)
 
int saveLayer (const SkRect &bounds, const SkPaint *paint)
 
int saveLayerAlphaf (const SkRect *bounds, float alpha)
 
int saveLayerAlpha (const SkRect *bounds, U8CPU alpha)
 
int saveLayer (const SaveLayerRec &layerRec)
 
void restore ()
 
int getSaveCount () const
 
void restoreToCount (int saveCount)
 
void translate (SkScalar dx, SkScalar dy)
 
void scale (SkScalar sx, SkScalar sy)
 
void rotate (SkScalar degrees)
 
void rotate (SkScalar degrees, SkScalar px, SkScalar py)
 
void skew (SkScalar sx, SkScalar sy)
 
void concat (const SkMatrix &matrix)
 
void concat (const SkM44 &)
 
void setMatrix (const SkM44 &matrix)
 
void setMatrix (const SkMatrix &matrix)
 
void resetMatrix ()
 
void clipRect (const SkRect &rect, SkClipOp op, bool doAntiAlias)
 
void clipRect (const SkRect &rect, SkClipOp op)
 
void clipRect (const SkRect &rect, bool doAntiAlias=false)
 
void clipIRect (const SkIRect &irect, SkClipOp op=SkClipOp::kIntersect)
 
void androidFramework_setDeviceClipRestriction (const SkIRect &rect)
 
void clipRRect (const SkRRect &rrect, SkClipOp op, bool doAntiAlias)
 
void clipRRect (const SkRRect &rrect, SkClipOp op)
 
void clipRRect (const SkRRect &rrect, bool doAntiAlias=false)
 
void clipPath (const SkPath &path, SkClipOp op, bool doAntiAlias)
 
void clipPath (const SkPath &path, SkClipOp op)
 
void clipPath (const SkPath &path, bool doAntiAlias=false)
 
void clipShader (sk_sp< SkShader >, SkClipOp=SkClipOp::kIntersect)
 
void clipRegion (const SkRegion &deviceRgn, SkClipOp op=SkClipOp::kIntersect)
 
bool quickReject (const SkRect &rect) const
 
bool quickReject (const SkPath &path) const
 
SkRect getLocalClipBounds () const
 
bool getLocalClipBounds (SkRect *bounds) const
 
SkIRect getDeviceClipBounds () const
 
bool getDeviceClipBounds (SkIRect *bounds) const
 
void drawColor (SkColor color, SkBlendMode mode=SkBlendMode::kSrcOver)
 
void drawColor (const SkColor4f &color, SkBlendMode mode=SkBlendMode::kSrcOver)
 
void clear (SkColor color)
 
void clear (const SkColor4f &color)
 
void discard ()
 
void drawPaint (const SkPaint &paint)
 
void drawPoints (PointMode mode, size_t count, const SkPoint pts[], const SkPaint &paint)
 
void drawPoint (SkScalar x, SkScalar y, const SkPaint &paint)
 
void drawPoint (SkPoint p, const SkPaint &paint)
 
void drawLine (SkScalar x0, SkScalar y0, SkScalar x1, SkScalar y1, const SkPaint &paint)
 
void drawLine (SkPoint p0, SkPoint p1, const SkPaint &paint)
 
void drawRect (const SkRect &rect, const SkPaint &paint)
 
void drawIRect (const SkIRect &rect, const SkPaint &paint)
 
void drawRegion (const SkRegion &region, const SkPaint &paint)
 
void drawOval (const SkRect &oval, const SkPaint &paint)
 
void drawRRect (const SkRRect &rrect, const SkPaint &paint)
 
void drawDRRect (const SkRRect &outer, const SkRRect &inner, const SkPaint &paint)
 
void drawCircle (SkScalar cx, SkScalar cy, SkScalar radius, const SkPaint &paint)
 
void drawCircle (SkPoint center, SkScalar radius, const SkPaint &paint)
 
void drawArc (const SkRect &oval, SkScalar startAngle, SkScalar sweepAngle, bool useCenter, const SkPaint &paint)
 
void drawArc (const SkArc &arc, const SkPaint &paint)
 
void drawRoundRect (const SkRect &rect, SkScalar rx, SkScalar ry, const SkPaint &paint)
 
void drawPath (const SkPath &path, const SkPaint &paint)
 
void drawImage (const SkImage *image, SkScalar left, SkScalar top)
 
void drawImage (const sk_sp< SkImage > &image, SkScalar left, SkScalar top)
 
void drawImage (const SkImage *, SkScalar x, SkScalar y, const SkSamplingOptions &, const SkPaint *=nullptr)
 
void drawImage (const sk_sp< SkImage > &image, SkScalar x, SkScalar y, const SkSamplingOptions &sampling, const SkPaint *paint=nullptr)
 
void drawImageRect (const SkImage *, const SkRect &src, const SkRect &dst, const SkSamplingOptions &, const SkPaint *, SrcRectConstraint)
 
void drawImageRect (const SkImage *, const SkRect &dst, const SkSamplingOptions &, const SkPaint *=nullptr)
 
void drawImageRect (const sk_sp< SkImage > &image, const SkRect &src, const SkRect &dst, const SkSamplingOptions &sampling, const SkPaint *paint, SrcRectConstraint constraint)
 
void drawImageRect (const sk_sp< SkImage > &image, const SkRect &dst, const SkSamplingOptions &sampling, const SkPaint *paint=nullptr)
 
void drawImageNine (const SkImage *image, const SkIRect &center, const SkRect &dst, SkFilterMode filter, const SkPaint *paint=nullptr)
 
void drawImageLattice (const SkImage *image, const Lattice &lattice, const SkRect &dst, SkFilterMode filter, const SkPaint *paint=nullptr)
 
void drawImageLattice (const SkImage *image, const Lattice &lattice, const SkRect &dst)
 
void experimental_DrawEdgeAAQuad (const SkRect &rect, const SkPoint clip[4], QuadAAFlags aaFlags, const SkColor4f &color, SkBlendMode mode)
 
void experimental_DrawEdgeAAQuad (const SkRect &rect, const SkPoint clip[4], QuadAAFlags aaFlags, SkColor color, SkBlendMode mode)
 
void experimental_DrawEdgeAAImageSet (const ImageSetEntry imageSet[], int cnt, const SkPoint dstClips[], const SkMatrix preViewMatrices[], const SkSamplingOptions &, const SkPaint *paint=nullptr, SrcRectConstraint constraint=kStrict_SrcRectConstraint)
 
void drawSimpleText (const void *text, size_t byteLength, SkTextEncoding encoding, SkScalar x, SkScalar y, const SkFont &font, const SkPaint &paint)
 
void drawString (const char str[], SkScalar x, SkScalar y, const SkFont &font, const SkPaint &paint)
 
void drawString (const SkString &str, SkScalar x, SkScalar y, const SkFont &font, const SkPaint &paint)
 
void drawGlyphs (int count, const SkGlyphID glyphs[], const SkPoint positions[], const uint32_t clusters[], int textByteCount, const char utf8text[], SkPoint origin, const SkFont &font, const SkPaint &paint)
 
void drawGlyphs (int count, const SkGlyphID glyphs[], const SkPoint positions[], SkPoint origin, const SkFont &font, const SkPaint &paint)
 
void drawGlyphs (int count, const SkGlyphID glyphs[], const SkRSXform xforms[], SkPoint origin, const SkFont &font, const SkPaint &paint)
 
void drawTextBlob (const SkTextBlob *blob, SkScalar x, SkScalar y, const SkPaint &paint)
 
void drawTextBlob (const sk_sp< SkTextBlob > &blob, SkScalar x, SkScalar y, const SkPaint &paint)
 
void drawPicture (const SkPicture *picture)
 
void drawPicture (const sk_sp< SkPicture > &picture)
 
void drawPicture (const SkPicture *picture, const SkMatrix *matrix, const SkPaint *paint)
 
void drawPicture (const sk_sp< SkPicture > &picture, const SkMatrix *matrix, const SkPaint *paint)
 
void drawVertices (const SkVertices *vertices, SkBlendMode mode, const SkPaint &paint)
 
void drawVertices (const sk_sp< SkVertices > &vertices, SkBlendMode mode, const SkPaint &paint)
 
void drawMesh (const SkMesh &mesh, sk_sp< SkBlender > blender, const SkPaint &paint)
 
void drawPatch (const SkPoint cubics[12], const SkColor colors[4], const SkPoint texCoords[4], SkBlendMode mode, const SkPaint &paint)
 
void drawAtlas (const SkImage *atlas, const SkRSXform xform[], const SkRect tex[], const SkColor colors[], int count, SkBlendMode mode, const SkSamplingOptions &sampling, const SkRect *cullRect, const SkPaint *paint)
 
void drawDrawable (SkDrawable *drawable, const SkMatrix *matrix=nullptr)
 
void drawDrawable (SkDrawable *drawable, SkScalar x, SkScalar y)
 
void drawAnnotation (const SkRect &rect, const char key[], SkData *value)
 
void drawAnnotation (const SkRect &rect, const char key[], const sk_sp< SkData > &value)
 
virtual bool isClipEmpty () const
 
virtual bool isClipRect () const
 
SkM44 getLocalToDevice () const
 
SkMatrix getLocalToDeviceAs3x3 () const
 
SkMatrix getTotalMatrix () const
 
void temporary_internal_getRgnClip (SkRegion *region)
 
void private_draw_shadow_rec (const SkPath &, const SkDrawShadowRec &)
 

Additional Inherited Members

- Public Types inherited from SkCanvas
enum  SaveLayerFlagsSet { kPreserveLCDText_SaveLayerFlag = 1 << 1 , kInitWithPrevious_SaveLayerFlag = 1 << 2 , kF16ColorType = 1 << 4 }
 
enum  PointMode { kPoints_PointMode , kLines_PointMode , kPolygon_PointMode }
 
enum  SrcRectConstraint { kStrict_SrcRectConstraint , kFast_SrcRectConstraint }
 
enum  QuadAAFlags : unsigned {
  kLeft_QuadAAFlag = 0b0001 , kTop_QuadAAFlag = 0b0010 , kRight_QuadAAFlag = 0b0100 , kBottom_QuadAAFlag = 0b1000 ,
  kNone_QuadAAFlags = 0b0000 , kAll_QuadAAFlags = 0b1111
}
 
using SaveLayerFlags = uint32_t
 
using FilterSpan = SkSpan< sk_sp< SkImageFilter > >
 
- Static Public Member Functions inherited from SkCanvas
static std::unique_ptr< SkCanvasMakeRasterDirect (const SkImageInfo &info, void *pixels, size_t rowBytes, const SkSurfaceProps *props=nullptr)
 
static std::unique_ptr< SkCanvasMakeRasterDirectN32 (int width, int height, SkPMColor *pixels, size_t rowBytes)
 
- Static Public Attributes inherited from SkCanvas
static constexpr int kMaxFiltersPerLayer = 16
 
- Protected Types inherited from SkCanvas
enum  SaveLayerStrategy { kFullLayer_SaveLayerStrategy , kNoLayer_SaveLayerStrategy }
 
enum  ClipEdgeStyle { kHard_ClipEdgeStyle , kSoft_ClipEdgeStyle }
 
- Protected Member Functions inherited from SkCanvasVirtualEnforcer< SkNoDrawCanvas >
void onDrawPaint (const SkPaint &paint) override=0
 
void onDrawBehind (const SkPaint &) override
 
void onDrawRect (const SkRect &rect, const SkPaint &paint) override=0
 
void onDrawRRect (const SkRRect &rrect, const SkPaint &paint) override=0
 
void onDrawDRRect (const SkRRect &outer, const SkRRect &inner, const SkPaint &paint) override=0
 
void onDrawOval (const SkRect &rect, const SkPaint &paint) override=0
 
void onDrawArc (const SkRect &rect, SkScalar startAngle, SkScalar sweepAngle, bool useCenter, const SkPaint &paint) override=0
 
void onDrawPath (const SkPath &path, const SkPaint &paint) override=0
 
void onDrawRegion (const SkRegion &region, const SkPaint &paint) override=0
 
void onDrawTextBlob (const SkTextBlob *blob, SkScalar x, SkScalar y, const SkPaint &paint) override=0
 
void onDrawPatch (const SkPoint cubics[12], const SkColor colors[4], const SkPoint texCoords[4], SkBlendMode mode, const SkPaint &paint) override=0
 
void onDrawPoints (SkCanvas::PointMode mode, size_t count, const SkPoint pts[], const SkPaint &paint) override=0
 
void onDrawEdgeAAQuad (const SkRect &rect, const SkPoint clip[4], SkCanvas::QuadAAFlags aaFlags, const SkColor4f &color, SkBlendMode mode) override=0
 
void onDrawAnnotation (const SkRect &rect, const char key[], SkData *value) override=0
 
void onDrawShadowRec (const SkPath &, const SkDrawShadowRec &) override=0
 
void onDrawDrawable (SkDrawable *drawable, const SkMatrix *matrix) override=0
 
void onDrawPicture (const SkPicture *picture, const SkMatrix *matrix, const SkPaint *paint) override=0
 
SaveLayerStrategy getSaveLayerStrategy (const SaveLayerRec &rec) override
 
bool onDoSaveBehind (const SkRect *) override
 
void onDrawAnnotation (const SkRect &, const char[], SkData *) override
 
void onDrawDRRect (const SkRRect &, const SkRRect &, const SkPaint &) override
 
void onDrawDrawable (SkDrawable *, const SkMatrix *) override
 
void onDrawTextBlob (const SkTextBlob *, SkScalar, SkScalar, const SkPaint &) override
 
void onDrawPatch (const SkPoint[12], const SkColor[4], const SkPoint[4], SkBlendMode, const SkPaint &) override
 
void onDrawPaint (const SkPaint &) override
 
void onDrawBehind (const SkPaint &) override
 
void onDrawPoints (PointMode, size_t, const SkPoint[], const SkPaint &) override
 
void onDrawRect (const SkRect &, const SkPaint &) override
 
void onDrawRegion (const SkRegion &, const SkPaint &) override
 
void onDrawOval (const SkRect &, const SkPaint &) override
 
void onDrawArc (const SkRect &, SkScalar, SkScalar, bool, const SkPaint &) override
 
void onDrawRRect (const SkRRect &, const SkPaint &) override
 
void onDrawPath (const SkPath &, const SkPaint &) override
 
void onDrawImage2 (const SkImage *, SkScalar, SkScalar, const SkSamplingOptions &, const SkPaint *) override
 
void onDrawImageRect2 (const SkImage *, const SkRect &, const SkRect &, const SkSamplingOptions &, const SkPaint *, SrcRectConstraint) override
 
void onDrawImageLattice2 (const SkImage *, const Lattice &, const SkRect &, SkFilterMode, const SkPaint *) override
 
void onDrawAtlas2 (const SkImage *, const SkRSXform[], const SkRect[], const SkColor[], int, SkBlendMode, const SkSamplingOptions &, const SkRect *, const SkPaint *) override
 
void onDrawVerticesObject (const SkVertices *, SkBlendMode, const SkPaint &) override
 
void onDrawShadowRec (const SkPath &, const SkDrawShadowRec &) override
 
void onDrawPicture (const SkPicture *, const SkMatrix *, const SkPaint *) override
 
void onDrawEdgeAAQuad (const SkRect &, const SkPoint[4], QuadAAFlags, const SkColor4f &, SkBlendMode) override
 
void onDrawEdgeAAImageSet2 (const ImageSetEntry[], int, const SkPoint[], const SkMatrix[], const SkSamplingOptions &, const SkPaint *, SrcRectConstraint) override
 
void onDrawPaint (const SkPaint &paint) override=0
 
void onDrawBehind (const SkPaint &) override
 
void onDrawRect (const SkRect &rect, const SkPaint &paint) override=0
 
void onDrawRRect (const SkRRect &rrect, const SkPaint &paint) override=0
 
void onDrawDRRect (const SkRRect &outer, const SkRRect &inner, const SkPaint &paint) override=0
 
void onDrawOval (const SkRect &rect, const SkPaint &paint) override=0
 
void onDrawArc (const SkRect &rect, SkScalar startAngle, SkScalar sweepAngle, bool useCenter, const SkPaint &paint) override=0
 
void onDrawPath (const SkPath &path, const SkPaint &paint) override=0
 
void onDrawRegion (const SkRegion &region, const SkPaint &paint) override=0
 
void onDrawTextBlob (const SkTextBlob *blob, SkScalar x, SkScalar y, const SkPaint &paint) override=0
 
void onDrawPatch (const SkPoint cubics[12], const SkColor colors[4], const SkPoint texCoords[4], SkBlendMode mode, const SkPaint &paint) override=0
 
void onDrawPoints (SkCanvas::PointMode mode, size_t count, const SkPoint pts[], const SkPaint &paint) override=0
 
void onDrawEdgeAAQuad (const SkRect &rect, const SkPoint clip[4], SkCanvas::QuadAAFlags aaFlags, const SkColor4f &color, SkBlendMode mode) override=0
 
void onDrawAnnotation (const SkRect &rect, const char key[], SkData *value) override=0
 
void onDrawShadowRec (const SkPath &, const SkDrawShadowRec &) override=0
 
void onDrawDrawable (SkDrawable *drawable, const SkMatrix *matrix) override=0
 
void onDrawPicture (const SkPicture *picture, const SkMatrix *matrix, const SkPaint *paint) override=0
 
- Protected Member Functions inherited from SkCanvas
virtual sk_sp< SkSurfaceonNewSurface (const SkImageInfo &info, const SkSurfaceProps &props)
 
virtual bool onPeekPixels (SkPixmap *pixmap)
 
virtual bool onAccessTopLayerPixels (SkPixmap *pixmap)
 
virtual SkImageInfo onImageInfo () const
 
virtual bool onGetProps (SkSurfaceProps *props, bool top) const
 
virtual void willSave ()
 
virtual SaveLayerStrategy getSaveLayerStrategy (const SaveLayerRec &)
 
virtual bool onDoSaveBehind (const SkRect *)
 
virtual void willRestore ()
 
virtual void didRestore ()
 
virtual void didConcat44 (const SkM44 &)
 
virtual void didSetM44 (const SkM44 &)
 
virtual void didTranslate (SkScalar, SkScalar)
 
virtual void didScale (SkScalar, SkScalar)
 
virtual void onDrawPaint (const SkPaint &paint)
 
virtual void onDrawBehind (const SkPaint &paint)
 
virtual void onDrawRect (const SkRect &rect, const SkPaint &paint)
 
virtual void onDrawRRect (const SkRRect &rrect, const SkPaint &paint)
 
virtual void onDrawDRRect (const SkRRect &outer, const SkRRect &inner, const SkPaint &paint)
 
virtual void onDrawOval (const SkRect &rect, const SkPaint &paint)
 
virtual void onDrawArc (const SkRect &rect, SkScalar startAngle, SkScalar sweepAngle, bool useCenter, const SkPaint &paint)
 
virtual void onDrawPath (const SkPath &path, const SkPaint &paint)
 
virtual void onDrawRegion (const SkRegion &region, const SkPaint &paint)
 
virtual void onDrawTextBlob (const SkTextBlob *blob, SkScalar x, SkScalar y, const SkPaint &paint)
 
virtual void onDrawGlyphRunList (const sktext::GlyphRunList &glyphRunList, const SkPaint &paint)
 
virtual void onDrawPatch (const SkPoint cubics[12], const SkColor colors[4], const SkPoint texCoords[4], SkBlendMode mode, const SkPaint &paint)
 
virtual void onDrawPoints (PointMode mode, size_t count, const SkPoint pts[], const SkPaint &paint)
 
virtual void onDrawImage2 (const SkImage *, SkScalar dx, SkScalar dy, const SkSamplingOptions &, const SkPaint *)
 
virtual void onDrawImageRect2 (const SkImage *, const SkRect &src, const SkRect &dst, const SkSamplingOptions &, const SkPaint *, SrcRectConstraint)
 
virtual void onDrawImageLattice2 (const SkImage *, const Lattice &, const SkRect &dst, SkFilterMode, const SkPaint *)
 
virtual void onDrawAtlas2 (const SkImage *, const SkRSXform[], const SkRect src[], const SkColor[], int count, SkBlendMode, const SkSamplingOptions &, const SkRect *cull, const SkPaint *)
 
virtual void onDrawEdgeAAImageSet2 (const ImageSetEntry imageSet[], int count, const SkPoint dstClips[], const SkMatrix preViewMatrices[], const SkSamplingOptions &, const SkPaint *, SrcRectConstraint)
 
virtual void onDrawVerticesObject (const SkVertices *vertices, SkBlendMode mode, const SkPaint &paint)
 
virtual void onDrawMesh (const SkMesh &, sk_sp< SkBlender >, const SkPaint &)
 
virtual void onDrawAnnotation (const SkRect &rect, const char key[], SkData *value)
 
virtual void onDrawShadowRec (const SkPath &, const SkDrawShadowRec &)
 
virtual void onDrawDrawable (SkDrawable *drawable, const SkMatrix *matrix)
 
virtual void onDrawPicture (const SkPicture *picture, const SkMatrix *matrix, const SkPaint *paint)
 
virtual void onDrawEdgeAAQuad (const SkRect &rect, const SkPoint clip[4], QuadAAFlags aaFlags, const SkColor4f &color, SkBlendMode mode)
 
virtual void onClipRect (const SkRect &rect, SkClipOp op, ClipEdgeStyle edgeStyle)
 
virtual void onClipRRect (const SkRRect &rrect, SkClipOp op, ClipEdgeStyle edgeStyle)
 
virtual void onClipPath (const SkPath &path, SkClipOp op, ClipEdgeStyle edgeStyle)
 
virtual void onClipShader (sk_sp< SkShader >, SkClipOp)
 
virtual void onClipRegion (const SkRegion &deviceRgn, SkClipOp op)
 
virtual void onResetClip ()
 
virtual void onDiscard ()
 
virtual sk_sp< sktext::gpu::SlugonConvertGlyphRunListToSlug (const sktext::GlyphRunList &glyphRunList, const SkPaint &paint)
 
virtual void onDrawSlug (const sktext::gpu::Slug *slug, const SkPaint &paint)
 
 SkCanvas (const SkIRect &bounds)
 

Detailed Description

Definition at line 77 of file SkRecorder.h.

Constructor & Destructor Documentation

◆ SkRecorder() [1/2]

SkRecorder::SkRecorder ( SkRecord record,
int  width,
int  height 
)

Definition at line 94 of file SkRecorder.cpp.

96 , fApproxBytesUsedBySubPictures(0)
97 , fRecord(record) {
98 SkASSERT(this->imageInfo().width() >= 0 && this->imageInfo().height() >= 0);
99}
#define SkASSERT(cond)
Definition: SkAssert.h:116
SkImageInfo imageInfo() const
Definition: SkCanvas.cpp:1206
int32_t height
int32_t width

◆ SkRecorder() [2/2]

SkRecorder::SkRecorder ( SkRecord record,
const SkRect bounds 
)

Definition at line 101 of file SkRecorder.cpp.

103 , fApproxBytesUsedBySubPictures(0)
104 , fRecord(record) {
105 SkASSERT(this->imageInfo().width() >= 0 && this->imageInfo().height() >= 0);
106}
static SkIRect safe_picture_bounds(const SkRect &bounds)
Definition: SkRecorder.cpp:80
Optional< SkRect > bounds
Definition: SkRecords.h:189

Member Function Documentation

◆ append()

template<typename T , typename... Args>
void SkRecorder::append ( Args &&...  args)

Definition at line 123 of file SkRecorder.cpp.

123 {
124 new (fRecord->append<T>()) T{std::forward<Args>(args)...};
125}
T * append()
Definition: SkRecord.h:72
G_BEGIN_DECLS G_MODULE_EXPORT FlValue * args
#define T
Definition: precompiler.cc:65

◆ approxBytesUsedBySubPictures()

size_t SkRecorder::approxBytesUsedBySubPictures ( ) const
inline

Definition at line 85 of file SkRecorder.h.

85{ return fApproxBytesUsedBySubPictures; }

◆ copy() [1/2]

template<>
char * SkRecorder::copy ( const char *  src)

Definition at line 169 of file SkRecorder.cpp.

169 {
170 return this->copy(src, strlen(src)+1);
171}
Definition: copy.py:1

◆ copy() [2/2]

template<>
char * SkRecorder::copy ( const char  src[],
size_t  count 
)

Definition at line 158 of file SkRecorder.cpp.

158 {
159 if (nullptr == src) {
160 return nullptr;
161 }
162 char* dst = fRecord->alloc<char>(count);
163 memcpy(dst, src, count);
164 return dst;
165}
int count
Definition: FontMgrTest.cpp:50
T * alloc(size_t count=1)
Definition: SkRecord.h:61
dst
Definition: cp.py:12

◆ detachDrawableList()

std::unique_ptr< SkDrawableList > SkRecorder::detachDrawableList ( )
inline

Definition at line 88 of file SkRecorder.h.

88{ return std::move(fDrawableList); }

◆ didConcat44()

void SkRecorder::didConcat44 ( const SkM44 m)
overridevirtual

Reimplemented from SkCanvas.

Definition at line 367 of file SkRecorder.cpp.

367 {
368 this->append<SkRecords::Concat44>(m);
369}

◆ didRestore()

void SkRecorder::didRestore ( )
overridevirtual

Reimplemented from SkCanvas.

Definition at line 363 of file SkRecorder.cpp.

363 {
364 this->append<SkRecords::Restore>(this->getTotalMatrix());
365}
SkMatrix getTotalMatrix() const
Definition: SkCanvas.cpp:1629

◆ didScale()

void SkRecorder::didScale ( SkScalar  sx,
SkScalar  sy 
)
overridevirtual

Reimplemented from SkCanvas.

Definition at line 375 of file SkRecorder.cpp.

375 {
376 this->append<SkRecords::Scale>(sx, sy);
377}

◆ didSetM44()

void SkRecorder::didSetM44 ( const SkM44 m)
overridevirtual

Reimplemented from SkCanvas.

Definition at line 371 of file SkRecorder.cpp.

371 {
372 this->append<SkRecords::SetM44>(m);
373}

◆ didTranslate()

void SkRecorder::didTranslate ( SkScalar  dx,
SkScalar  dy 
)
overridevirtual

Reimplemented from SkCanvas.

Definition at line 379 of file SkRecorder.cpp.

379 {
380 this->append<SkRecords::Translate>(dx, dy);
381}
skia_private::AutoTArray< sk_sp< SkImageFilter > > filters TypedMatrix matrix TypedMatrix matrix SkScalar dx
Definition: SkRecords.h:208

◆ forgetRecord()

void SkRecorder::forgetRecord ( )

Definition at line 115 of file SkRecorder.cpp.

115 {
116 fDrawableList.reset(nullptr);
117 fApproxBytesUsedBySubPictures = 0;
118 fRecord = nullptr;
119}

◆ getDrawableList()

SkDrawableList * SkRecorder::getDrawableList ( ) const
inline

Definition at line 87 of file SkRecorder.h.

87{ return fDrawableList.get(); }

◆ getSaveLayerStrategy()

SkCanvas::SaveLayerStrategy SkRecorder::getSaveLayerStrategy ( const SaveLayerRec rec)
overridevirtual

Reimplemented from SkNoDrawCanvas.

Definition at line 343 of file SkRecorder.cpp.

343 {
344 AutoTArray<sk_sp<SkImageFilter>> filters(rec.fFilters.size());
345 for (size_t i = 0; i < rec.fFilters.size(); ++i) {
346 filters[i] = rec.fFilters[i];
347 }
348
349 this->append<SkRecords::SaveLayer>(this->copy(rec.fBounds),
350 this->copy(rec.fPaint),
351 sk_ref_sp(rec.fBackdrop),
352 rec.fSaveLayerFlags,
354 std::move(filters));
356}
sk_sp< T > sk_ref_sp(T *obj)
Definition: SkRefCnt.h:381
static SkScalar GetBackdropScaleFactor(const SkCanvas::SaveLayerRec &rec)
Definition: SkCanvasPriv.h:85
@ kNoLayer_SaveLayerStrategy
Definition: SkCanvas.h:2265

◆ onClipPath()

void SkRecorder::onClipPath ( const SkPath path,
SkClipOp  op,
ClipEdgeStyle  edgeStyle 
)
overridevirtual

Reimplemented from SkCanvas.

Definition at line 395 of file SkRecorder.cpp.

395 {
396 INHERITED(onClipPath, path, op, edgeStyle);
397 SkRecords::ClipOpAndAA opAA(op, kSoft_ClipEdgeStyle == edgeStyle);
398 this->append<SkRecords::ClipPath>(path, opAA);
399}
#define INHERITED(method,...)
Definition: SkRecorder.cpp:128
@ kSoft_ClipEdgeStyle
Definition: SkCanvas.h:2337
void onClipPath(const SkPath &path, SkClipOp, ClipEdgeStyle) override
Definition: SkRecorder.cpp:395
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
Definition: switches.h:57

◆ onClipRect()

void SkRecorder::onClipRect ( const SkRect rect,
SkClipOp  op,
ClipEdgeStyle  edgeStyle 
)
overridevirtual

Reimplemented from SkCanvas.

Definition at line 383 of file SkRecorder.cpp.

383 {
384 INHERITED(onClipRect, rect, op, edgeStyle);
385 SkRecords::ClipOpAndAA opAA(op, kSoft_ClipEdgeStyle == edgeStyle);
386 this->append<SkRecords::ClipRect>(rect, opAA);
387}
void onClipRect(const SkRect &rect, SkClipOp, ClipEdgeStyle) override
Definition: SkRecorder.cpp:383
sk_sp< SkBlender > blender SkRect rect
Definition: SkRecords.h:350

◆ onClipRegion()

void SkRecorder::onClipRegion ( const SkRegion deviceRgn,
SkClipOp  op 
)
overridevirtual

Reimplemented from SkCanvas.

Definition at line 406 of file SkRecorder.cpp.

406 {
407 INHERITED(onClipRegion, deviceRgn, op);
408 this->append<SkRecords::ClipRegion>(deviceRgn, op);
409}
void onClipRegion(const SkRegion &deviceRgn, SkClipOp) override
Definition: SkRecorder.cpp:406

◆ onClipRRect()

void SkRecorder::onClipRRect ( const SkRRect rrect,
SkClipOp  op,
ClipEdgeStyle  edgeStyle 
)
overridevirtual

Reimplemented from SkCanvas.

Definition at line 389 of file SkRecorder.cpp.

389 {
390 INHERITED(onClipRRect, rrect, op, edgeStyle);
391 SkRecords::ClipOpAndAA opAA(op, kSoft_ClipEdgeStyle == edgeStyle);
392 this->append<SkRecords::ClipRRect>(rrect, opAA);
393}
void onClipRRect(const SkRRect &rrect, SkClipOp, ClipEdgeStyle) override
Definition: SkRecorder.cpp:389
SkRRect rrect
Definition: SkRecords.h:232

◆ onClipShader()

void SkRecorder::onClipShader ( sk_sp< SkShader cs,
SkClipOp  op 
)
overridevirtual

Reimplemented from SkCanvas.

Definition at line 401 of file SkRecorder.cpp.

401 {
402 INHERITED(onClipShader, cs, op);
403 this->append<SkRecords::ClipShader>(std::move(cs), op);
404}
void onClipShader(sk_sp< SkShader >, SkClipOp) override
Definition: SkRecorder.cpp:401

◆ onDoSaveBehind()

bool SkRecorder::onDoSaveBehind ( const SkRect subset)
overridevirtual

Reimplemented from SkNoDrawCanvas.

Definition at line 358 of file SkRecorder.cpp.

358 {
359 this->append<SkRecords::SaveBehind>(this->copy(subset));
360 return false;
361}

◆ onDrawAnnotation()

void SkRecorder::onDrawAnnotation ( const SkRect rect,
const char  key[],
SkData value 
)
overridevirtual

Implements SkCanvasVirtualEnforcer< SkNoDrawCanvas >.

Definition at line 312 of file SkRecorder.cpp.

312 {
313 this->append<SkRecords::DrawAnnotation>(rect, SkString(key), sk_ref_sp(value));
314}
uint8_t value

◆ onDrawArc()

void SkRecorder::onDrawArc ( const SkRect oval,
SkScalar  startAngle,
SkScalar  sweepAngle,
bool  useCenter,
const SkPaint paint 
)
overridevirtual

Implements SkCanvasVirtualEnforcer< SkNoDrawCanvas >.

Definition at line 200 of file SkRecorder.cpp.

201 {
202 this->append<SkRecords::DrawArc>(paint, oval, startAngle, sweepAngle, useCenter);
203}
const Paint & paint
Definition: color_source.cc:38
SkRect oval
Definition: SkRecords.h:249
SkScalar startAngle
Definition: SkRecords.h:250
SkScalar sweepAngle
Definition: SkRecords.h:251

◆ onDrawAtlas2()

void SkRecorder::onDrawAtlas2 ( const SkImage atlas,
const SkRSXform  xform[],
const SkRect  tex[],
const SkColor  colors[],
int  count,
SkBlendMode  mode,
const SkSamplingOptions sampling,
const SkRect cull,
const SkPaint paint 
)
overridevirtual

Reimplemented from SkNoDrawCanvas.

Definition at line 293 of file SkRecorder.cpp.

296 {
297 this->append<SkRecords::DrawAtlas>(this->copy(paint),
299 this->copy(xform, count),
300 this->copy(tex, count),
301 this->copy(colors, count),
302 count,
303 mode,
304 sampling,
305 this->copy(cull));
306}
sk_sp< const SkImage > atlas
Definition: SkRecords.h:331
PODArray< SkColor > colors
Definition: SkRecords.h:276
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
Definition: switches.h:228

◆ onDrawBehind()

void SkRecorder::onDrawBehind ( const SkPaint paint)
overridevirtual

Reimplemented from SkNoDrawCanvas.

Definition at line 177 of file SkRecorder.cpp.

177 {
178 this->append<SkRecords::DrawBehind>(paint);
179}

◆ onDrawDrawable()

void SkRecorder::onDrawDrawable ( SkDrawable drawable,
const SkMatrix matrix 
)
overridevirtual

Implements SkCanvasVirtualEnforcer< SkNoDrawCanvas >.

Definition at line 213 of file SkRecorder.cpp.

213 {
214 if (!fDrawableList) {
215 fDrawableList = std::make_unique<SkDrawableList>();
216 }
217 fDrawableList->append(drawable);
218 this->append<SkRecords::DrawDrawable>(this->copy(matrix), drawable->getBounds(), fDrawableList->count() - 1);
219}
SkRect getBounds()
Definition: SkDrawable.cpp:71

◆ onDrawDRRect()

void SkRecorder::onDrawDRRect ( const SkRRect outer,
const SkRRect inner,
const SkPaint paint 
)
overridevirtual

Implements SkCanvasVirtualEnforcer< SkNoDrawCanvas >.

Definition at line 209 of file SkRecorder.cpp.

209 {
210 this->append<SkRecords::DrawDRRect>(paint, outer, inner);
211}

◆ onDrawEdgeAAImageSet2()

void SkRecorder::onDrawEdgeAAImageSet2 ( const ImageSetEntry  set[],
int  count,
const SkPoint  dstClips[],
const SkMatrix  preViewMatrices[],
const SkSamplingOptions sampling,
const SkPaint paint,
SrcRectConstraint  constraint 
)
overridevirtual

Reimplemented from SkNoDrawCanvas.

Definition at line 322 of file SkRecorder.cpp.

325 {
326 int totalDstClipCount, totalMatrixCount;
327 SkCanvasPriv::GetDstClipAndMatrixCounts(set, count, &totalDstClipCount, &totalMatrixCount);
328
330 for (int i = 0; i < count; ++i) {
331 setCopy[i] = set[i];
332 }
333
334 this->append<SkRecords::DrawEdgeAAImageSet>(this->copy(paint), std::move(setCopy), count,
335 this->copy(dstClips, totalDstClipCount),
336 this->copy(preViewMatrices, totalMatrixCount), sampling, constraint);
337}
static void GetDstClipAndMatrixCounts(const SkCanvas::ImageSetEntry set[], int count, int *totalDstClipCount, int *totalMatrixCount)
SkSamplingOptions sampling
Definition: SkRecords.h:337
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 set
Definition: switches.h:76

◆ onDrawEdgeAAQuad()

void SkRecorder::onDrawEdgeAAQuad ( const SkRect rect,
const SkPoint  clip[4],
QuadAAFlags  aa,
const SkColor4f color,
SkBlendMode  mode 
)
overridevirtual

Implements SkCanvasVirtualEnforcer< SkNoDrawCanvas >.

Definition at line 316 of file SkRecorder.cpp.

317 {
318 this->append<SkRecords::DrawEdgeAAQuad>(
319 rect, this->copy(clip, 4), aa, color, mode);
320}
DlColor color

◆ onDrawGlyphRunList()

void SkRecorder::onDrawGlyphRunList ( const sktext::GlyphRunList glyphRunList,
const SkPaint paint 
)
overridevirtual

Reimplemented from SkCanvas.

Definition at line 257 of file SkRecorder.cpp.

258 {
259 sk_sp<SkTextBlob> blob = sk_ref_sp(glyphRunList.blob());
260 if (glyphRunList.blob() == nullptr) {
261 blob = glyphRunList.makeBlob();
262 }
263
264 this->onDrawTextBlob(blob.get(), glyphRunList.origin().x(), glyphRunList.origin().y(), paint);
265}
void onDrawTextBlob(const SkTextBlob *blob, SkScalar x, SkScalar y, const SkPaint &paint) override
Definition: SkRecorder.cpp:248
T * get() const
Definition: SkRefCnt.h:303
const SkTextBlob * blob() const
Definition: GlyphRun.h:117
SkPoint origin() const
Definition: GlyphRun.h:114
sk_sp< SkTextBlob > makeBlob() const
Definition: GlyphRun.cpp:88
constexpr float y() const
Definition: SkPoint_impl.h:187
constexpr float x() const
Definition: SkPoint_impl.h:181

◆ onDrawImage2()

void SkRecorder::onDrawImage2 ( const SkImage image,
SkScalar  x,
SkScalar  y,
const SkSamplingOptions sampling,
const SkPaint paint 
)
overridevirtual

Reimplemented from SkNoDrawCanvas.

Definition at line 225 of file SkRecorder.cpp.

226 {
227 this->append<SkRecords::DrawImage>(this->copy(paint), sk_ref_sp(image), x, y, sampling);
228}
double y
double x
sk_sp< const SkImage > image
Definition: SkRecords.h:269

◆ onDrawImageLattice2()

void SkRecorder::onDrawImageLattice2 ( const SkImage image,
const Lattice lattice,
const SkRect dst,
SkFilterMode  filter,
const SkPaint paint 
)
overridevirtual

Reimplemented from SkNoDrawCanvas.

Definition at line 237 of file SkRecorder.cpp.

238 {
239 int flagCount = lattice.fRectTypes ? (lattice.fXCount + 1) * (lattice.fYCount + 1) : 0;
240 SkASSERT(lattice.fBounds);
241 this->append<SkRecords::DrawImageLattice>(this->copy(paint), sk_ref_sp(image),
242 lattice.fXCount, this->copy(lattice.fXDivs, lattice.fXCount),
243 lattice.fYCount, this->copy(lattice.fYDivs, lattice.fYCount),
244 flagCount, this->copy(lattice.fRectTypes, flagCount),
245 this->copy(lattice.fColors, flagCount), *lattice.fBounds, dst, filter);
246}
int flagCount
Definition: SkRecords.h:274

◆ onDrawImageRect2()

void SkRecorder::onDrawImageRect2 ( const SkImage image,
const SkRect src,
const SkRect dst,
const SkSamplingOptions sampling,
const SkPaint paint,
SrcRectConstraint  constraint 
)
overridevirtual

Reimplemented from SkNoDrawCanvas.

Definition at line 230 of file SkRecorder.cpp.

232 {
233 this->append<SkRecords::DrawImageRect>(this->copy(paint), sk_ref_sp(image), src, dst,
234 sampling, constraint);
235}

◆ onDrawMesh()

void SkRecorder::onDrawMesh ( const SkMesh mesh,
sk_sp< SkBlender blender,
const SkPaint paint 
)
overridevirtual

Reimplemented from SkCanvas.

Definition at line 279 of file SkRecorder.cpp.

279 {
280 this->append<SkRecords::DrawMesh>(paint, mesh, std::move(blender));
281}
SkMesh mesh
Definition: SkRecords.h:345

◆ onDrawOval()

void SkRecorder::onDrawOval ( const SkRect oval,
const SkPaint paint 
)
overridevirtual

Implements SkCanvasVirtualEnforcer< SkNoDrawCanvas >.

Definition at line 196 of file SkRecorder.cpp.

196 {
197 this->append<SkRecords::DrawOval>(paint, oval);
198}

◆ onDrawPaint()

void SkRecorder::onDrawPaint ( const SkPaint paint)
overridevirtual

Implements SkCanvasVirtualEnforcer< SkNoDrawCanvas >.

Definition at line 173 of file SkRecorder.cpp.

173 {
174 this->append<SkRecords::DrawPaint>(paint);
175}

◆ onDrawPatch()

void SkRecorder::onDrawPatch ( const SkPoint  cubics[12],
const SkColor  colors[4],
const SkPoint  texCoords[4],
SkBlendMode  bmode,
const SkPaint paint 
)
overridevirtual

Implements SkCanvasVirtualEnforcer< SkNoDrawCanvas >.

Definition at line 283 of file SkRecorder.cpp.

285 {
286 this->append<SkRecords::DrawPatch>(paint,
287 cubics ? this->copy(cubics, SkPatchUtils::kNumCtrlPts) : nullptr,
288 colors ? this->copy(colors, SkPatchUtils::kNumCorners) : nullptr,
289 texCoords ? this->copy(texCoords, SkPatchUtils::kNumCorners) : nullptr,
290 bmode);
291}

◆ onDrawPath()

void SkRecorder::onDrawPath ( const SkPath path,
const SkPaint paint 
)
overridevirtual

Implements SkCanvasVirtualEnforcer< SkNoDrawCanvas >.

Definition at line 221 of file SkRecorder.cpp.

221 {
222 this->append<SkRecords::DrawPath>(paint, path);
223}

◆ onDrawPicture()

void SkRecorder::onDrawPicture ( const SkPicture pic,
const SkMatrix matrix,
const SkPaint paint 
)
overridevirtual

Implements SkCanvasVirtualEnforcer< SkNoDrawCanvas >.

Definition at line 267 of file SkRecorder.cpp.

267 {
268 fApproxBytesUsedBySubPictures += pic->approximateBytesUsed();
269 this->append<SkRecords::DrawPicture>(this->copy(paint), sk_ref_sp(pic), matrix ? *matrix : SkMatrix::I());
270}
static const SkMatrix & I()
Definition: SkMatrix.cpp:1544
virtual size_t approximateBytesUsed() const =0
unsigned useCenter Optional< SkMatrix > matrix
Definition: SkRecords.h:258

◆ onDrawPoints()

void SkRecorder::onDrawPoints ( PointMode  mode,
size_t  count,
const SkPoint  pts[],
const SkPaint paint 
)
overridevirtual

Implements SkCanvasVirtualEnforcer< SkNoDrawCanvas >.

Definition at line 181 of file SkRecorder.cpp.

184 {
185 this->append<SkRecords::DrawPoints>(paint, mode, SkToUInt(count), this->copy(pts, count));
186}
constexpr unsigned SkToUInt(S x)
Definition: SkTo.h:30

◆ onDrawRect()

void SkRecorder::onDrawRect ( const SkRect rect,
const SkPaint paint 
)
overridevirtual

Implements SkCanvasVirtualEnforcer< SkNoDrawCanvas >.

Definition at line 188 of file SkRecorder.cpp.

188 {
189 this->append<SkRecords::DrawRect>(paint, rect);
190}

◆ onDrawRegion()

void SkRecorder::onDrawRegion ( const SkRegion region,
const SkPaint paint 
)
overridevirtual

Implements SkCanvasVirtualEnforcer< SkNoDrawCanvas >.

Definition at line 192 of file SkRecorder.cpp.

192 {
193 this->append<SkRecords::DrawRegion>(paint, region);
194}
ClipOpAndAA opAA SkRegion region
Definition: SkRecords.h:238

◆ onDrawRRect()

void SkRecorder::onDrawRRect ( const SkRRect rrect,
const SkPaint paint 
)
overridevirtual

Implements SkCanvasVirtualEnforcer< SkNoDrawCanvas >.

Definition at line 205 of file SkRecorder.cpp.

205 {
206 this->append<SkRecords::DrawRRect>(paint, rrect);
207}

◆ onDrawShadowRec()

void SkRecorder::onDrawShadowRec ( const SkPath path,
const SkDrawShadowRec rec 
)
overridevirtual

Implements SkCanvasVirtualEnforcer< SkNoDrawCanvas >.

Definition at line 308 of file SkRecorder.cpp.

308 {
309 this->append<SkRecords::DrawShadowRec>(path, rec);
310}

◆ onDrawSlug()

void SkRecorder::onDrawSlug ( const sktext::gpu::Slug slug,
const SkPaint paint 
)
overridevirtual

Reimplemented from SkCanvas.

Definition at line 253 of file SkRecorder.cpp.

253 {
254 this->append<SkRecords::DrawSlug>(paint, sk_ref_sp(slug));
255}

◆ onDrawTextBlob()

void SkRecorder::onDrawTextBlob ( const SkTextBlob blob,
SkScalar  x,
SkScalar  y,
const SkPaint paint 
)
overridevirtual

Implements SkCanvasVirtualEnforcer< SkNoDrawCanvas >.

Definition at line 248 of file SkRecorder.cpp.

249 {
250 this->append<SkRecords::DrawTextBlob>(paint, sk_ref_sp(blob), x, y);
251}

◆ onDrawVerticesObject()

void SkRecorder::onDrawVerticesObject ( const SkVertices vertices,
SkBlendMode  bmode,
const SkPaint paint 
)
overridevirtual

Reimplemented from SkNoDrawCanvas.

Definition at line 272 of file SkRecorder.cpp.

273 {
274 this->append<SkRecords::DrawVertices>(paint,
275 sk_ref_sp(const_cast<SkVertices*>(vertices)),
276 bmode);
277}

◆ onNewSurface()

sk_sp< SkSurface > SkRecorder::onNewSurface ( const SkImageInfo ,
const SkSurfaceProps  
)
overridevirtual

Reimplemented from SkCanvas.

Definition at line 416 of file SkRecorder.cpp.

416 {
417 return nullptr;
418}

◆ onResetClip()

void SkRecorder::onResetClip ( )
overridevirtual

Reimplemented from SkCanvas.

Definition at line 411 of file SkRecorder.cpp.

411 {
413 this->append<SkRecords::ResetClip>();
414}
void onResetClip() override
Definition: SkRecorder.cpp:411

◆ reset()

void SkRecorder::reset ( SkRecord record,
const SkRect bounds 
)

Definition at line 108 of file SkRecorder.cpp.

108 {
109 this->forgetRecord();
110 fRecord = record;
111 this->resetCanvas(safe_picture_bounds(bounds));
112 SkASSERT(this->imageInfo().width() >= 0 && this->imageInfo().height() >= 0);
113}
void resetCanvas(int w, int h)
void forgetRecord()
Definition: SkRecorder.cpp:115

◆ willRestore()

void SkRecorder::willRestore ( )
inlineoverridevirtual

Reimplemented from SkCanvas.

Definition at line 96 of file SkRecorder.h.

96{}

◆ willSave()

void SkRecorder::willSave ( )
overridevirtual

Reimplemented from SkCanvas.

Definition at line 339 of file SkRecorder.cpp.

339 {
340 this->append<SkRecords::Save>();
341}

The documentation for this class was generated from the following files: