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

Unified Diff: samplecode/SampleApp.cpp

Issue 1410663005: Add text animation sample; tweak DrawShip sample (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Correct fix for CrOS Created 5 years, 1 month 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 | « samplecode/SampleAnimatedText.cpp ('k') | samplecode/SampleShip.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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()));
« no previous file with comments | « samplecode/SampleAnimatedText.cpp ('k') | samplecode/SampleShip.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698