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

Side by Side Diff: src/gpu/GrPathRendererChain.h

Issue 2335343008: Add optional sw generated path coverage mask caching (Closed)
Patch Set: Add .fs to literals in new gm Created 4 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 | « src/gpu/GrDrawingManager.cpp ('k') | src/gpu/GrPathRendererChain.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 #ifndef GrPathRendererChain_DEFINED 8 #ifndef GrPathRendererChain_DEFINED
9 #define GrPathRendererChain_DEFINED 9 #define GrPathRendererChain_DEFINED
10 10
11 #include "GrPathRenderer.h" 11 #include "GrPathRenderer.h"
12 12
13 #include "SkTypes.h" 13 #include "SkTypes.h"
14 #include "SkTArray.h" 14 #include "SkTArray.h"
15 15
16 class GrContext; 16 class GrContext;
17 17
18 /** 18 /**
19 * Keeps track of an ordered list of path renderers. When a path needs to be 19 * Keeps track of an ordered list of path renderers. When a path needs to be
20 * drawn this list is scanned to find the most preferred renderer. To add your 20 * drawn this list is scanned to find the most preferred renderer. To add your
21 * path renderer to the list implement the GrPathRenderer::AddPathRenderers 21 * path renderer to the list implement the GrPathRenderer::AddPathRenderers
22 * function. 22 * function.
23 */ 23 */
24 class GrPathRendererChain : public SkNoncopyable { 24 class GrPathRendererChain : public SkNoncopyable {
25 public: 25 public:
26 struct Options { 26 struct Options {
27 bool fDisableDistanceFieldRenderer = false; 27 bool fDisableDistanceFieldRenderer = false;
28 bool fAllowPathMaskCaching = false;
29 bool fDisableAllPathRenderers = false;
28 }; 30 };
29 GrPathRendererChain(GrContext* context, const Options&); 31 GrPathRendererChain(GrContext* context, const Options&);
30 32
31 ~GrPathRendererChain(); 33 ~GrPathRendererChain();
32 34
33 /** Documents how the caller plans to use a GrPathRenderer to draw a path. I t affects the PR 35 /** Documents how the caller plans to use a GrPathRenderer to draw a path. I t affects the PR
34 returned by getPathRenderer */ 36 returned by getPathRenderer */
35 enum DrawType { 37 enum DrawType {
36 kColor_DrawType, // draw to the color buffer, no AA 38 kColor_DrawType, // draw to the color buffer, no AA
37 kColorAntiAlias_DrawType, // draw to color buffer, with partia l coverage AA 39 kColorAntiAlias_DrawType, // draw to color buffer, with partia l coverage AA
(...skipping 15 matching lines...) Expand all
53 // takes a ref and unrefs in destructor 55 // takes a ref and unrefs in destructor
54 GrPathRenderer* addPathRenderer(GrPathRenderer* pr); 56 GrPathRenderer* addPathRenderer(GrPathRenderer* pr);
55 57
56 enum { 58 enum {
57 kPreAllocCount = 8, 59 kPreAllocCount = 8,
58 }; 60 };
59 SkSTArray<kPreAllocCount, GrPathRenderer*, true> fChain; 61 SkSTArray<kPreAllocCount, GrPathRenderer*, true> fChain;
60 }; 62 };
61 63
62 #endif 64 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrDrawingManager.cpp ('k') | src/gpu/GrPathRendererChain.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698