diff options
author | scroggo@google.com <scroggo@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-06-08 15:35:03 +0000 |
---|---|---|
committer | scroggo@google.com <scroggo@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-06-08 15:35:03 +0000 |
commit | b073d920c90bc95f6c216327acd321a4fc809bfa (patch) | |
tree | 2d6c8b06736e0b0754f27d4235c18f39e3f6a5bf /samplecode/SampleCode.h | |
parent | 56f2244dca1d0bc187370c35e9a74d5b73d1e2ca (diff) |
Add a tiled pipe mode to SampleApp.
Using the "Pipe" checkbox in SamleApp, you can now
toggle amongst three states: no pipe, a normal pipe
(or others depending on #defines), and a tiled pipe.
You can also use shift + p to toggle.
Review URL: https://codereview.appspot.com/6303055
git-svn-id: http://skia.googlecode.com/svn/trunk@4213 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'samplecode/SampleCode.h')
-rw-r--r-- | samplecode/SampleCode.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/samplecode/SampleCode.h b/samplecode/SampleCode.h index 3d1f2665cb..0a582cbb94 100644 --- a/samplecode/SampleCode.h +++ b/samplecode/SampleCode.h @@ -14,7 +14,7 @@ #include "SkEvent.h" #include "SkKey.h" #include "SkView.h" -class SkOSMenu; +#include "SkOSMenu.h" class GrContext; class SampleCode { @@ -107,15 +107,15 @@ private: class SampleView : public SkView { public: - SampleView() : fBGColor(SK_ColorWHITE), fRepeatCount(1) { - fUsePipe = false; + SampleView() : fPipeState(SkOSMenu::kOffState), + fBGColor(SK_ColorWHITE), fRepeatCount(1) { } void setBGColor(SkColor color) { fBGColor = color; } static bool IsSampleView(SkView*); static bool SetRepeatDraw(SkView*, int count); - static bool SetUsePipe(SkView*, bool); + static bool SetUsePipe(SkView*, SkOSMenu::TriState); /** * Call this to request menu items from a SampleView. @@ -136,7 +136,7 @@ protected: virtual void draw(SkCanvas*); virtual void onDraw(SkCanvas*); - bool fUsePipe; + SkOSMenu::TriState fPipeState; SkColor fBGColor; private: |