migrate some samples over to SampleView, for FPS measurements
git-svn-id: http://skia.googlecode.com/svn/trunk@1166 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/samplecode/SampleCode.h b/samplecode/SampleCode.h
index 2eb8bef..0c706ee 100644
--- a/samplecode/SampleCode.h
+++ b/samplecode/SampleCode.h
@@ -1,6 +1,7 @@
#ifndef SampleCode_DEFINED
#define SampleCode_DEFINED
+#include "SkColor.h"
#include "SkEvent.h"
#include "SkKey.h"
#include "SkView.h"
@@ -48,9 +49,11 @@
class SampleView : public SkView {
public:
- SampleView() : fRepeatCount(1) {}
+ SampleView() : fRepeatCount(1), fBGColor(SK_ColorWHITE) {}
- static void SetRepeatDraw(SkView*, int count);
+ void setBGColor(SkColor color) { fBGColor = color; }
+
+ static bool SetRepeatDraw(SkView*, int count);
protected:
virtual void onDrawBackground(SkCanvas*);
@@ -63,6 +66,7 @@
private:
int fRepeatCount;
+ SkColor fBGColor;
typedef SkView INHERITED;
};