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/SampleTiling.cpp | |
| 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/SampleTiling.cpp')
| -rw-r--r-- | samplecode/SampleTiling.cpp | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/samplecode/SampleTiling.cpp b/samplecode/SampleTiling.cpp index 87aeae4941..025049e191 100644 --- a/samplecode/SampleTiling.cpp +++ b/samplecode/SampleTiling.cpp @@ -55,7 +55,7 @@ static const SkBitmap::Config gConfigs[] = { static const int gWidth = 32; static const int gHeight = 32; -class TilingView : public SkView { +class TilingView : public SampleView { SkPicture fTextPicture; SkBlurDrawLooper fLooper; public: @@ -79,13 +79,7 @@ protected: return this->INHERITED::onQuery(evt); } - void drawBG(SkCanvas* canvas) { - canvas->drawColor(SK_ColorWHITE); - } - - virtual void onDraw(SkCanvas* canvas) { - this->drawBG(canvas); - + virtual void onDrawContent(SkCanvas* canvas) { SkRect r = { 0, 0, SkIntToScalar(gWidth*2), SkIntToScalar(gHeight*2) }; static const char* gConfigNames[] = { "8888", "565", "4444" }; @@ -167,7 +161,7 @@ protected: } private: - typedef SkView INHERITED; + typedef SampleView INHERITED; }; ////////////////////////////////////////////////////////////////////////////// |
