From f21833999d90ad9c8c584cff3238797b39cfc00b Mon Sep 17 00:00:00 2001 From: "reed@google.com" Date: Fri, 22 Apr 2011 14:10:48 +0000 Subject: migrate some samples over to SampleView, for FPS measurements git-svn-id: http://skia.googlecode.com/svn/trunk@1166 2bbb7eff-a529-9590-31e7-b0007b416f81 --- samplecode/SampleCode.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'samplecode/SampleCode.h') diff --git a/samplecode/SampleCode.h b/samplecode/SampleCode.h index 2eb8bef262..0c706ee3d1 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 @@ private: 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 @@ protected: private: int fRepeatCount; + SkColor fBGColor; typedef SkView INHERITED; }; -- cgit v1.2.3