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

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

Issue 282283002: add pathops to debugger (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: show clip stack only when pathops are enabled Created 6 years, 7 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
Index: src/utils/debugger/SkDebugCanvas.h
diff --git a/src/utils/debugger/SkDebugCanvas.h b/src/utils/debugger/SkDebugCanvas.h
index d4fded7c1a8dae3bc5beb9b5c83cd11c08b448e6..84ee4895aa50048c1c3a2f0fbd9462e77626f565 100644
--- a/src/utils/debugger/SkDebugCanvas.h
+++ b/src/utils/debugger/SkDebugCanvas.h
@@ -12,6 +12,7 @@
#include "SkCanvas.h"
#include "SkDrawCommand.h"
+#include "SkPathOps.h"
#include "SkPicture.h"
#include "SkTArray.h"
#include "SkString.h"
@@ -37,6 +38,8 @@ public:
void setOutstandingSaveCount(int saveCount) { fOutstandingSaveCount = saveCount; }
int getOutstandingSaveCount() const { return fOutstandingSaveCount; }
robertphillips 2014/05/16 12:21:24 const ?
caryclark 2014/05/16 13:49:02 What does this refer to?
robertphillips 2014/05/16 13:57:41 Can this be "bool getAllowSimplifyClip() const" ?
caryclark 2014/05/16 14:02:01 Done. I don't know why I didn't see that before.
+ bool getAllowSimplifyClip() { return fAllowSimplifyClip; }
+
void setPicture(SkPicture* picture) { fPicture = picture; }
/**
@@ -151,6 +154,8 @@ public:
fUserMatrix = matrix;
}
+ SkString clipStackData() const { return fClipStackData; }
+
////////////////////////////////////////////////////////////////////////////////
// Inherited from SkCanvas
////////////////////////////////////////////////////////////////////////////////
@@ -266,6 +271,10 @@ private:
SkMatrix fMatrix;
SkIRect fClip;
+ SkString fClipStackData;
+ bool fCalledAddStackData;
+ SkPath fSaveDevPath;
+
bool fOverdrawViz;
SkDrawFilter* fOverdrawFilter;
@@ -311,6 +320,14 @@ private:
return 0;
}
+ void resetClipStackData() { fClipStackData.reset(); fCalledAddStackData = false; }
+
+ void addClipStackData(const SkPath& devPath, const SkPath& operand, SkRegion::Op elementOp);
+ bool lastClipStackData(const SkPath& devPath);
+ void addPathData(const SkPath& path, const char* pathName);
robertphillips 2014/05/16 12:21:24 outputScalar, outputPoints ?
caryclark 2014/05/16 13:49:02 Done.
+ void output_scalar(SkScalar num);
+ void output_points(const SkPoint* pts, int count);
+
typedef SkCanvas INHERITED;
};

Powered by Google App Engine
This is Rietveld 408576698