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

Side by Side Diff: src/gpu/batches/GrAAHairLinePathRenderer.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
OLDNEW
1 /* 1 /*
2 * Copyright 2011 Google Inc. 2 * Copyright 2011 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 "GrAAHairLinePathRenderer.h" 8 #include "GrAAHairLinePathRenderer.h"
9 9
10 #include "GrBatchFlushState.h" 10 #include "GrBatchFlushState.h"
11 #include "GrBatchTest.h" 11 #include "GrBatchTest.h"
12 #include "GrBuffer.h" 12 #include "GrBuffer.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 "GrPathUtils.h" 16 #include "GrPathUtils.h"
17 #include "GrPipelineBuilder.h"
18 #include "GrProcessor.h" 17 #include "GrProcessor.h"
19 #include "GrResourceProvider.h" 18 #include "GrResourceProvider.h"
20 #include "SkGeometry.h" 19 #include "SkGeometry.h"
21 #include "SkStroke.h" 20 #include "SkStroke.h"
22 #include "SkTemplates.h" 21 #include "SkTemplates.h"
23 22
24 #include "batches/GrVertexBatch.h" 23 #include "batches/GrVertexBatch.h"
25 24
26 #include "effects/GrBezierEffect.h" 25 #include "effects/GrBezierEffect.h"
27 26
(...skipping 932 matching lines...) Expand 10 before | Expand all | Expand 10 after
960 SkIRect devClipBounds; 959 SkIRect devClipBounds;
961 args.fClip->getConservativeBounds(args.fDrawContext->width(), args.fDrawCont ext->height(), 960 args.fClip->getConservativeBounds(args.fDrawContext->width(), args.fDrawCont ext->height(),
962 &devClipBounds); 961 &devClipBounds);
963 962
964 SkPath path; 963 SkPath path;
965 args.fShape->asPath(&path); 964 args.fShape->asPath(&path);
966 SkAutoTUnref<GrDrawBatch> batch(create_hairline_batch(args.fPaint->getColor( ), 965 SkAutoTUnref<GrDrawBatch> batch(create_hairline_batch(args.fPaint->getColor( ),
967 *args.fViewMatrix, pat h, 966 *args.fViewMatrix, pat h,
968 args.fShape->style(), devClipBounds)); 967 args.fShape->style(), devClipBounds));
969 968
970 GrPipelineBuilder pipelineBuilder(*args.fPaint); 969 args.fDrawContext->drawBatch(*args.fPaint, *args.fClip, *args.fUserStencilSe ttings, batch);
971 pipelineBuilder.setUserStencil(args.fUserStencilSettings);
972 args.fDrawContext->drawBatch(pipelineBuilder, *args.fClip, batch);
973
974 return true; 970 return true;
975 } 971 }
976 972
977 //////////////////////////////////////////////////////////////////////////////// /////////////////// 973 //////////////////////////////////////////////////////////////////////////////// ///////////////////
978 974
979 #ifdef GR_TEST_UTILS 975 #ifdef GR_TEST_UTILS
980 976
981 DRAW_BATCH_TEST_DEFINE(AAHairlineBatch) { 977 DRAW_BATCH_TEST_DEFINE(AAHairlineBatch) {
982 GrColor color = GrRandomColor(random); 978 GrColor color = GrRandomColor(random);
983 SkMatrix viewMatrix = GrTest::TestMatrix(random); 979 SkMatrix viewMatrix = GrTest::TestMatrix(random);
984 SkPath path = GrTest::TestPath(random); 980 SkPath path = GrTest::TestPath(random);
985 SkIRect devClipBounds; 981 SkIRect devClipBounds;
986 devClipBounds.setEmpty(); 982 devClipBounds.setEmpty();
987 return create_hairline_batch(color, viewMatrix, path, GrStyle::SimpleHairlin e(), devClipBounds); 983 return create_hairline_batch(color, viewMatrix, path, GrStyle::SimpleHairlin e(), devClipBounds);
988 } 984 }
989 985
990 #endif 986 #endif
OLDNEW
« no previous file with comments | « src/gpu/batches/GrAADistanceFieldPathRenderer.cpp ('k') | src/gpu/batches/GrAALinearizingConvexPathRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698