OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |