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 655 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
666 | 666 |
667 GR_DEFINE_GEOMETRY_PROCESSOR_TEST(QuadEdgeEffect); | 667 GR_DEFINE_GEOMETRY_PROCESSOR_TEST(QuadEdgeEffect); |
668 | 668 |
669 GrGeometryProcessor* QuadEdgeEffect::TestCreate(SkRandom* random, | 669 GrGeometryProcessor* QuadEdgeEffect::TestCreate(SkRandom* random, |
670 GrContext*, | 670 GrContext*, |
671 const GrDrawTargetCaps& caps, | 671 const GrDrawTargetCaps& caps, |
672 GrTexture*[]) { | 672 GrTexture*[]) { |
673 // Doesn't work without derivative instructions. | 673 // Doesn't work without derivative instructions. |
674 return caps.shaderDerivativeSupport() ? | 674 return caps.shaderDerivativeSupport() ? |
675 QuadEdgeEffect::Create(GrRandomColor(random), | 675 QuadEdgeEffect::Create(GrRandomColor(random), |
676 GrProcessorUnitTest::TestMatrix(random)) : NUL
L; | 676 GrTest::TestMatrix(random)) : NULL; |
677 } | 677 } |
678 | 678 |
679 /////////////////////////////////////////////////////////////////////////////// | 679 /////////////////////////////////////////////////////////////////////////////// |
680 | 680 |
681 bool GrAAConvexPathRenderer::canDrawPath(const GrDrawTarget* target, | 681 bool GrAAConvexPathRenderer::canDrawPath(const GrDrawTarget* target, |
682 const GrPipelineBuilder*, | 682 const GrPipelineBuilder*, |
683 const SkMatrix& viewMatrix, | 683 const SkMatrix& viewMatrix, |
684 const SkPath& path, | 684 const SkPath& path, |
685 const GrStrokeInfo& stroke, | 685 const GrStrokeInfo& stroke, |
686 bool antiAlias) const { | 686 bool antiAlias) const { |
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
885 geometry.fColor = color; | 885 geometry.fColor = color; |
886 geometry.fViewMatrix = vm; | 886 geometry.fViewMatrix = vm; |
887 geometry.fPath = path; | 887 geometry.fPath = path; |
888 | 888 |
889 SkAutoTUnref<GrBatch> batch(AAConvexPathBatch::Create(geometry)); | 889 SkAutoTUnref<GrBatch> batch(AAConvexPathBatch::Create(geometry)); |
890 target->drawBatch(pipelineBuilder, batch, &devRect); | 890 target->drawBatch(pipelineBuilder, batch, &devRect); |
891 | 891 |
892 return true; | 892 return true; |
893 | 893 |
894 } | 894 } |
OLD | NEW |