blob: 72a86aaa47539b552f1e9e2129a0daac4a1a0afc [file] [log] [blame]
yangsu@google.coma8a42e22011-06-16 20:49:55 +00001#ifndef SkDebugDumper_DEFINED
2#define SkDebugDumper_DEFINED
3#include "SkDumpCanvasM.h"
4#include "SkEvent.h"
5
6class CommandListView;
7class InfoPanelView;
8class ContentView;
9/** Formats the draw commands, and send them to a function-pointer provided
10 by the caller.
11 */
12class SkDebugDumper : public SkDumpCanvasM::Dumper {
13public:
14 SkDebugDumper(SkEventSinkID cID, SkEventSinkID clID, SkEventSinkID ipID);
15 // override from baseclass that does the formatting, and in turn calls
16 // the function pointer that was passed to the constructor
17 virtual void dump(SkDumpCanvasM*, SkDumpCanvasM::Verb, const char str[],
18 const SkPaint*);
19
20 void load() { fInit = true; };
21 void unload() { fInit = false; fCount = 0;};
22 void disable() { fDisabled = true; };
23 void enable() { fDisabled = false; };
24private:
25 int fCount;
26 bool fInit;
27 bool fDisabled;
28 SkEventSinkID fContentID;
29 SkEventSinkID fCommandListID;
30 SkEventSinkID fInfoPanelID;
31
32 typedef SkDumpCanvasM::Dumper INHERITED;
33};
34#endif