| 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 "GrRefCnt.h" | 9 #include "GrRefCnt.h" |
| 10 #include "GrGpu.h" | 10 #include "GrGpu.h" |
| (...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 356 | 356 |
| 357 int GrAARectRenderer::aaStrokeRectIndexCount() { | 357 int GrAARectRenderer::aaStrokeRectIndexCount() { |
| 358 return GR_ARRAY_COUNT(gStrokeAARectIdx); | 358 return GR_ARRAY_COUNT(gStrokeAARectIdx); |
| 359 } | 359 } |
| 360 | 360 |
| 361 GrIndexBuffer* GrAARectRenderer::aaStrokeRectIndexBuffer(GrGpu* gpu) { | 361 GrIndexBuffer* GrAARectRenderer::aaStrokeRectIndexBuffer(GrGpu* gpu) { |
| 362 if (NULL == fAAStrokeRectIndexBuffer) { | 362 if (NULL == fAAStrokeRectIndexBuffer) { |
| 363 fAAStrokeRectIndexBuffer = | 363 fAAStrokeRectIndexBuffer = |
| 364 gpu->createIndexBuffer(sizeof(gStrokeAARectIdx), false); | 364 gpu->createIndexBuffer(sizeof(gStrokeAARectIdx), false); |
| 365 if (NULL != fAAStrokeRectIndexBuffer) { | 365 if (NULL != fAAStrokeRectIndexBuffer) { |
| 366 #if GR_DEBUG | 366 #if SK_DEBUG |
| 367 bool updated = | 367 bool updated = |
| 368 #endif | 368 #endif |
| 369 fAAStrokeRectIndexBuffer->updateData(gStrokeAARectIdx, | 369 fAAStrokeRectIndexBuffer->updateData(gStrokeAARectIdx, |
| 370 sizeof(gStrokeAARectIdx)); | 370 sizeof(gStrokeAARectIdx)); |
| 371 GR_DEBUGASSERT(updated); | 371 GR_DEBUGASSERT(updated); |
| 372 } | 372 } |
| 373 } | 373 } |
| 374 return fAAStrokeRectIndexBuffer; | 374 return fAAStrokeRectIndexBuffer; |
| 375 } | 375 } |
| 376 | 376 |
| (...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 803 // can't call mapRect for devInside since it calls sort | 803 // can't call mapRect for devInside since it calls sort |
| 804 combinedMatrix.mapPoints((SkPoint*)&devInside, (const SkPoint*)&rects[1], 2)
; | 804 combinedMatrix.mapPoints((SkPoint*)&devInside, (const SkPoint*)&rects[1], 2)
; |
| 805 | 805 |
| 806 if (devInside.isEmpty()) { | 806 if (devInside.isEmpty()) { |
| 807 this->fillAARect(gpu, target, devOutside, SkMatrix::I(), devOutside, use
VertexCoverage); | 807 this->fillAARect(gpu, target, devOutside, SkMatrix::I(), devOutside, use
VertexCoverage); |
| 808 return; | 808 return; |
| 809 } | 809 } |
| 810 | 810 |
| 811 this->geometryStrokeAARect(gpu, target, devOutside, devInside, useVertexCove
rage); | 811 this->geometryStrokeAARect(gpu, target, devOutside, devInside, useVertexCove
rage); |
| 812 } | 812 } |
| OLD | NEW |