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

Side by Side Diff: samplecode/SampleApp.cpp

Issue 2221103002: Analytic AntiAlias for Convex Shapes (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Make alpha computation cleaner and faster Created 4 years, 4 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
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 15 matching lines...) Expand all
26 #include "SkPictureRecorder.h" 26 #include "SkPictureRecorder.h"
27 #include "SkPM4fPriv.h" 27 #include "SkPM4fPriv.h"
28 #include "SkStream.h" 28 #include "SkStream.h"
29 #include "SkSurface.h" 29 #include "SkSurface.h"
30 #include "SkTemplates.h" 30 #include "SkTemplates.h"
31 #include "SkTSort.h" 31 #include "SkTSort.h"
32 #include "SkTime.h" 32 #include "SkTime.h"
33 #include "SkTypeface.h" 33 #include "SkTypeface.h"
34 #include "SkWindow.h" 34 #include "SkWindow.h"
35 #include "sk_tool_utils.h" 35 #include "sk_tool_utils.h"
36 #include "SkScan.h"
36 37
37 #if SK_SUPPORT_GPU 38 #if SK_SUPPORT_GPU
38 # include "gl/GrGLInterface.h" 39 # include "gl/GrGLInterface.h"
39 # include "gl/GrGLUtil.h" 40 # include "gl/GrGLUtil.h"
40 # include "GrContext.h" 41 # include "GrContext.h"
41 # include "SkGr.h" 42 # include "SkGr.h"
42 # if SK_ANGLE 43 # if SK_ANGLE
43 # include "gl/angle/GLTestContext_angle.h" 44 # include "gl/angle/GLTestContext_angle.h"
44 # endif 45 # endif
45 #else 46 #else
(...skipping 1630 matching lines...) Expand 10 before | Expand all | Expand 10 after
1676 if (this->sendAnimatePulse()) { 1677 if (this->sendAnimatePulse()) {
1677 this->inval(nullptr); 1678 this->inval(nullptr);
1678 } 1679 }
1679 break; 1680 break;
1680 case ' ': 1681 case ' ':
1681 gAnimTimer.togglePauseResume(); 1682 gAnimTimer.togglePauseResume();
1682 if (this->sendAnimatePulse()) { 1683 if (this->sendAnimatePulse()) {
1683 this->inval(nullptr); 1684 this->inval(nullptr);
1684 } 1685 }
1685 break; 1686 break;
1687 case 'A':
1688 GlobalAAConfig::getInstance().fUseAnalyticAA =
1689 !GlobalAAConfig::getInstance().fUseAnalyticAA;
1690 break;
1686 case 'B': 1691 case 'B':
1687 post_event_to_sink(new SkEvent("PictFileView::toggleBBox"), curr_vie w(this)); 1692 post_event_to_sink(new SkEvent("PictFileView::toggleBBox"), curr_vie w(this));
1688 // Cannot call updateTitle() synchronously, because the toggleBBox e vent is still in 1693 // Cannot call updateTitle() synchronously, because the toggleBBox e vent is still in
1689 // the queue. 1694 // the queue.
1690 post_event_to_sink(new SkEvent(gUpdateWindowTitleEvtName), this); 1695 post_event_to_sink(new SkEvent(gUpdateWindowTitleEvtName), this);
1691 this->inval(nullptr); 1696 this->inval(nullptr);
1692 break; 1697 break;
1693 case 'D': 1698 case 'D':
1694 toggleDistanceFieldFonts(); 1699 toggleDistanceFieldFonts();
1695 break; 1700 break;
(...skipping 574 matching lines...) Expand 10 before | Expand all | Expand 10 after
2270 #ifdef SK_BUILD_FOR_MAC 2275 #ifdef SK_BUILD_FOR_MAC
2271 setenv("ANDROID_ROOT", "/android/device/data", 0); 2276 setenv("ANDROID_ROOT", "/android/device/data", 0);
2272 #endif 2277 #endif
2273 SkGraphics::Init(); 2278 SkGraphics::Init();
2274 SkEvent::Init(); 2279 SkEvent::Init();
2275 } 2280 }
2276 2281
2277 void application_term() { 2282 void application_term() {
2278 SkEvent::Term(); 2283 SkEvent::Term();
2279 } 2284 }
OLDNEW
« no previous file with comments | « include/private/SkFixed.h ('k') | src/core/SkAntiRun.h » ('j') | src/core/SkAntiRun.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698