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

Side by Side Diff: samplecode/SampleApp.cpp

Issue 1322433006: Rename flag from "distance field" to "device independent." (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: add legacy alias for chrome Created 5 years, 3 months 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 | « include/core/SkSurfaceProps.h ('k') | src/gpu/GrAtlasTextContext.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 1780 matching lines...) Expand 10 before | Expand all | Expand 10 after
1791 } 1791 }
1792 1792
1793 void SampleWindow::toggleFPS() { 1793 void SampleWindow::toggleFPS() {
1794 fMeasureFPS = !fMeasureFPS; 1794 fMeasureFPS = !fMeasureFPS;
1795 this->updateTitle(); 1795 this->updateTitle();
1796 this->inval(nullptr); 1796 this->inval(nullptr);
1797 } 1797 }
1798 1798
1799 void SampleWindow::toggleDistanceFieldFonts() { 1799 void SampleWindow::toggleDistanceFieldFonts() {
1800 SkSurfaceProps props = this->getSurfaceProps(); 1800 SkSurfaceProps props = this->getSurfaceProps();
1801 uint32_t flags = props.flags() ^ SkSurfaceProps::kUseDistanceFieldFonts_Flag ; 1801 uint32_t flags = props.flags() ^ SkSurfaceProps::kUseDeviceIndependentFonts_ Flag;
1802 this->setSurfaceProps(SkSurfaceProps(flags, props.pixelGeometry())); 1802 this->setSurfaceProps(SkSurfaceProps(flags, props.pixelGeometry()));
1803 1803
1804 this->updateTitle(); 1804 this->updateTitle();
1805 this->inval(nullptr); 1805 this->inval(nullptr);
1806 } 1806 }
1807 1807
1808 #include "SkDumpCanvas.h" 1808 #include "SkDumpCanvas.h"
1809 1809
1810 bool SampleWindow::onHandleKey(SkKey key) { 1810 bool SampleWindow::onHandleKey(SkKey key) {
1811 { 1811 {
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
1999 } 1999 }
2000 if (fAnimating) { 2000 if (fAnimating) {
2001 title.prepend("<A> "); 2001 title.prepend("<A> ");
2002 } 2002 }
2003 if (fRotate) { 2003 if (fRotate) {
2004 title.prepend("<R> "); 2004 title.prepend("<R> ");
2005 } 2005 }
2006 if (fPerspAnim) { 2006 if (fPerspAnim) {
2007 title.prepend("<K> "); 2007 title.prepend("<K> ");
2008 } 2008 }
2009 if (this->getSurfaceProps().flags() & SkSurfaceProps::kUseDistanceFieldFonts _Flag) { 2009 if (this->getSurfaceProps().flags() & SkSurfaceProps::kUseDeviceIndependentF onts_Flag) {
2010 title.prepend("<DFF> "); 2010 title.prepend("<DIF> ");
2011 } 2011 }
2012 2012
2013 title.prepend(trystate_str(fLCDState, "LCD ", "lcd ")); 2013 title.prepend(trystate_str(fLCDState, "LCD ", "lcd "));
2014 title.prepend(trystate_str(fAAState, "AA ", "aa ")); 2014 title.prepend(trystate_str(fAAState, "AA ", "aa "));
2015 title.prepend(gFilterQualityStates[fFilterQualityIndex].fLabel); 2015 title.prepend(gFilterQualityStates[fFilterQualityIndex].fLabel);
2016 title.prepend(trystate_str(fSubpixelState, "S ", "s ")); 2016 title.prepend(trystate_str(fSubpixelState, "S ", "s "));
2017 title.prepend(fFlipAxis & kFlipAxis_X ? "X " : nullptr); 2017 title.prepend(fFlipAxis & kFlipAxis_X ? "X " : nullptr);
2018 title.prepend(fFlipAxis & kFlipAxis_Y ? "Y " : nullptr); 2018 title.prepend(fFlipAxis & kFlipAxis_Y ? "Y " : nullptr);
2019 title.prepend(gHintingStates[fHintingState].label); 2019 title.prepend(gHintingStates[fHintingState].label);
2020 2020
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after
2392 setenv("ANDROID_ROOT", "/android/device/data", 0); 2392 setenv("ANDROID_ROOT", "/android/device/data", 0);
2393 #endif 2393 #endif
2394 SkGraphics::Init(); 2394 SkGraphics::Init();
2395 SkEvent::Init(); 2395 SkEvent::Init();
2396 } 2396 }
2397 2397
2398 void application_term() { 2398 void application_term() {
2399 SkEvent::Term(); 2399 SkEvent::Term();
2400 SkGraphics::Term(); 2400 SkGraphics::Term();
2401 } 2401 }
OLDNEW
« no previous file with comments | « include/core/SkSurfaceProps.h ('k') | src/gpu/GrAtlasTextContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698