This adds a checkbox to the debugger to allow seeing the effect pathops has on the clip. A new tab shows the C code that the pathops generate.
Once in place, this CL found a bug in the pathops code where it was not handling empty clip stack elements correctly. The Cl also has the change to SkCanvas to fix this bug.
R=robertphillips@google.com, reed@google.com
Author: caryclark@google.com
Review URL: https://codereview.chromium.org/282283002
git-svn-id: http://skia.googlecode.com/svn/trunk@14774 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/debugger/SkDebugger.cpp b/debugger/SkDebugger.cpp
index f4730d6..394c0ad 100644
--- a/debugger/SkDebugger.cpp
+++ b/debugger/SkDebugger.cpp
@@ -49,6 +49,8 @@
fDebugCanvas->setMegaVizMode(false);
bool overDraw = fDebugCanvas->getOverdrawViz();
fDebugCanvas->setOverdrawViz(false);
+ bool pathOps = fDebugCanvas->getAllowSimplifyClip();
+ fDebugCanvas->setAllowSimplifyClip(false);
int saveCount = fDebugCanvas->getOutstandingSaveCount();
fDebugCanvas->setOutstandingSaveCount(0);
@@ -62,6 +64,7 @@
fDebugCanvas->setMegaVizMode(vizMode);
fDebugCanvas->setOverdrawViz(overDraw);
fDebugCanvas->setOutstandingSaveCount(saveCount);
+ fDebugCanvas->setAllowSimplifyClip(pathOps);
return recorder.endRecording();
}
@@ -148,3 +151,8 @@
overview->appendS32(pictureHeight());
overview->append("px");
}
+
+void SkDebugger::getClipStackText(SkString* clipStack) {
+ clipStack->set(fDebugCanvas->clipStackData());
+}
+