skia2/experimental/Debugger/SkDebugDumper.h
caryclark@google.com 9da0cea3a3 fix warnings on Mac in experimental
Fix these class of warnings:
- unused functions
- unused locals
- sign mismatch
- missing function prototypes
- missing newline at end of file
- 64 to 32 bit truncation

The changes prefer to link in dead code in the debug build
with 'if (false)' than to comment it out, but trivial cases
are commented out or sometimes deleted if it appears to be
a copy/paste error.
Review URL: https://codereview.appspot.com/6307044

git-svn-id: http://skia.googlecode.com/svn/trunk@4187 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-06 12:11:33 +00:00

39 lines
1.1 KiB
C++

/*
* Copyright 2011 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef SkDebugDumper_DEFINED
#define SkDebugDumper_DEFINED
#include "SkDumpCanvas.h"
#include "SkEvent.h"
/** Formats the draw commands, and send them to a function-pointer provided
by the caller.
*/
class SkDebugDumper : public SkDumpCanvas::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(SkDumpCanvas*, SkDumpCanvas::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 fCommandsID;
SkEventSinkID fStateID;
typedef SkDumpCanvas::Dumper INHERITED;
};
#endif