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

Side by Side Diff: samplecode/SampleApp.cpp

Issue 692583002: WIP: GPU-accelerated trapezoidal path renderer. Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Rename GrTrapezoidalPathRenderer -> GrAAConcavePathRenderer; swap MSAA support for a coverage ramp. 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 | « gyp/gpu.gypi ('k') | samplecode/SampleConcavePaths.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"
11 #include "Resources.h" 11 #include "Resources.h"
12 #include "SampleCode.h" 12 #include "SampleCode.h"
13 #include "SamplePipeControllers.h" 13 #include "SamplePipeControllers.h"
14 #include "SkAnimTimer.h" 14 #include "SkAnimTimer.h"
15 #include "SkCanvas.h" 15 #include "SkCanvas.h"
16 #include "SkCommandLineFlags.h" 16 #include "SkCommandLineFlags.h"
17 #include "SkData.h" 17 #include "SkData.h"
18 #include "SkDevice.h" 18 #include "SkDevice.h"
19 #include "SkDocument.h" 19 #include "SkDocument.h"
20 #include "SkGPipe.h" 20 #include "SkGPipe.h"
21 #include "SkGraphics.h" 21 #include "SkGraphics.h"
22 #include "SkImageEncoder.h" 22 #include "SkImageEncoder.h"
23 #include "SkOSFile.h" 23 #include "SkOSFile.h"
24 #include "SkPaint.h" 24 #include "SkPaint.h"
25 #include "SkPaintFilterCanvas.h" 25 #include "SkPaintFilterCanvas.h"
26 #include "SkPicture.h" 26 #include "SkPicture.h"
27 #include "SkPictureRecorder.h" 27 #include "SkPictureRecorder.h"
28 #include "SkScan.h"
28 #include "SkStream.h" 29 #include "SkStream.h"
29 #include "SkSurface.h" 30 #include "SkSurface.h"
30 #include "SkTSort.h" 31 #include "SkTSort.h"
31 #include "SkTime.h" 32 #include "SkTime.h"
32 #include "SkTypeface.h" 33 #include "SkTypeface.h"
33 #include "SkWindow.h" 34 #include "SkWindow.h"
34 #include "sk_tool_utils.h" 35 #include "sk_tool_utils.h"
35 36
36 #if SK_SUPPORT_GPU 37 #if SK_SUPPORT_GPU
37 #include "gl/GrGLInterface.h" 38 #include "gl/GrGLInterface.h"
(...skipping 811 matching lines...) Expand 10 before | Expand all | Expand 10 after
849 #if SK_ANGLE 850 #if SK_ANGLE
850 "ANGLE", 851 "ANGLE",
851 #endif 852 #endif
852 #if SK_COMMAND_BUFFER 853 #if SK_COMMAND_BUFFER
853 "Command Buffer", 854 "Command Buffer",
854 #endif 855 #endif
855 nullptr); 856 nullptr);
856 fAppMenu->assignKeyEquivalentToItem(itemID, 'd'); 857 fAppMenu->assignKeyEquivalentToItem(itemID, 'd');
857 itemID = fAppMenu->appendTriState("AA", "AA", sinkID, fAAState); 858 itemID = fAppMenu->appendTriState("AA", "AA", sinkID, fAAState);
858 fAppMenu->assignKeyEquivalentToItem(itemID, 'b'); 859 fAppMenu->assignKeyEquivalentToItem(itemID, 'b');
860 itemID = fAppMenu->appendSwitch("Wireframe", "Wireframe", sinkID, false);
861 fAppMenu->assignKeyEquivalentToItem(itemID, 'w');
859 itemID = fAppMenu->appendTriState("LCD", "LCD", sinkID, fLCDState); 862 itemID = fAppMenu->appendTriState("LCD", "LCD", sinkID, fLCDState);
860 fAppMenu->assignKeyEquivalentToItem(itemID, 'l'); 863 fAppMenu->assignKeyEquivalentToItem(itemID, 'l');
861 itemID = fAppMenu->appendList("FilterQuality", "FilterQuality", sinkID, fFil terQualityIndex, 864 itemID = fAppMenu->appendList("FilterQuality", "FilterQuality", sinkID, fFil terQualityIndex,
862 gFilterQualityStates[0].fName, 865 gFilterQualityStates[0].fName,
863 gFilterQualityStates[1].fName, 866 gFilterQualityStates[1].fName,
864 gFilterQualityStates[2].fName, 867 gFilterQualityStates[2].fName,
865 gFilterQualityStates[3].fName, 868 gFilterQualityStates[3].fName,
866 gFilterQualityStates[4].fName, 869 gFilterQualityStates[4].fName,
867 nullptr); 870 nullptr);
868 fAppMenu->assignKeyEquivalentToItem(itemID, 'n'); 871 fAppMenu->assignKeyEquivalentToItem(itemID, 'n');
(...skipping 696 matching lines...) Expand 10 before | Expand all | Expand 10 after
1565 #endif 1568 #endif
1566 (void)SampleView::SetUsePipe(curr_view(this), fPipeState); 1569 (void)SampleView::SetUsePipe(curr_view(this), fPipeState);
1567 this->updateTitle(); 1570 this->updateTitle();
1568 this->inval(nullptr); 1571 this->inval(nullptr);
1569 return true; 1572 return true;
1570 } 1573 }
1571 if (SkOSMenu::FindSwitchState(evt, "Slide Show", nullptr)) { 1574 if (SkOSMenu::FindSwitchState(evt, "Slide Show", nullptr)) {
1572 this->toggleSlideshow(); 1575 this->toggleSlideshow();
1573 return true; 1576 return true;
1574 } 1577 }
1578 if (SkOSMenu::FindSwitchState(evt, "Wireframe", &SkScan::gWireframe)) {
1579 this->inval(NULL);
1580 return true;
1581 }
1575 if (SkOSMenu::FindTriState(evt, "AA", &fAAState) || 1582 if (SkOSMenu::FindTriState(evt, "AA", &fAAState) ||
1576 SkOSMenu::FindTriState(evt, "LCD", &fLCDState) || 1583 SkOSMenu::FindTriState(evt, "LCD", &fLCDState) ||
1577 SkOSMenu::FindListIndex(evt, "FilterQuality", &fFilterQualityIndex) || 1584 SkOSMenu::FindListIndex(evt, "FilterQuality", &fFilterQualityIndex) ||
1578 SkOSMenu::FindTriState(evt, "Subpixel", &fSubpixelState) || 1585 SkOSMenu::FindTriState(evt, "Subpixel", &fSubpixelState) ||
1579 SkOSMenu::FindListIndex(evt, "Hinting", &fHintingState) || 1586 SkOSMenu::FindListIndex(evt, "Hinting", &fHintingState) ||
1580 SkOSMenu::FindSwitchState(evt, "Clip", &fUseClip) || 1587 SkOSMenu::FindSwitchState(evt, "Clip", &fUseClip) ||
1581 SkOSMenu::FindSwitchState(evt, "Zoomer", &fShowZoomer) || 1588 SkOSMenu::FindSwitchState(evt, "Zoomer", &fShowZoomer) ||
1582 SkOSMenu::FindSwitchState(evt, "Magnify", &fMagnify)) 1589 SkOSMenu::FindSwitchState(evt, "Magnify", &fMagnify))
1583 { 1590 {
1584 this->inval(nullptr); 1591 this->inval(nullptr);
(...skipping 807 matching lines...) Expand 10 before | Expand all | Expand 10 after
2392 setenv("ANDROID_ROOT", "/android/device/data", 0); 2399 setenv("ANDROID_ROOT", "/android/device/data", 0);
2393 #endif 2400 #endif
2394 SkGraphics::Init(); 2401 SkGraphics::Init();
2395 SkEvent::Init(); 2402 SkEvent::Init();
2396 } 2403 }
2397 2404
2398 void application_term() { 2405 void application_term() {
2399 SkEvent::Term(); 2406 SkEvent::Term();
2400 SkGraphics::Term(); 2407 SkGraphics::Term();
2401 } 2408 }
OLDNEW
« no previous file with comments | « gyp/gpu.gypi ('k') | samplecode/SampleConcavePaths.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698