Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 26 matching lines...) Expand all Loading... | |
| 37 | 37 |
| 38 // TODO: potentialy fuse the fill & stroke methods and differentiate | 38 // TODO: potentialy fuse the fill & stroke methods and differentiate |
| 39 // between them by passing in strokeWidth (<0 means fill). | 39 // between them by passing in strokeWidth (<0 means fill). |
| 40 | 40 |
| 41 void fillAARect(GrGpu* gpu, | 41 void fillAARect(GrGpu* gpu, |
| 42 GrDrawTarget* target, | 42 GrDrawTarget* target, |
| 43 const GrRect& rect, | 43 const GrRect& rect, |
| 44 const SkMatrix& combinedMatrix, | 44 const SkMatrix& combinedMatrix, |
| 45 const GrRect& devRect, | 45 const GrRect& devRect, |
| 46 bool useVertexCoverage) { | 46 bool useVertexCoverage) { |
| 47 #define SHADER_AA_FILL_RECT 1 | |
|
bsalomon
2013/06/13 14:27:51
Are we ready for this?
robertphillips
2013/06/13 17:45:52
Not yet.
| |
| 47 #ifdef SHADER_AA_FILL_RECT | 48 #ifdef SHADER_AA_FILL_RECT |
| 49 | |
| 48 if (combinedMatrix.rectStaysRect()) { | 50 if (combinedMatrix.rectStaysRect()) { |
| 49 this->shaderFillAlignedAARect(gpu, target, | 51 this->shaderFillAlignedAARect(gpu, target, |
| 50 rect, combinedMatrix); | 52 rect, combinedMatrix); |
| 51 } else { | 53 } else { |
| 52 this->shaderFillAARect(gpu, target, | 54 this->shaderFillAARect(gpu, target, |
| 53 rect, combinedMatrix); | 55 rect, combinedMatrix); |
| 54 } | 56 } |
| 55 #else | 57 #else |
| 56 this->geometryFillAARect(gpu, target, | 58 this->geometryFillAARect(gpu, target, |
| 57 rect, combinedMatrix, | 59 rect, combinedMatrix, |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 105 void geometryStrokeAARect(GrGpu* gpu, | 107 void geometryStrokeAARect(GrGpu* gpu, |
| 106 GrDrawTarget* target, | 108 GrDrawTarget* target, |
| 107 const SkRect& devOutside, | 109 const SkRect& devOutside, |
| 108 const SkRect& devInside, | 110 const SkRect& devInside, |
| 109 bool useVertexCoverage); | 111 bool useVertexCoverage); |
| 110 | 112 |
| 111 typedef GrRefCnt INHERITED; | 113 typedef GrRefCnt INHERITED; |
| 112 }; | 114 }; |
| 113 | 115 |
| 114 #endif // GrAARectRenderer_DEFINED | 116 #endif // GrAARectRenderer_DEFINED |
| OLD | NEW |