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

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

Issue 2175573004: Revert of Retract PipelineBuilder some more (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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"
20 #include "SkGeometry.h" 21 #include "SkGeometry.h"
21 #include "SkPathPriv.h" 22 #include "SkPathPriv.h"
22 #include "SkString.h" 23 #include "SkString.h"
23 #include "SkTraceEvent.h" 24 #include "SkTraceEvent.h"
24 #include "batches/GrVertexBatch.h" 25 #include "batches/GrVertexBatch.h"
25 #include "glsl/GrGLSLFragmentShaderBuilder.h" 26 #include "glsl/GrGLSLFragmentShaderBuilder.h"
26 #include "glsl/GrGLSLGeometryProcessor.h" 27 #include "glsl/GrGLSLGeometryProcessor.h"
27 #include "glsl/GrGLSLProgramDataManager.h" 28 #include "glsl/GrGLSLProgramDataManager.h"
28 #include "glsl/GrGLSLUniformHandler.h" 29 #include "glsl/GrGLSLUniformHandler.h"
29 #include "glsl/GrGLSLVarying.h" 30 #include "glsl/GrGLSLVarying.h"
(...skipping 963 matching lines...) Expand 10 before | Expand all | Expand 10 after
993 "GrAAConvexPathRenderer::onDrawPath"); 994 "GrAAConvexPathRenderer::onDrawPath");
994 SkASSERT(!args.fDrawContext->isUnifiedMultisampled()); 995 SkASSERT(!args.fDrawContext->isUnifiedMultisampled());
995 SkASSERT(!args.fShape->isEmpty()); 996 SkASSERT(!args.fShape->isEmpty());
996 997
997 SkPath path; 998 SkPath path;
998 args.fShape->asPath(&path); 999 args.fShape->asPath(&path);
999 1000
1000 SkAutoTUnref<GrDrawBatch> batch(new AAConvexPathBatch(args.fPaint->getColor( ), 1001 SkAutoTUnref<GrDrawBatch> batch(new AAConvexPathBatch(args.fPaint->getColor( ),
1001 *args.fViewMatrix, pat h)); 1002 *args.fViewMatrix, pat h));
1002 1003
1003 args.fDrawContext->drawBatch(*args.fPaint, *args.fClip, *args.fUserStencilSe ttings, batch); 1004 GrPipelineBuilder pipelineBuilder(*args.fPaint);
1005 pipelineBuilder.setUserStencil(args.fUserStencilSettings);
1006
1007 args.fDrawContext->drawBatch(pipelineBuilder, *args.fClip, batch);
1004 1008
1005 return true; 1009 return true;
1006 1010
1007 } 1011 }
1008 1012
1009 //////////////////////////////////////////////////////////////////////////////// /////////////////// 1013 //////////////////////////////////////////////////////////////////////////////// ///////////////////
1010 1014
1011 #ifdef GR_TEST_UTILS 1015 #ifdef GR_TEST_UTILS
1012 1016
1013 DRAW_BATCH_TEST_DEFINE(AAConvexPathBatch) { 1017 DRAW_BATCH_TEST_DEFINE(AAConvexPathBatch) {
1014 GrColor color = GrRandomColor(random); 1018 GrColor color = GrRandomColor(random);
1015 SkMatrix viewMatrix = GrTest::TestMatrixInvertible(random); 1019 SkMatrix viewMatrix = GrTest::TestMatrixInvertible(random);
1016 SkPath path = GrTest::TestPathConvex(random); 1020 SkPath path = GrTest::TestPathConvex(random);
1017 1021
1018 return new AAConvexPathBatch(color, viewMatrix, path); 1022 return new AAConvexPathBatch(color, viewMatrix, path);
1019 } 1023 }
1020 1024
1021 #endif 1025 #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