Flutter Engine
The Flutter Engine
|
#include <DebugCanvas.h>
Protected Member Functions | |
void | willSave () override |
SaveLayerStrategy | getSaveLayerStrategy (const SaveLayerRec &) override |
bool | onDoSaveBehind (const SkRect *) override |
void | willRestore () override |
void | didConcat44 (const SkM44 &) override |
void | didSetM44 (const SkM44 &) override |
void | didScale (SkScalar, SkScalar) override |
void | didTranslate (SkScalar, SkScalar) override |
void | onDrawAnnotation (const SkRect &, const char[], SkData *) override |
void | onDrawDRRect (const SkRRect &, const SkRRect &, const SkPaint &) override |
void | onDrawTextBlob (const SkTextBlob *blob, SkScalar x, SkScalar y, 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 | onDrawRect (const SkRect &, 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 | onDrawPoints (PointMode, size_t count, const SkPoint pts[], const SkPaint &) override |
void | onDrawVerticesObject (const SkVertices *, SkBlendMode, const SkPaint &) override |
void | onDrawPath (const SkPath &, const SkPaint &) override |
void | onDrawRegion (const SkRegion &, 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 | onClipRect (const SkRect &, SkClipOp, ClipEdgeStyle) override |
void | onClipRRect (const SkRRect &, SkClipOp, ClipEdgeStyle) override |
void | onClipPath (const SkPath &, SkClipOp, ClipEdgeStyle) override |
void | onClipShader (sk_sp< SkShader >, SkClipOp) override |
void | onClipRegion (const SkRegion ®ion, SkClipOp) override |
void | onResetClip () override |
void | onDrawShadowRec (const SkPath &, const SkDrawShadowRec &) override |
void | onDrawDrawable (SkDrawable *, const SkMatrix *) 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 count, const SkPoint[], const SkMatrix[], const SkSamplingOptions &, const SkPaint *, SrcRectConstraint) override |
Protected Member Functions inherited from SkCanvasVirtualEnforcer< SkCanvas > | |
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 ®ion, 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< SkSurface > | onNewSurface (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 ®ion, 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::Slug > | onConvertGlyphRunListToSlug (const sktext::GlyphRunList &glyphRunList, const SkPaint &paint) |
virtual void | onDrawSlug (const sktext::gpu::Slug *slug, const SkPaint &paint) |
SkCanvas (const SkIRect &bounds) | |
Definition at line 49 of file DebugCanvas.h.
Definition at line 112 of file DebugCanvas.cpp.
DebugCanvas::DebugCanvas | ( | SkIRect | bounds | ) |
Definition at line 141 of file DebugCanvas.cpp.
|
override |
Definition at line 144 of file DebugCanvas.cpp.
void DebugCanvas::deleteDrawCommandAt | ( | int | index | ) |
Removes the command at the specified index
index | The index of the command to delete |
Definition at line 289 of file DebugCanvas.cpp.
|
inline |
Definition at line 150 of file DebugCanvas.h.
|
overrideprotectedvirtual |
Reimplemented from SkCanvas.
Definition at line 414 of file DebugCanvas.cpp.
|
overrideprotectedvirtual |
Reimplemented from SkCanvas.
Definition at line 643 of file DebugCanvas.cpp.
void DebugCanvas::draw | ( | SkCanvas * | canvas | ) |
Executes all draw calls to the canvas.
canvas | The canvas being drawn to |
Definition at line 153 of file DebugCanvas.cpp.
Executes the draw calls up to the specified index. Does not clear the canvas to transparent black first, if needed, caller should do that first.
canvas | The canvas being drawn to |
index | The index of the final command being executed |
m | an optional Mth gpu op to highlight, or -1 |
Definition at line 159 of file DebugCanvas.cpp.
|
inline |
Returns the most recently calculated clip
Definition at line 116 of file DebugCanvas.h.
|
inline |
Returns the most recently calculated transformation matrix
Definition at line 111 of file DebugCanvas.h.
DrawCommand * DebugCanvas::getDrawCommandAt | ( | int | index | ) | const |
Returns the draw command at the given index.
index | The index of the command |
Definition at line 295 of file DebugCanvas.cpp.
|
inline |
Definition at line 90 of file DebugCanvas.h.
std::map< int, std::vector< int > > DebugCanvas::getImageIdToCommandMap | ( | UrlDataManager & | udm | ) | const |
Returns a map from image IDs to command indices where they are used.
Definition at line 653 of file DebugCanvas.cpp.
|
inline |
Definition at line 77 of file DebugCanvas.h.
|
overrideprotectedvirtual |
Reimplemented from SkCanvas.
Definition at line 631 of file DebugCanvas.cpp.
|
inline |
|
overrideprotectedvirtual |
Reimplemented from SkCanvas.
Definition at line 390 of file DebugCanvas.cpp.
|
overrideprotectedvirtual |
Reimplemented from SkCanvas.
Definition at line 394 of file DebugCanvas.cpp.
Reimplemented from SkCanvas.
Definition at line 402 of file DebugCanvas.cpp.
|
overrideprotectedvirtual |
Reimplemented from SkCanvas.
Definition at line 398 of file DebugCanvas.cpp.
Reimplemented from SkCanvas.
Definition at line 406 of file DebugCanvas.cpp.
|
overrideprotectedvirtual |
Reimplemented from SkCanvas.
Definition at line 638 of file DebugCanvas.cpp.
|
overrideprotectedvirtual |
Implements SkCanvasVirtualEnforcer< SkCanvas >.
Definition at line 427 of file DebugCanvas.cpp.
|
overrideprotectedvirtual |
Implements SkCanvasVirtualEnforcer< SkCanvas >.
Definition at line 499 of file DebugCanvas.cpp.
|
overrideprotectedvirtual |
Reimplemented from SkCanvas.
Definition at line 581 of file DebugCanvas.cpp.
|
overrideprotectedvirtual |
Reimplemented from SkCanvas.
Definition at line 511 of file DebugCanvas.cpp.
|
overrideprotectedvirtual |
Implements SkCanvasVirtualEnforcer< SkCanvas >.
Definition at line 598 of file DebugCanvas.cpp.
|
overrideprotectedvirtual |
Implements SkCanvasVirtualEnforcer< SkCanvas >.
Definition at line 554 of file DebugCanvas.cpp.
|
overrideprotectedvirtual |
Reimplemented from SkCanvas.
Definition at line 610 of file DebugCanvas.cpp.
|
overrideprotectedvirtual |
Implements SkCanvasVirtualEnforcer< SkCanvas >.
Definition at line 602 of file DebugCanvas.cpp.
|
overrideprotectedvirtual |
|
overrideprotectedvirtual |
|
overrideprotectedvirtual |
Reimplemented from SkCanvas.
Definition at line 470 of file DebugCanvas.cpp.
|
overrideprotectedvirtual |
Implements SkCanvasVirtualEnforcer< SkCanvas >.
Definition at line 495 of file DebugCanvas.cpp.
|
overrideprotectedvirtual |
Implements SkCanvasVirtualEnforcer< SkCanvas >.
Definition at line 507 of file DebugCanvas.cpp.
|
overrideprotectedvirtual |
Implements SkCanvasVirtualEnforcer< SkCanvas >.
Definition at line 566 of file DebugCanvas.cpp.
|
overrideprotectedvirtual |
Implements SkCanvasVirtualEnforcer< SkCanvas >.
Definition at line 515 of file DebugCanvas.cpp.
|
overrideprotectedvirtual |
Implements SkCanvasVirtualEnforcer< SkCanvas >.
Definition at line 523 of file DebugCanvas.cpp.
|
overrideprotectedvirtual |
Implements SkCanvasVirtualEnforcer< SkCanvas >.
Definition at line 538 of file DebugCanvas.cpp.
|
overrideprotectedvirtual |
Implements SkCanvasVirtualEnforcer< SkCanvas >.
Definition at line 545 of file DebugCanvas.cpp.
|
overrideprotectedvirtual |
Implements SkCanvasVirtualEnforcer< SkCanvas >.
Definition at line 519 of file DebugCanvas.cpp.
|
overrideprotectedvirtual |
Implements SkCanvasVirtualEnforcer< SkCanvas >.
Definition at line 550 of file DebugCanvas.cpp.
|
overrideprotectedvirtual |
Implements SkCanvasVirtualEnforcer< SkCanvas >.
Definition at line 594 of file DebugCanvas.cpp.
|
overrideprotectedvirtual |
Implements SkCanvasVirtualEnforcer< SkCanvas >.
Definition at line 558 of file DebugCanvas.cpp.
|
overrideprotectedvirtual |
Reimplemented from SkCanvas.
Definition at line 574 of file DebugCanvas.cpp.
|
overrideprotectedvirtual |
Reimplemented from SkCanvas.
Definition at line 410 of file DebugCanvas.cpp.
|
inline |
Definition at line 84 of file DebugCanvas.h.
|
inline |
Set the color of the clip visualization. An alpha of zero renders the clip invisible.
Definition at line 82 of file DebugCanvas.h.
|
inline |
Definition at line 88 of file DebugCanvas.h.
|
inline |
Provide a DebugLayerManager for mskp files containing layer information when set this DebugCanvas will attempt to parse layer info from annotations. it will store layer pictures to the layer manager, and interpret some drawImageRects as layer draws, deferring to the layer manager for images. Provide a frame number that will be passed to all layer manager functions to identify this DebugCanvas.
Used only in wasm debugger animations.
Definition at line 67 of file DebugCanvas.h.
|
inline |
Definition at line 86 of file DebugCanvas.h.
void DebugCanvas::setOverdrawViz | ( | bool | overdrawViz | ) |
Enable or disable overdraw visualization
Definition at line 388 of file DebugCanvas.cpp.
void DebugCanvas::toggleCommand | ( | int | index, |
bool | toggle | ||
) |
Toggles the visibility / execution of the draw command at index i with the value of toggle.
Definition at line 648 of file DebugCanvas.cpp.
void DebugCanvas::toJSON | ( | SkJSONWriter & | writer, |
UrlDataManager & | urlDataManager, | ||
SkCanvas * | canvas | ||
) |
Returns a JSON object representing all commands in the picture. The encoder may use the UrlDataManager to store binary data such as images, referring to them via URLs embedded in the JSON.
Definition at line 340 of file DebugCanvas.cpp.
void DebugCanvas::toJSONOpsTask | ( | SkJSONWriter & | writer, |
SkCanvas * | canvas | ||
) |
Definition at line 371 of file DebugCanvas.cpp.
|
overrideprotectedvirtual |
Reimplemented from SkCanvas.
Definition at line 621 of file DebugCanvas.cpp.
|
overrideprotectedvirtual |
Reimplemented from SkCanvas.
Definition at line 626 of file DebugCanvas.cpp.