aboutsummaryrefslogtreecommitdiff
path: root/samplecode/TransitionView.cpp
diff options
context:
space:
mode:
authorscroggo@google.com <scroggo@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-06-08 15:35:03 +0000
committerscroggo@google.com <scroggo@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-06-08 15:35:03 +0000
commitb073d920c90bc95f6c216327acd321a4fc809bfa (patch)
tree2d6c8b06736e0b0754f27d4235c18f39e3f6a5bf /samplecode/TransitionView.cpp
parent56f2244dca1d0bc187370c35e9a74d5b73d1e2ca (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/TransitionView.cpp')
-rw-r--r--samplecode/TransitionView.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/samplecode/TransitionView.cpp b/samplecode/TransitionView.cpp
index 9650a8b2b5..7a50f11f6e 100644
--- a/samplecode/TransitionView.cpp
+++ b/samplecode/TransitionView.cpp
@@ -28,7 +28,7 @@ public:
fPrev = prev;
fPrev->setClipToBounds(false);
fPrev->setVisibleP(true);
- (void)SampleView::SetUsePipe(fPrev, false);
+ (void)SampleView::SetUsePipe(fPrev, SkOSMenu::kOffState);
//Not calling unref because fPrev is assumed to have been created, so
//this will result in a transfer of ownership
this->attachChildToBack(fPrev);
@@ -36,7 +36,7 @@ public:
fNext = next;
fNext->setClipToBounds(true);
fNext->setVisibleP(true);
- (void)SampleView::SetUsePipe(fNext, false);
+ (void)SampleView::SetUsePipe(fNext, SkOSMenu::kOffState);
//Calling unref because next is a newly created view and TransitionView
//is now the sole owner of fNext
this->attachChildToFront(fNext)->unref();
@@ -73,7 +73,7 @@ protected:
if (evt.isType(gReplaceTransitionEvt)) {
fPrev->detachFromParent();
fPrev = (SkView*)SkEventSink::FindSink(evt.getFast32());
- (void)SampleView::SetUsePipe(fPrev, false);
+ (void)SampleView::SetUsePipe(fPrev, SkOSMenu::kOffState);
//attach the new fPrev and call unref to balance the ref in onDraw
this->attachChildToBack(fPrev)->unref();
this->inval(NULL);
@@ -99,7 +99,7 @@ protected:
return;
if (is_overview(fNext) || is_overview(fPrev)) {
- fUsePipe = false;
+ fPipeState = SkOSMenu::kOffState;
}
SkScalar values[4];