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

Side by Side Diff: samplecode/SampleApp.cpp

Issue 2410303002: Add AA Analytic Compile Flag (and small fixes) (Closed)
Patch Set: Created 4 years, 2 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 | « no previous file | src/core/SkScan.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 1786 matching lines...) Expand 10 before | Expand all | Expand 10 after
1797 break; 1797 break;
1798 case ' ': 1798 case ' ':
1799 gAnimTimer.togglePauseResume(); 1799 gAnimTimer.togglePauseResume();
1800 if (this->sendAnimatePulse()) { 1800 if (this->sendAnimatePulse()) {
1801 this->inval(nullptr); 1801 this->inval(nullptr);
1802 } 1802 }
1803 break; 1803 break;
1804 case 'A': 1804 case 'A':
1805 gSkUseAnalyticAA = !gSkUseAnalyticAA.load(); 1805 gSkUseAnalyticAA = !gSkUseAnalyticAA.load();
1806 this->inval(nullptr); 1806 this->inval(nullptr);
1807 this->updateTitle();
1807 break; 1808 break;
1808 case 'B': 1809 case 'B':
1809 post_event_to_sink(new SkEvent("PictFileView::toggleBBox"), curr_vie w(this)); 1810 post_event_to_sink(new SkEvent("PictFileView::toggleBBox"), curr_vie w(this));
1810 // Cannot call updateTitle() synchronously, because the toggleBBox e vent is still in 1811 // Cannot call updateTitle() synchronously, because the toggleBBox e vent is still in
1811 // the queue. 1812 // the queue.
1812 post_event_to_sink(new SkEvent(gUpdateWindowTitleEvtName), this); 1813 post_event_to_sink(new SkEvent(gUpdateWindowTitleEvtName), this);
1813 this->inval(nullptr); 1814 this->inval(nullptr);
1814 break; 1815 break;
1815 case 'D': 1816 case 'D':
1816 toggleDistanceFieldFonts(); 1817 toggleDistanceFieldFonts();
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
2147 } 2148 }
2148 2149
2149 void SampleWindow::updateTitle() { 2150 void SampleWindow::updateTitle() {
2150 SkString title; 2151 SkString title;
2151 if (!this->getRawTitle(&title)) { 2152 if (!this->getRawTitle(&title)) {
2152 title.set("<unknown>"); 2153 title.set("<unknown>");
2153 } 2154 }
2154 2155
2155 title.prepend(gDeviceTypePrefix[fDeviceType]); 2156 title.prepend(gDeviceTypePrefix[fDeviceType]);
2156 2157
2158 if (gSkUseAnalyticAA) {
2159 title.prepend("<AAA> ");
2160 }
2157 if (fTilingMode != kNo_Tiling) { 2161 if (fTilingMode != kNo_Tiling) {
2158 title.prependf("<T: %s> ", gTilingInfo[fTilingMode].label); 2162 title.prependf("<T: %s> ", gTilingInfo[fTilingMode].label);
2159 } 2163 }
2160 if (fAnimating) { 2164 if (fAnimating) {
2161 title.prepend("<A> "); 2165 title.prepend("<A> ");
2162 } 2166 }
2163 if (fRotate) { 2167 if (fRotate) {
2164 title.prepend("<R> "); 2168 title.prepend("<R> ");
2165 } 2169 }
2166 if (fPerspAnim) { 2170 if (fPerspAnim) {
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
2392 #ifdef SK_BUILD_FOR_MAC 2396 #ifdef SK_BUILD_FOR_MAC
2393 setenv("ANDROID_ROOT", "/android/device/data", 0); 2397 setenv("ANDROID_ROOT", "/android/device/data", 0);
2394 #endif 2398 #endif
2395 SkGraphics::Init(); 2399 SkGraphics::Init();
2396 SkEvent::Init(); 2400 SkEvent::Init();
2397 } 2401 }
2398 2402
2399 void application_term() { 2403 void application_term() {
2400 SkEvent::Term(); 2404 SkEvent::Term();
2401 } 2405 }
OLDNEW
« no previous file with comments | « no previous file | src/core/SkScan.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698