aboutsummaryrefslogtreecommitdiffhomepage
path: root/samplecode
diff options
context:
space:
mode:
authorGravatar robertphillips <robertphillips@google.com>2016-09-08 09:02:43 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-09-08 09:02:44 -0700
commit05a4cf59591024d838b204bb0f6fac42598ead28 (patch)
tree9744866d58622ba2e16ec391cc8859972fbd928f /samplecode
parent51761d12d00fb1ebe7c63efce91b0e84b4afac5c (diff)
Add GM/slide to simulate Android-style reveal clip
Hopefully, this will let us play w/ geometric and shader-based solutions. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2316593003 Committed: https://skia.googlesource.com/skia/+/ffac5c4aae18fc706e4077763c190a89c8507fb0 Review-Url: https://codereview.chromium.org/2316593003
Diffstat (limited to 'samplecode')
-rw-r--r--samplecode/GMSampleView.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/samplecode/GMSampleView.cpp b/samplecode/GMSampleView.cpp
index 80a6803148..5e48391787 100644
--- a/samplecode/GMSampleView.cpp
+++ b/samplecode/GMSampleView.cpp
@@ -26,6 +26,15 @@ bool GMSampleView::onQuery(SkEvent* evt) {
SampleCode::TitleR(evt, name.c_str());
return true;
}
+
+ SkUnichar uni;
+ if (SampleCode::CharQ(*evt, &uni)) {
+ if (fGM->handleKey(uni)) {
+ this->inval(nullptr);
+ return true;
+ }
+ }
+
return this->INHERITED::onQuery(evt);
}