| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2012 Google Inc. | 3 * Copyright 2012 Google Inc. |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 #include "GrAAConvexPathRenderer.h" | 9 #include "GrAAConvexPathRenderer.h" |
| 10 | 10 |
| (...skipping 661 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 672 // Doesn't work without derivative instructions. | 672 // Doesn't work without derivative instructions. |
| 673 return d->fCaps->shaderCaps()->shaderDerivativeSupport() ? | 673 return d->fCaps->shaderCaps()->shaderDerivativeSupport() ? |
| 674 QuadEdgeEffect::Create(GrRandomColor(d->fRandom), | 674 QuadEdgeEffect::Create(GrRandomColor(d->fRandom), |
| 675 GrTest::TestMatrix(d->fRandom), | 675 GrTest::TestMatrix(d->fRandom), |
| 676 d->fRandom->nextBool()) : NULL; | 676 d->fRandom->nextBool()) : NULL; |
| 677 } | 677 } |
| 678 | 678 |
| 679 /////////////////////////////////////////////////////////////////////////////// | 679 /////////////////////////////////////////////////////////////////////////////// |
| 680 | 680 |
| 681 bool GrAAConvexPathRenderer::onCanDrawPath(const CanDrawPathArgs& args) const { | 681 bool GrAAConvexPathRenderer::onCanDrawPath(const CanDrawPathArgs& args) const { |
| 682 return (args.fTarget->caps()->shaderCaps()->shaderDerivativeSupport() && arg
s.fAntiAlias && | 682 return (args.fShaderCaps->shaderDerivativeSupport() && args.fAntiAlias && |
| 683 args.fStroke->isFillStyle() && !args.fPath->isInverseFillType() && | 683 args.fStroke->isFillStyle() && !args.fPath->isInverseFillType() && |
| 684 args.fPath->isConvex()); | 684 args.fPath->isConvex()); |
| 685 } | 685 } |
| 686 | 686 |
| 687 // extract the result vertices and indices from the GrAAConvexTessellator | 687 // extract the result vertices and indices from the GrAAConvexTessellator |
| 688 static void extract_verts(const GrAAConvexTessellator& tess, | 688 static void extract_verts(const GrAAConvexTessellator& tess, |
| 689 void* vertices, | 689 void* vertices, |
| 690 size_t vertexStride, | 690 size_t vertexStride, |
| 691 GrColor color, | 691 GrColor color, |
| 692 uint16_t* idxs, | 692 uint16_t* idxs, |
| (...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1015 BATCH_TEST_DEFINE(AAConvexPathBatch) { | 1015 BATCH_TEST_DEFINE(AAConvexPathBatch) { |
| 1016 AAConvexPathBatch::Geometry geometry; | 1016 AAConvexPathBatch::Geometry geometry; |
| 1017 geometry.fColor = GrRandomColor(random); | 1017 geometry.fColor = GrRandomColor(random); |
| 1018 geometry.fViewMatrix = GrTest::TestMatrixInvertible(random); | 1018 geometry.fViewMatrix = GrTest::TestMatrixInvertible(random); |
| 1019 geometry.fPath = GrTest::TestPathConvex(random); | 1019 geometry.fPath = GrTest::TestPathConvex(random); |
| 1020 | 1020 |
| 1021 return AAConvexPathBatch::Create(geometry); | 1021 return AAConvexPathBatch::Create(geometry); |
| 1022 } | 1022 } |
| 1023 | 1023 |
| 1024 #endif | 1024 #endif |
| OLD | NEW |