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

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