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

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

Issue 858343002: Rename GrOptDrawState to GrPipeline and GrDrawState to GrPipelineBuilder (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: more nits Created 5 years, 11 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/GrAAConvexPathRenderer.cpp ('k') | src/gpu/GrAADistanceFieldPathRenderer.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 /* 2 /*
3 * Copyright 2014 Google Inc. 3 * Copyright 2014 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 #ifndef GrAADistanceFieldPathRenderer_DEFINED 9 #ifndef GrAADistanceFieldPathRenderer_DEFINED
10 #define GrAADistanceFieldPathRenderer_DEFINED 10 #define GrAADistanceFieldPathRenderer_DEFINED
11 11
12 #include "GrAtlas.h" 12 #include "GrAtlas.h"
13 #include "GrPathRenderer.h" 13 #include "GrPathRenderer.h"
14 #include "GrRect.h" 14 #include "GrRect.h"
15 15
16 #include "SkChecksum.h" 16 #include "SkChecksum.h"
17 #include "SkTDynamicHash.h" 17 #include "SkTDynamicHash.h"
18 18
19 class GrContext; 19 class GrContext;
20 class GrPlot; 20 class GrPlot;
21 21
22 class GrAADistanceFieldPathRenderer : public GrPathRenderer { 22 class GrAADistanceFieldPathRenderer : public GrPathRenderer {
23 public: 23 public:
24 GrAADistanceFieldPathRenderer(GrContext* context); 24 GrAADistanceFieldPathRenderer(GrContext* context);
25 virtual ~GrAADistanceFieldPathRenderer(); 25 virtual ~GrAADistanceFieldPathRenderer();
26 26
27 virtual bool canDrawPath(const GrDrawTarget*, 27 virtual bool canDrawPath(const GrDrawTarget*,
28 const GrDrawState*, 28 const GrPipelineBuilder*,
29 const SkMatrix& viewMatrix, 29 const SkMatrix& viewMatrix,
30 const SkPath&, 30 const SkPath&,
31 const SkStrokeRec&, 31 const SkStrokeRec&,
32 bool antiAlias) const SK_OVERRIDE; 32 bool antiAlias) const SK_OVERRIDE;
33 33
34 protected: 34 protected:
35 virtual StencilSupport onGetStencilSupport(const GrDrawTarget*, 35 virtual StencilSupport onGetStencilSupport(const GrDrawTarget*,
36 const GrDrawState*, 36 const GrPipelineBuilder*,
37 const SkPath&, 37 const SkPath&,
38 const SkStrokeRec&) const SK_OVER RIDE; 38 const SkStrokeRec&) const SK_OVER RIDE;
39 39
40 virtual bool onDrawPath(GrDrawTarget*, 40 virtual bool onDrawPath(GrDrawTarget*,
41 GrDrawState*, 41 GrPipelineBuilder*,
42 GrColor, 42 GrColor,
43 const SkMatrix& viewMatrix, 43 const SkMatrix& viewMatrix,
44 const SkPath&, 44 const SkPath&,
45 const SkStrokeRec&, 45 const SkStrokeRec&,
46 bool antiAlias) SK_OVERRIDE; 46 bool antiAlias) SK_OVERRIDE;
47 47
48 private: 48 private:
49 struct PathData { 49 struct PathData {
50 struct Key { 50 struct Key {
51 uint32_t fGenID; 51 uint32_t fGenID;
(...skipping 22 matching lines...) Expand all
74 74
75 GrContext* fContext; 75 GrContext* fContext;
76 GrAtlas* fAtlas; 76 GrAtlas* fAtlas;
77 SkAutoTUnref<GrGeometryProcessor> fCachedGeometryProcessor; 77 SkAutoTUnref<GrGeometryProcessor> fCachedGeometryProcessor;
78 // current set of flags used to create the cached geometry processor 78 // current set of flags used to create the cached geometry processor
79 uint32_t fEffectFlags; 79 uint32_t fEffectFlags;
80 GrAtlas::ClientPlotUsage fPlotUsage; 80 GrAtlas::ClientPlotUsage fPlotUsage;
81 SkTDynamicHash<PathData, PathData::Key> fPathCache; 81 SkTDynamicHash<PathData, PathData::Key> fPathCache;
82 PathDataList fPathList; 82 PathDataList fPathList;
83 83
84 bool internalDrawPath(GrDrawTarget*, GrDrawState*, GrColor, const SkMatrix& viewMatrix, 84 bool internalDrawPath(GrDrawTarget*, GrPipelineBuilder*, GrColor, const SkMa trix& viewMatrix,
85 const SkPath& path, const PathData* pathData); 85 const SkPath& path, const PathData* pathData);
86 PathData* addPathToAtlas(const SkPath& path, const SkStrokeRec& stroke, bool antiAlias, 86 PathData* addPathToAtlas(const SkPath& path, const SkStrokeRec& stroke, bool antiAlias,
87 uint32_t dimension, SkScalar scale); 87 uint32_t dimension, SkScalar scale);
88 bool freeUnusedPlot(); 88 bool freeUnusedPlot();
89 89
90 typedef GrPathRenderer INHERITED; 90 typedef GrPathRenderer INHERITED;
91 }; 91 };
92 92
93 #endif 93 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrAAConvexPathRenderer.cpp ('k') | src/gpu/GrAADistanceFieldPathRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698