Added CocoaDebugger to experimental
git-svn-id: http://skia.googlecode.com/svn/trunk@1622 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/experimental/CocoaDebugger/SkDebugDumper.h b/experimental/CocoaDebugger/SkDebugDumper.h
new file mode 100644
index 0000000..72a86aa
--- /dev/null
+++ b/experimental/CocoaDebugger/SkDebugDumper.h
@@ -0,0 +1,34 @@
+#ifndef SkDebugDumper_DEFINED
+#define SkDebugDumper_DEFINED
+#include "SkDumpCanvasM.h"
+#include "SkEvent.h"
+
+class CommandListView;
+class InfoPanelView;
+class ContentView;
+/** Formats the draw commands, and send them to a function-pointer provided
+ by the caller.
+ */
+class SkDebugDumper : public SkDumpCanvasM::Dumper {
+public:
+ SkDebugDumper(SkEventSinkID cID, SkEventSinkID clID, SkEventSinkID ipID);
+ // override from baseclass that does the formatting, and in turn calls
+ // the function pointer that was passed to the constructor
+ virtual void dump(SkDumpCanvasM*, SkDumpCanvasM::Verb, const char str[],
+ const SkPaint*);
+
+ void load() { fInit = true; };
+ void unload() { fInit = false; fCount = 0;};
+ void disable() { fDisabled = true; };
+ void enable() { fDisabled = false; };
+private:
+ int fCount;
+ bool fInit;
+ bool fDisabled;
+ SkEventSinkID fContentID;
+ SkEventSinkID fCommandListID;
+ SkEventSinkID fInfoPanelID;
+
+ typedef SkDumpCanvasM::Dumper INHERITED;
+};
+#endif
\ No newline at end of file