Index: samplecode/SampleApp.cpp |
diff --git a/samplecode/SampleApp.cpp b/samplecode/SampleApp.cpp |
index 07a7a87b7fb2ac83b68a7f927d05ec751b456e99..462f1b0882fe6ecdfde43ab32bf64df7ca1249b3 100644 |
--- a/samplecode/SampleApp.cpp |
+++ b/samplecode/SampleApp.cpp |
@@ -1803,6 +1803,10 @@ void SampleWindow::toggleFPS() { |
} |
void SampleWindow::toggleDistanceFieldFonts() { |
+ // reset backend |
+ fDevManager->tearDownBackend(this); |
+ fDevManager->setUpBackend(this, fMSAASampleCount); |
+ |
SkSurfaceProps props = this->getSurfaceProps(); |
uint32_t flags = props.flags() ^ SkSurfaceProps::kUseDeviceIndependentFonts_Flag; |
this->setSurfaceProps(SkSurfaceProps(flags, props.pixelGeometry())); |