Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(287)

Unified Diff: src/utils/debugger/SkDrawCommand.h

Issue 211383003: Debugger improvements (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Fix Mac 10.8 compilation issue Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/utils/debugger/SkDebugCanvas.cpp ('k') | src/utils/debugger/SkDrawCommand.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/utils/debugger/SkDrawCommand.h
===================================================================
--- src/utils/debugger/SkDrawCommand.h (revision 13942)
+++ src/utils/debugger/SkDrawCommand.h (working copy)
@@ -23,6 +23,9 @@
virtual SkString toString();
+ void setOffset(size_t offset) { fOffset = offset; }
+ virtual size_t offset() { return fOffset; }
+
virtual const char* toCString() {
return GetCommandString(fDrawType);
}
@@ -46,13 +49,13 @@
// pushCull and popCull. It is used in two ways:
// To determine which saveLayers are currently active (at a
// given point in the rendering).
- // save just return a kPushLayer action but don't track active state
- // restore just return a kPopLayer action
+ // saves just return a kPushLayer action but don't track active state
+ // restores just return a kPopLayer action
// saveLayers return kPushLayer but also track the active state
// To determine which culls are currently active (at a given point)
// in the rendering).
- // pushCull returns a kPushCull action
- // popCull returns a kPopCull action
+ // pushCulls return a kPushCull action
+ // popCulls return a kPopCull action
enum Action {
kNone_Action,
kPopLayer_Action,
@@ -71,11 +74,12 @@
static const char* GetCommandString(DrawType type);
protected:
- DrawType fDrawType;
SkTDArray<SkString*> fInfo;
private:
- bool fVisible;
+ DrawType fDrawType;
+ size_t fOffset;
+ bool fVisible;
};
class SkRestoreCommand : public SkDrawCommand {
@@ -171,7 +175,7 @@
class SkDrawBitmapCommand : public SkDrawCommand {
public:
SkDrawBitmapCommand(const SkBitmap& bitmap, SkScalar left, SkScalar top,
- const SkPaint* paint);
+ const SkPaint* paint);
virtual void execute(SkCanvas* canvas) SK_OVERRIDE;
virtual bool render(SkCanvas* canvas) const SK_OVERRIDE;
private:
@@ -187,7 +191,7 @@
class SkDrawBitmapMatrixCommand : public SkDrawCommand {
public:
SkDrawBitmapMatrixCommand(const SkBitmap& bitmap, const SkMatrix& matrix,
- const SkPaint* paint);
+ const SkPaint* paint);
virtual void execute(SkCanvas* canvas) SK_OVERRIDE;
virtual bool render(SkCanvas* canvas) const SK_OVERRIDE;
private:
@@ -202,7 +206,7 @@
class SkDrawBitmapNineCommand : public SkDrawCommand {
public:
SkDrawBitmapNineCommand(const SkBitmap& bitmap, const SkIRect& center,
- const SkRect& dst, const SkPaint* paint);
+ const SkRect& dst, const SkPaint* paint);
virtual void execute(SkCanvas* canvas) SK_OVERRIDE;
virtual bool render(SkCanvas* canvas) const SK_OVERRIDE;
private:
@@ -352,7 +356,7 @@
class SkDrawPointsCommand : public SkDrawCommand {
public:
SkDrawPointsCommand(SkCanvas::PointMode mode, size_t count, const SkPoint pts[],
- const SkPaint& paint);
+ const SkPaint& paint);
virtual ~SkDrawPointsCommand() { delete [] fPts; }
virtual void execute(SkCanvas* canvas) SK_OVERRIDE;
virtual bool render(SkCanvas* canvas) const SK_OVERRIDE;
@@ -368,7 +372,7 @@
class SkDrawTextCommand : public SkDrawCommand {
public:
SkDrawTextCommand(const void* text, size_t byteLength, SkScalar x, SkScalar y,
- const SkPaint& paint);
+ const SkPaint& paint);
virtual ~SkDrawTextCommand() { delete [] fText; }
virtual void execute(SkCanvas* canvas) SK_OVERRIDE;
private:
« no previous file with comments | « src/utils/debugger/SkDebugCanvas.cpp ('k') | src/utils/debugger/SkDrawCommand.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698