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

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

Issue 14854005: Add geometry-based rotated AA rect drawing path (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Updated to ToT 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 | « no previous file | src/gpu/GrAARectRenderer.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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 #ifdef SHADER_AA_FILL_RECT 47 #ifdef SHADER_AA_FILL_RECT
48 if (combinedMatrix.rectStaysRect()) { 48 if (combinedMatrix.rectStaysRect()) {
49 this->shaderFillAlignedAARect(gpu, target, 49 this->shaderFillAlignedAARect(gpu, target,
50 combinedMatrix, devRect); 50 combinedMatrix, devRect);
51 } else { 51 } else {
52 this->shaderFillAARect(gpu, target, 52 this->shaderFillAARect(gpu, target,
53 rect, combinedMatrix, devRect); 53 rect, combinedMatrix, devRect);
54 } 54 }
55 #else 55 #else
56 this->geometryFillAARect(gpu, target, 56 this->geometryFillAARect(gpu, target,
57 rect, combinedMatrix,
57 devRect, useVertexCoverage); 58 devRect, useVertexCoverage);
58 #endif 59 #endif
59 } 60 }
60 61
61 void strokeAARect(GrGpu* gpu, 62 void strokeAARect(GrGpu* gpu,
62 GrDrawTarget* target, 63 GrDrawTarget* target,
63 const GrRect& devRect, 64 const GrRect& devRect,
64 const GrVec& devStrokeSize, 65 const GrVec& devStrokeSize,
65 bool useVertexCoverage); 66 bool useVertexCoverage);
66 67
67 private: 68 private:
68 GrIndexBuffer* fAAFillRectIndexBuffer; 69 GrIndexBuffer* fAAFillRectIndexBuffer;
69 GrIndexBuffer* fAAStrokeRectIndexBuffer; 70 GrIndexBuffer* fAAStrokeRectIndexBuffer;
70 71
71 GrIndexBuffer* aaFillRectIndexBuffer(GrGpu* gpu); 72 GrIndexBuffer* aaFillRectIndexBuffer(GrGpu* gpu);
72 73
73 static int aaStrokeRectIndexCount(); 74 static int aaStrokeRectIndexCount();
74 GrIndexBuffer* aaStrokeRectIndexBuffer(GrGpu* gpu); 75 GrIndexBuffer* aaStrokeRectIndexBuffer(GrGpu* gpu);
75 76
76 // TODO: Remove the useVertexCoverage boolean. Just use it all the time 77 // TODO: Remove the useVertexCoverage boolean. Just use it all the time
77 // since we now have a coverage vertex attribute 78 // since we now have a coverage vertex attribute
78 void geometryFillAARect(GrGpu* gpu, 79 void geometryFillAARect(GrGpu* gpu,
79 GrDrawTarget* target, 80 GrDrawTarget* target,
81 const GrRect& rect,
82 const SkMatrix& combinedMatrix,
80 const GrRect& devRect, 83 const GrRect& devRect,
81 bool useVertexCoverage); 84 bool useVertexCoverage);
82 85
83 void shaderFillAARect(GrGpu* gpu, 86 void shaderFillAARect(GrGpu* gpu,
84 GrDrawTarget* target, 87 GrDrawTarget* target,
85 const GrRect& rect, 88 const GrRect& rect,
86 const SkMatrix& combinedMatrix, 89 const SkMatrix& combinedMatrix,
87 const GrRect& devRect); 90 const GrRect& devRect);
88 91
89 void shaderFillAlignedAARect(GrGpu* gpu, 92 void shaderFillAlignedAARect(GrGpu* gpu,
90 GrDrawTarget* target, 93 GrDrawTarget* target,
91 const GrRect& rect, 94 const GrRect& rect,
92 const SkMatrix& combinedMatrix, 95 const SkMatrix& combinedMatrix,
93 const GrRect& devRect); 96 const GrRect& devRect);
94 97
95 typedef GrRefCnt INHERITED; 98 typedef GrRefCnt INHERITED;
96 }; 99 };
97 100
98 #endif // GrAARectRenderer_DEFINED 101 #endif // GrAARectRenderer_DEFINED
OLDNEW
« no previous file with comments | « no previous file | src/gpu/GrAARectRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698