diff options
Diffstat (limited to 'include/utils/SkDumpCanvas.h')
-rw-r--r-- | include/utils/SkDumpCanvas.h | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/include/utils/SkDumpCanvas.h b/include/utils/SkDumpCanvas.h index 5bfd6f6..de2af04 100644 --- a/include/utils/SkDumpCanvas.h +++ b/include/utils/SkDumpCanvas.h @@ -12,7 +12,7 @@ /** This class overrides all the draw methods on SkCanvas, and formats them as text, and then sends that to a Dumper helper object. - + Typical use might be to dump a display list to a log file to see what is being drawn. */ @@ -22,17 +22,17 @@ public: explicit SkDumpCanvas(Dumper* = 0); virtual ~SkDumpCanvas(); - + enum Verb { kNULL_Verb, kSave_Verb, kRestore_Verb, - + kMatrix_Verb, - + kClip_Verb, - + kDrawPaint_Verb, kDrawPoints_Verb, kDrawRect_Verb, @@ -43,7 +43,7 @@ public: kDrawVertices_Verb, kDrawData_Verb }; - + /** Subclasses of this are installed on the DumpCanvas, and then called for each drawing command. */ @@ -52,12 +52,12 @@ public: virtual void dump(SkDumpCanvas*, SkDumpCanvas::Verb, const char str[], const SkPaint*) = 0; }; - + Dumper* getDumper() const { return fDumper; } void setDumper(Dumper*); - + int getNestLevel() const { return fNestLevel; } - + virtual int save(SaveFlags) SK_OVERRIDE; virtual int saveLayer(const SkRect* bounds, const SkPaint* paint, SaveFlags) SK_OVERRIDE; @@ -69,7 +69,7 @@ public: virtual bool skew(SkScalar sx, SkScalar sy) SK_OVERRIDE; virtual bool concat(const SkMatrix& matrix) SK_OVERRIDE; virtual void setMatrix(const SkMatrix& matrix) SK_OVERRIDE; - + virtual bool clipRect(const SkRect&, SkRegion::Op, bool) SK_OVERRIDE; virtual bool clipPath(const SkPath&, SkRegion::Op, bool) SK_OVERRIDE; virtual bool clipRegion(const SkRegion& deviceRgn, @@ -109,7 +109,7 @@ public: private: Dumper* fDumper; int fNestLevel; // for nesting recursive elements like pictures - + void dump(Verb, const SkPaint*, const char format[], ...); typedef SkCanvas INHERITED; @@ -121,16 +121,16 @@ private: class SkFormatDumper : public SkDumpCanvas::Dumper { public: SkFormatDumper(void (*)(const char text[], void* refcon), void* refcon); - + // override from baseclass that does the formatting, and in turn calls // the function pointer that was passed to the constructor virtual void dump(SkDumpCanvas*, SkDumpCanvas::Verb, const char str[], const SkPaint*) SK_OVERRIDE; - + private: void (*fProc)(const char*, void*); void* fRefcon; - + typedef SkDumpCanvas::Dumper INHERITED; }; |