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

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

Issue 1117443002: create GrTestUtils.h, move some common functions into it (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 7 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
« no previous file with comments | « src/effects/gradients/SkTwoPointRadialGradient.cpp ('k') | src/gpu/GrDefaultGeoProcFactory.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 655 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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 }
OLDNEW
« no previous file with comments | « src/effects/gradients/SkTwoPointRadialGradient.cpp ('k') | src/gpu/GrDefaultGeoProcFactory.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698