diff options
| author | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-03-12 21:13:48 +0000 |
|---|---|---|
| committer | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-03-12 21:13:48 +0000 |
| commit | 7b1859034fd1febd69eeeca9efd5e3eb297fb168 (patch) | |
| tree | 5a4cad9bd184003765d71d918e7c71ed3850ce6d /samplecode/SampleMipMap.cpp | |
| parent | 0a0726542ed62f07a2df5e1ac082472006355e66 (diff) | |
add init() method, so we don't draw in our constructor (makes debugging harder)
git-svn-id: http://skia.googlecode.com/svn/trunk@3368 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'samplecode/SampleMipMap.cpp')
| -rw-r--r-- | samplecode/SampleMipMap.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/samplecode/SampleMipMap.cpp b/samplecode/SampleMipMap.cpp index de5aac524d..a7e3166002 100644 --- a/samplecode/SampleMipMap.cpp +++ b/samplecode/SampleMipMap.cpp @@ -40,8 +40,18 @@ class MipMapView : public SampleView { enum { N = 64 }; + bool fOnce; public: MipMapView() { + fOnce = false; + } + + void init() { + if (fOnce) { + return; + } + fOnce = true; + fBitmap = createBitmap(N); fWidth = N; @@ -87,6 +97,7 @@ protected: } virtual void onDrawContent(SkCanvas* canvas) { + this->init(); canvas->translate(SkIntToScalar(10), SkIntToScalar(10)); canvas->scale(1.00000001f, 0.9999999f); |
