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

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

Issue 2092893003: Retract PipelineBuilder some more (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: update Created 4 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
« no previous file with comments | « src/gpu/GrSoftwarePathRenderer.cpp ('k') | src/gpu/batches/GrAADistanceFieldPathRenderer.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 * 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 "GrAAConvexPathRenderer.h" 8 #include "GrAAConvexPathRenderer.h"
9 9
10 #include "GrAAConvexTessellator.h" 10 #include "GrAAConvexTessellator.h"
11 #include "GrBatchFlushState.h" 11 #include "GrBatchFlushState.h"
12 #include "GrBatchTest.h" 12 #include "GrBatchTest.h"
13 #include "GrCaps.h" 13 #include "GrCaps.h"
14 #include "GrContext.h" 14 #include "GrContext.h"
15 #include "GrDefaultGeoProcFactory.h" 15 #include "GrDefaultGeoProcFactory.h"
16 #include "GrGeometryProcessor.h" 16 #include "GrGeometryProcessor.h"
17 #include "GrInvariantOutput.h" 17 #include "GrInvariantOutput.h"
18 #include "GrPathUtils.h" 18 #include "GrPathUtils.h"
19 #include "GrProcessor.h" 19 #include "GrProcessor.h"
20 #include "GrPipelineBuilder.h"
21 #include "SkGeometry.h" 20 #include "SkGeometry.h"
22 #include "SkPathPriv.h" 21 #include "SkPathPriv.h"
23 #include "SkString.h" 22 #include "SkString.h"
24 #include "SkTraceEvent.h" 23 #include "SkTraceEvent.h"
25 #include "batches/GrVertexBatch.h" 24 #include "batches/GrVertexBatch.h"
26 #include "glsl/GrGLSLFragmentShaderBuilder.h" 25 #include "glsl/GrGLSLFragmentShaderBuilder.h"
27 #include "glsl/GrGLSLGeometryProcessor.h" 26 #include "glsl/GrGLSLGeometryProcessor.h"
28 #include "glsl/GrGLSLProgramDataManager.h" 27 #include "glsl/GrGLSLProgramDataManager.h"
29 #include "glsl/GrGLSLUniformHandler.h" 28 #include "glsl/GrGLSLUniformHandler.h"
30 #include "glsl/GrGLSLVarying.h" 29 #include "glsl/GrGLSLVarying.h"
(...skipping 963 matching lines...) Expand 10 before | Expand all | Expand 10 after
994 "GrAAConvexPathRenderer::onDrawPath"); 993 "GrAAConvexPathRenderer::onDrawPath");
995 SkASSERT(!args.fDrawContext->isUnifiedMultisampled()); 994 SkASSERT(!args.fDrawContext->isUnifiedMultisampled());
996 SkASSERT(!args.fShape->isEmpty()); 995 SkASSERT(!args.fShape->isEmpty());
997 996
998 SkPath path; 997 SkPath path;
999 args.fShape->asPath(&path); 998 args.fShape->asPath(&path);
1000 999
1001 SkAutoTUnref<GrDrawBatch> batch(new AAConvexPathBatch(args.fPaint->getColor( ), 1000 SkAutoTUnref<GrDrawBatch> batch(new AAConvexPathBatch(args.fPaint->getColor( ),
1002 *args.fViewMatrix, pat h)); 1001 *args.fViewMatrix, pat h));
1003 1002
1004 GrPipelineBuilder pipelineBuilder(*args.fPaint); 1003 args.fDrawContext->drawBatch(*args.fPaint, *args.fClip, *args.fUserStencilSe ttings, batch);
1005 pipelineBuilder.setUserStencil(args.fUserStencilSettings);
1006
1007 args.fDrawContext->drawBatch(pipelineBuilder, *args.fClip, batch);
1008 1004
1009 return true; 1005 return true;
1010 1006
1011 } 1007 }
1012 1008
1013 //////////////////////////////////////////////////////////////////////////////// /////////////////// 1009 //////////////////////////////////////////////////////////////////////////////// ///////////////////
1014 1010
1015 #ifdef GR_TEST_UTILS 1011 #ifdef GR_TEST_UTILS
1016 1012
1017 DRAW_BATCH_TEST_DEFINE(AAConvexPathBatch) { 1013 DRAW_BATCH_TEST_DEFINE(AAConvexPathBatch) {
1018 GrColor color = GrRandomColor(random); 1014 GrColor color = GrRandomColor(random);
1019 SkMatrix viewMatrix = GrTest::TestMatrixInvertible(random); 1015 SkMatrix viewMatrix = GrTest::TestMatrixInvertible(random);
1020 SkPath path = GrTest::TestPathConvex(random); 1016 SkPath path = GrTest::TestPathConvex(random);
1021 1017
1022 return new AAConvexPathBatch(color, viewMatrix, path); 1018 return new AAConvexPathBatch(color, viewMatrix, path);
1023 } 1019 }
1024 1020
1025 #endif 1021 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrSoftwarePathRenderer.cpp ('k') | src/gpu/batches/GrAADistanceFieldPathRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698