From b073d920c90bc95f6c216327acd321a4fc809bfa Mon Sep 17 00:00:00 2001 From: "scroggo@google.com" Date: Fri, 8 Jun 2012 15:35:03 +0000 Subject: 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 --- samplecode/SampleCode.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'samplecode/SampleCode.h') 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: -- cgit v1.2.3