diff options
author | 2012-11-15 15:56:38 +0000 | |
---|---|---|
committer | 2012-11-15 15:56:38 +0000 | |
commit | a4f8137e67e31390b0e7edc5e637a3a02495d1a2 (patch) | |
tree | df9890332f678cdfa5a4fd1ffd9b552f5be6a6c4 /samplecode/SampleApp.cpp | |
parent | 2bde91dcb6f2840e01216054897fe98a930e9104 (diff) |
update srcmode GM to include aa/bw and gradients
add 'G' key to sampleapp, to toggle showing the GM's bounds as an overlay
git-svn-id: http://skia.googlecode.com/svn/trunk@6431 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'samplecode/SampleApp.cpp')
-rw-r--r-- | samplecode/SampleApp.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/samplecode/SampleApp.cpp b/samplecode/SampleApp.cpp index 5ff1b4e3c4..c94a772edf 100644 --- a/samplecode/SampleApp.cpp +++ b/samplecode/SampleApp.cpp @@ -92,6 +92,8 @@ SkTDArray<char> gTempDataStore; static SampleWindow* gSampleWindow; +static bool gShowGMBounds; + static void postEventToSink(SkEvent* evt, SkEventSink* sink) { evt->setTargetID(sink->getSinkID())->post(); } @@ -1731,6 +1733,8 @@ static void cleanup_for_filename(SkString* name) { } #endif +//extern bool gIgnoreFastBlurRect; + bool SampleWindow::onHandleChar(SkUnichar uni) { { SkView* view = curr_view(this); @@ -1773,6 +1777,11 @@ bool SampleWindow::onHandleChar(SkUnichar uni) { } switch (uni) { + case 'B': +// gIgnoreFastBlurRect = !gIgnoreFastBlurRect; + this->inval(NULL); + break; + case 'f': // only toggleFPS(); @@ -1781,6 +1790,12 @@ bool SampleWindow::onHandleChar(SkUnichar uni) { fRequestGrabImage = true; this->inval(NULL); break; + case 'G': + gShowGMBounds = !gShowGMBounds; + postEventToSink(GMSampleView::NewShowSizeEvt(gShowGMBounds), + curr_view(this)); + this->inval(NULL); + break; case 'i': this->zoomIn(); break; |