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
diff --git a/samplecode/TransitionView.cpp b/samplecode/TransitionView.cpp
index 9650a8b..7a50f11 100644
--- a/samplecode/TransitionView.cpp
+++ b/samplecode/TransitionView.cpp
@@ -28,7 +28,7 @@
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 @@
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 @@
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 @@
return;
if (is_overview(fNext) || is_overview(fPrev)) {
- fUsePipe = false;
+ fPipeState = SkOSMenu::kOffState;
}
SkScalar values[4];