Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(108)

Side by Side Diff: src/gpu/GrAAConvexPathRenderer.cpp

Issue 1213623022: fix up test create functions (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: more cleanup Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 650 matching lines...) Expand 10 before | Expand all | Expand 10 after
661 SkMatrix fLocalMatrix; 661 SkMatrix fLocalMatrix;
662 bool fUsesLocalCoords; 662 bool fUsesLocalCoords;
663 663
664 GR_DECLARE_GEOMETRY_PROCESSOR_TEST; 664 GR_DECLARE_GEOMETRY_PROCESSOR_TEST;
665 665
666 typedef GrGeometryProcessor INHERITED; 666 typedef GrGeometryProcessor INHERITED;
667 }; 667 };
668 668
669 GR_DEFINE_GEOMETRY_PROCESSOR_TEST(QuadEdgeEffect); 669 GR_DEFINE_GEOMETRY_PROCESSOR_TEST(QuadEdgeEffect);
670 670
671 GrGeometryProcessor* QuadEdgeEffect::TestCreate(SkRandom* random, 671 GrGeometryProcessor* QuadEdgeEffect::TestCreate(GrProcessorTestData* d) {
672 GrContext*,
673 const GrCaps& caps,
674 GrTexture*[]) {
675 // Doesn't work without derivative instructions. 672 // Doesn't work without derivative instructions.
676 return caps.shaderCaps()->shaderDerivativeSupport() ? 673 return d->fCaps->shaderCaps()->shaderDerivativeSupport() ?
677 QuadEdgeEffect::Create(GrRandomColor(random), 674 QuadEdgeEffect::Create(GrRandomColor(d->fRandom),
678 GrTest::TestMatrix(random), 675 GrTest::TestMatrix(d->fRandom),
679 random->nextBool()) : NULL; 676 d->fRandom->nextBool()) : NULL;
680 } 677 }
681 678
682 /////////////////////////////////////////////////////////////////////////////// 679 ///////////////////////////////////////////////////////////////////////////////
683 680
684 bool GrAAConvexPathRenderer::canDrawPath(const GrDrawTarget* target, 681 bool GrAAConvexPathRenderer::canDrawPath(const GrDrawTarget* target,
685 const GrPipelineBuilder*, 682 const GrPipelineBuilder*,
686 const SkMatrix& viewMatrix, 683 const SkMatrix& viewMatrix,
687 const SkPath& path, 684 const SkPath& path,
688 const GrStrokeInfo& stroke, 685 const GrStrokeInfo& stroke,
689 bool antiAlias) const { 686 bool antiAlias) const {
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
1017 BATCH_TEST_DEFINE(AAConvexPathBatch) { 1014 BATCH_TEST_DEFINE(AAConvexPathBatch) {
1018 AAConvexPathBatch::Geometry geometry; 1015 AAConvexPathBatch::Geometry geometry;
1019 geometry.fColor = GrRandomColor(random); 1016 geometry.fColor = GrRandomColor(random);
1020 geometry.fViewMatrix = GrTest::TestMatrixInvertible(random); 1017 geometry.fViewMatrix = GrTest::TestMatrixInvertible(random);
1021 geometry.fPath = GrTest::TestPathConvex(random); 1018 geometry.fPath = GrTest::TestPathConvex(random);
1022 1019
1023 return AAConvexPathBatch::Create(geometry); 1020 return AAConvexPathBatch::Create(geometry);
1024 } 1021 }
1025 1022
1026 #endif 1023 #endif
OLDNEW
« no previous file with comments | « src/effects/gradients/SkTwoPointConicalGradient_gpu.cpp ('k') | src/gpu/GrDefaultGeoProcFactory.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698