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

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

Issue 783763002: Initial CL to move color / coverage off of drawstate (Closed) Base URL: https://skia.googlesource.com/skia.git@no-static-gp
Patch Set: bug fix Created 6 years 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
(...skipping 20 matching lines...) Expand all
31 bool antiAlias) const SK_OVERRIDE; 31 bool antiAlias) const SK_OVERRIDE;
32 32
33 protected: 33 protected:
34 virtual StencilSupport onGetStencilSupport(const GrDrawTarget*, 34 virtual StencilSupport onGetStencilSupport(const GrDrawTarget*,
35 const GrDrawState*, 35 const GrDrawState*,
36 const SkPath&, 36 const SkPath&,
37 const SkStrokeRec&) const SK_OVER RIDE; 37 const SkStrokeRec&) const SK_OVER RIDE;
38 38
39 virtual bool onDrawPath(GrDrawTarget*, 39 virtual bool onDrawPath(GrDrawTarget*,
40 GrDrawState*, 40 GrDrawState*,
41 GrColor,
41 const SkPath&, 42 const SkPath&,
42 const SkStrokeRec&, 43 const SkStrokeRec&,
43 bool antiAlias) SK_OVERRIDE; 44 bool antiAlias) SK_OVERRIDE;
44 45
45 private: 46 private:
46 struct PathData { 47 struct PathData {
47 struct Key { 48 struct Key {
48 uint32_t fGenID; 49 uint32_t fGenID;
49 // rendered size for stored path (32x32 max, 64x64 max, 128x128 max) 50 // rendered size for stored path (32x32 max, 64x64 max, 128x128 max)
50 uint32_t fDimension; 51 uint32_t fDimension;
(...skipping 20 matching lines...) Expand all
71 72
72 GrContext* fContext; 73 GrContext* fContext;
73 GrAtlas* fAtlas; 74 GrAtlas* fAtlas;
74 SkAutoTUnref<GrGeometryProcessor> fCachedGeometryProcessor; 75 SkAutoTUnref<GrGeometryProcessor> fCachedGeometryProcessor;
75 // current set of flags used to create the cached geometry processor 76 // current set of flags used to create the cached geometry processor
76 uint32_t fEffectFlags; 77 uint32_t fEffectFlags;
77 GrAtlas::ClientPlotUsage fPlotUsage; 78 GrAtlas::ClientPlotUsage fPlotUsage;
78 SkTDynamicHash<PathData, PathData::Key> fPathCache; 79 SkTDynamicHash<PathData, PathData::Key> fPathCache;
79 PathDataList fPathList; 80 PathDataList fPathList;
80 81
81 bool internalDrawPath(GrDrawTarget*, GrDrawState*, const SkPath& path, 82 bool internalDrawPath(GrDrawTarget*, GrDrawState*, GrColor, const SkPath& pa th,
82 const PathData* pathData); 83 const PathData* pathData);
83 PathData* addPathToAtlas(const SkPath& path, const SkStrokeRec& stroke, bool antiAlias, 84 PathData* addPathToAtlas(const SkPath& path, const SkStrokeRec& stroke, bool antiAlias,
84 uint32_t dimension, SkScalar scale); 85 uint32_t dimension, SkScalar scale);
85 bool freeUnusedPlot(); 86 bool freeUnusedPlot();
86 87
87 typedef GrPathRenderer INHERITED; 88 typedef GrPathRenderer INHERITED;
88 }; 89 };
89 90
90 #endif 91 #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