diff options
author | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2011-04-22 14:10:48 +0000 |
---|---|---|
committer | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2011-04-22 14:10:48 +0000 |
commit | f21833999d90ad9c8c584cff3238797b39cfc00b (patch) | |
tree | a9d07155d6567708fff2796d46fae62534e7e1ff /samplecode/SampleCode.h | |
parent | 2eb595292b9624371d1698ae9da7accb4c09c26c (diff) |
migrate some samples over to SampleView, for FPS measurements
git-svn-id: http://skia.googlecode.com/svn/trunk@1166 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'samplecode/SampleCode.h')
-rw-r--r-- | samplecode/SampleCode.h | 8 |
1 files changed, 6 insertions, 2 deletions
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; }; |