Index: samplecode/SampleApp.cpp |
diff --git a/samplecode/SampleApp.cpp b/samplecode/SampleApp.cpp |
index 22e8b8aa1cbe338cd8891905b7d5262c736b07f9..404d7a7bc21366dfa4954d217e5e617f39812109 100644 |
--- a/samplecode/SampleApp.cpp |
+++ b/samplecode/SampleApp.cpp |
@@ -25,6 +25,7 @@ |
#include "SkPaintFilterCanvas.h" |
#include "SkPicture.h" |
#include "SkPictureRecorder.h" |
+#include "SkScan.h" |
#include "SkStream.h" |
#include "SkSurface.h" |
#include "SkTSort.h" |
@@ -856,6 +857,8 @@ SampleWindow::SampleWindow(void* hwnd, int argc, char** argv, DeviceManager* dev |
fAppMenu->assignKeyEquivalentToItem(itemID, 'd'); |
itemID = fAppMenu->appendTriState("AA", "AA", sinkID, fAAState); |
fAppMenu->assignKeyEquivalentToItem(itemID, 'b'); |
+ itemID = fAppMenu->appendSwitch("Wireframe", "Wireframe", sinkID, false); |
+ fAppMenu->assignKeyEquivalentToItem(itemID, 'w'); |
itemID = fAppMenu->appendTriState("LCD", "LCD", sinkID, fLCDState); |
fAppMenu->assignKeyEquivalentToItem(itemID, 'l'); |
itemID = fAppMenu->appendList("FilterQuality", "FilterQuality", sinkID, fFilterQualityIndex, |
@@ -1572,6 +1575,10 @@ bool SampleWindow::onEvent(const SkEvent& evt) { |
this->toggleSlideshow(); |
return true; |
} |
+ if (SkOSMenu::FindSwitchState(evt, "Wireframe", &SkScan::gWireframe)) { |
+ this->inval(NULL); |
+ return true; |
+ } |
if (SkOSMenu::FindTriState(evt, "AA", &fAAState) || |
SkOSMenu::FindTriState(evt, "LCD", &fLCDState) || |
SkOSMenu::FindListIndex(evt, "FilterQuality", &fFilterQualityIndex) || |