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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « samplecode/SampleAnimatedText.cpp ('k') | samplecode/SampleShip.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2011 Google Inc. 2 * Copyright 2011 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "SampleApp.h" 8 #include "SampleApp.h"
9 9
10 #include "OverView.h" 10 #include "OverView.h"
(...skipping 1785 matching lines...) Expand 10 before | Expand all | Expand 10 after
1796 this->inval(nullptr); 1796 this->inval(nullptr);
1797 } 1797 }
1798 1798
1799 void SampleWindow::toggleFPS() { 1799 void SampleWindow::toggleFPS() {
1800 fMeasureFPS = !fMeasureFPS; 1800 fMeasureFPS = !fMeasureFPS;
1801 this->updateTitle(); 1801 this->updateTitle();
1802 this->inval(nullptr); 1802 this->inval(nullptr);
1803 } 1803 }
1804 1804
1805 void SampleWindow::toggleDistanceFieldFonts() { 1805 void SampleWindow::toggleDistanceFieldFonts() {
1806 // reset backend
1807 fDevManager->tearDownBackend(this);
1808 fDevManager->setUpBackend(this, fMSAASampleCount);
1809
1806 SkSurfaceProps props = this->getSurfaceProps(); 1810 SkSurfaceProps props = this->getSurfaceProps();
1807 uint32_t flags = props.flags() ^ SkSurfaceProps::kUseDeviceIndependentFonts_ Flag; 1811 uint32_t flags = props.flags() ^ SkSurfaceProps::kUseDeviceIndependentFonts_ Flag;
1808 this->setSurfaceProps(SkSurfaceProps(flags, props.pixelGeometry())); 1812 this->setSurfaceProps(SkSurfaceProps(flags, props.pixelGeometry()));
1809 1813
1810 this->updateTitle(); 1814 this->updateTitle();
1811 this->inval(nullptr); 1815 this->inval(nullptr);
1812 } 1816 }
1813 1817
1814 #include "SkDumpCanvas.h" 1818 #include "SkDumpCanvas.h"
1815 1819
(...skipping 587 matching lines...) Expand 10 before | Expand all | Expand 10 after
2403 #ifdef SK_BUILD_FOR_MAC 2407 #ifdef SK_BUILD_FOR_MAC
2404 setenv("ANDROID_ROOT", "/android/device/data", 0); 2408 setenv("ANDROID_ROOT", "/android/device/data", 0);
2405 #endif 2409 #endif
2406 SkGraphics::Init(); 2410 SkGraphics::Init();
2407 SkEvent::Init(); 2411 SkEvent::Init();
2408 } 2412 }
2409 2413
2410 void application_term() { 2414 void application_term() {
2411 SkEvent::Term(); 2415 SkEvent::Term();
2412 } 2416 }
OLDNEW
« 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