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

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

Issue 23712005: Add bevel-stroke support in GrAARectRenderer (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright 2012 Google Inc. 2 * Copyright 2012 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 GrAARectRenderer_DEFINED 8 #ifndef GrAARectRenderer_DEFINED
9 #define GrAARectRenderer_DEFINED 9 #define GrAARectRenderer_DEFINED
10 10
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 devRect, useVertexCoverage); 57 devRect, useVertexCoverage);
58 #endif 58 #endif
59 } 59 }
60 60
61 void strokeAARect(GrGpu* gpu, 61 void strokeAARect(GrGpu* gpu,
62 GrDrawTarget* target, 62 GrDrawTarget* target,
63 const SkRect& rect, 63 const SkRect& rect,
64 const SkMatrix& combinedMatrix, 64 const SkMatrix& combinedMatrix,
65 const SkRect& devRect, 65 const SkRect& devRect,
66 SkScalar width, 66 SkScalar width,
67 bool useVertexCoverage); 67 bool useVertexCoverage,
68 bool miterStroke);
68 69
69 // First rect is outer; second rect is inner 70 // First rect is outer; second rect is inner
70 void fillAANestedRects(GrGpu* gpu, 71 void fillAANestedRects(GrGpu* gpu,
71 GrDrawTarget* target, 72 GrDrawTarget* target,
72 const SkRect rects[2], 73 const SkRect rects[2],
73 const SkMatrix& combinedMatrix, 74 const SkMatrix& combinedMatrix,
74 bool useVertexCoverage); 75 bool useVertexCoverage);
75 76
76 private: 77 private:
77 GrIndexBuffer* fAAFillRectIndexBuffer; 78 GrIndexBuffer* fAAFillRectIndexBuffer;
78 GrIndexBuffer* fAAStrokeRectIndexBuffer; 79 GrIndexBuffer* fAAStrokeRectIndexBuffer;
79 80
80 GrIndexBuffer* aaFillRectIndexBuffer(GrGpu* gpu); 81 GrIndexBuffer* aaFillRectIndexBuffer(GrGpu* gpu);
81 82
82 static int aaStrokeRectIndexCount(); 83 static int aaStrokeRectIndexCount(bool miterStroke);
83 GrIndexBuffer* aaStrokeRectIndexBuffer(GrGpu* gpu); 84 GrIndexBuffer* aaStrokeRectIndexBuffer(GrGpu* gpu, bool miterStroke);
84 85
85 // TODO: Remove the useVertexCoverage boolean. Just use it all the time 86 // TODO: Remove the useVertexCoverage boolean. Just use it all the time
86 // since we now have a coverage vertex attribute 87 // since we now have a coverage vertex attribute
87 void geometryFillAARect(GrGpu* gpu, 88 void geometryFillAARect(GrGpu* gpu,
88 GrDrawTarget* target, 89 GrDrawTarget* target,
89 const SkRect& rect, 90 const SkRect& rect,
90 const SkMatrix& combinedMatrix, 91 const SkMatrix& combinedMatrix,
91 const SkRect& devRect, 92 const SkRect& devRect,
92 bool useVertexCoverage); 93 bool useVertexCoverage);
93 94
94 void shaderFillAARect(GrGpu* gpu, 95 void shaderFillAARect(GrGpu* gpu,
95 GrDrawTarget* target, 96 GrDrawTarget* target,
96 const SkRect& rect, 97 const SkRect& rect,
97 const SkMatrix& combinedMatrix); 98 const SkMatrix& combinedMatrix);
98 99
99 void shaderFillAlignedAARect(GrGpu* gpu, 100 void shaderFillAlignedAARect(GrGpu* gpu,
100 GrDrawTarget* target, 101 GrDrawTarget* target,
101 const SkRect& rect, 102 const SkRect& rect,
102 const SkMatrix& combinedMatrix); 103 const SkMatrix& combinedMatrix);
103 104
104 void geometryStrokeAARect(GrGpu* gpu, 105 void geometryStrokeAARect(GrGpu* gpu,
105 GrDrawTarget* target, 106 GrDrawTarget* target,
106 const SkRect& devOutside, 107 const SkRect& devOutside,
108 const SkRect& devOutsideAssist,
107 const SkRect& devInside, 109 const SkRect& devInside,
108 bool useVertexCoverage); 110 bool useVertexCoverage,
111 bool miterStroke);
109 112
110 typedef SkRefCnt INHERITED; 113 typedef SkRefCnt INHERITED;
111 }; 114 };
112 115
113 #endif // GrAARectRenderer_DEFINED 116 #endif // GrAARectRenderer_DEFINED
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698