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 #include "GrAARectRenderer.h" | 8 #include "GrAARectRenderer.h" |
9 #include "GrBatch.h" | 9 #include "GrBatch.h" |
10 #include "GrBatchTarget.h" | 10 #include "GrBatchTarget.h" |
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
220 } | 220 } |
221 | 221 |
222 if (this->color() != that->color()) { | 222 if (this->color() != that->color()) { |
223 fBatch.fColor = GrColor_ILLEGAL; | 223 fBatch.fColor = GrColor_ILLEGAL; |
224 } | 224 } |
225 fGeoData.push_back_n(that->geoData()->count(), that->geoData()->begin())
; | 225 fGeoData.push_back_n(that->geoData()->count(), that->geoData()->begin())
; |
226 return true; | 226 return true; |
227 } | 227 } |
228 | 228 |
229 void generateAAFillRectGeometry(void* vertices, | 229 void generateAAFillRectGeometry(void* vertices, |
230 uint32_t offset, | 230 size_t offset, |
231 uint32_t vertexStride, | 231 size_t vertexStride, |
232 GrColor color, | 232 GrColor color, |
233 const SkMatrix& viewMatrix, | 233 const SkMatrix& viewMatrix, |
234 const SkRect& rect, | 234 const SkRect& rect, |
235 const SkRect& devRect, | 235 const SkRect& devRect, |
236 bool tweakAlphaForCoverage) const { | 236 bool tweakAlphaForCoverage) const { |
237 intptr_t verts = reinterpret_cast<intptr_t>(vertices) + offset; | 237 intptr_t verts = reinterpret_cast<intptr_t>(vertices) + offset; |
238 | 238 |
239 SkPoint* fan0Pos = reinterpret_cast<SkPoint*>(verts); | 239 SkPoint* fan0Pos = reinterpret_cast<SkPoint*>(verts); |
240 SkPoint* fan1Pos = reinterpret_cast<SkPoint*>(verts + 4 * vertexStride); | 240 SkPoint* fan1Pos = reinterpret_cast<SkPoint*>(verts + 4 * vertexStride); |
241 | 241 |
(...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
723 | 723 |
724 if (devInside.isEmpty()) { | 724 if (devInside.isEmpty()) { |
725 this->fillAARect(target, pipelineBuilder, color, viewMatrix, devOutside, | 725 this->fillAARect(target, pipelineBuilder, color, viewMatrix, devOutside, |
726 devOutside); | 726 devOutside); |
727 return; | 727 return; |
728 } | 728 } |
729 | 729 |
730 this->geometryStrokeAARect(target, pipelineBuilder, color, viewMatrix, devOu
tside, | 730 this->geometryStrokeAARect(target, pipelineBuilder, color, viewMatrix, devOu
tside, |
731 devOutsideAssist, devInside, true); | 731 devOutsideAssist, devInside, true); |
732 } | 732 } |
OLD | NEW |