Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(884)

Unified Diff: samplecode/GMSampleView.cpp

Issue 2316593003: Add GM/slide to simulate Android-style reveal clip (Closed)
Patch Set: address code review comments Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « include/effects/SkGaussianEdgeShader.h ('k') | src/effects/SkGaussianEdgeShader.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samplecode/GMSampleView.cpp
diff --git a/samplecode/GMSampleView.cpp b/samplecode/GMSampleView.cpp
index 80a6803148047cc848e37b3009c4bb94b2f02c38..5e48391787bdab8190d3c6af78905e0ec053928c 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);
}
« no previous file with comments | « include/effects/SkGaussianEdgeShader.h ('k') | src/effects/SkGaussianEdgeShader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698