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

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

Issue 15080010: Add special handling of rectori case for gpu (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Added unit test Created 7 years, 7 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
« no previous file with comments | « include/core/SkPath.h ('k') | src/core/SkPath.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 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 8
9 #ifndef GrAARectRenderer_DEFINED 9 #ifndef GrAARectRenderer_DEFINED
10 #define GrAARectRenderer_DEFINED 10 #define GrAARectRenderer_DEFINED
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 rect, combinedMatrix, 57 rect, combinedMatrix,
58 devRect, useVertexCoverage); 58 devRect, useVertexCoverage);
59 #endif 59 #endif
60 } 60 }
61 61
62 void strokeAARect(GrGpu* gpu, 62 void strokeAARect(GrGpu* gpu,
63 GrDrawTarget* target, 63 GrDrawTarget* target,
64 const GrRect& rect, 64 const GrRect& rect,
65 const SkMatrix& combinedMatrix, 65 const SkMatrix& combinedMatrix,
66 const GrRect& devRect, 66 const GrRect& devRect,
67 const GrVec& devStrokeSize, 67 SkScalar width,
68 bool useVertexCoverage); 68 bool useVertexCoverage);
69 69
70 // First rect is outer; second rect is inner
71 void fillAANestedRects(GrGpu* gpu,
72 GrDrawTarget* target,
73 const SkRect rects[2],
74 const SkMatrix& combinedMatrix,
75 bool useVertexCoverage);
76
70 private: 77 private:
71 GrIndexBuffer* fAAFillRectIndexBuffer; 78 GrIndexBuffer* fAAFillRectIndexBuffer;
72 GrIndexBuffer* fAAStrokeRectIndexBuffer; 79 GrIndexBuffer* fAAStrokeRectIndexBuffer;
73 80
74 GrIndexBuffer* aaFillRectIndexBuffer(GrGpu* gpu); 81 GrIndexBuffer* aaFillRectIndexBuffer(GrGpu* gpu);
75 82
76 static int aaStrokeRectIndexCount(); 83 static int aaStrokeRectIndexCount();
77 GrIndexBuffer* aaStrokeRectIndexBuffer(GrGpu* gpu); 84 GrIndexBuffer* aaStrokeRectIndexBuffer(GrGpu* gpu);
78 85
79 // TODO: Remove the useVertexCoverage boolean. Just use it all the time 86 // TODO: Remove the useVertexCoverage boolean. Just use it all the time
80 // since we now have a coverage vertex attribute 87 // since we now have a coverage vertex attribute
81 void geometryFillAARect(GrGpu* gpu, 88 void geometryFillAARect(GrGpu* gpu,
82 GrDrawTarget* target, 89 GrDrawTarget* target,
83 const GrRect& rect, 90 const GrRect& rect,
84 const SkMatrix& combinedMatrix, 91 const SkMatrix& combinedMatrix,
85 const GrRect& devRect, 92 const GrRect& devRect,
86 bool useVertexCoverage); 93 bool useVertexCoverage);
87 94
88 void shaderFillAARect(GrGpu* gpu, 95 void shaderFillAARect(GrGpu* gpu,
89 GrDrawTarget* target, 96 GrDrawTarget* target,
90 const GrRect& rect, 97 const GrRect& rect,
91 const SkMatrix& combinedMatrix); 98 const SkMatrix& combinedMatrix);
92 99
93 void shaderFillAlignedAARect(GrGpu* gpu, 100 void shaderFillAlignedAARect(GrGpu* gpu,
94 GrDrawTarget* target, 101 GrDrawTarget* target,
95 const GrRect& rect, 102 const GrRect& rect,
96 const SkMatrix& combinedMatrix); 103 const SkMatrix& combinedMatrix);
97 104
105 void geometryStrokeAARect(GrGpu* gpu,
106 GrDrawTarget* target,
107 const SkRect& devOutside,
108 const SkRect& devInside,
109 bool useVertexCoverage);
110
98 typedef GrRefCnt INHERITED; 111 typedef GrRefCnt INHERITED;
99 }; 112 };
100 113
101 #endif // GrAARectRenderer_DEFINED 114 #endif // GrAARectRenderer_DEFINED
OLDNEW
« no previous file with comments | « include/core/SkPath.h ('k') | src/core/SkPath.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698