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

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

Issue 1988923002: Remove GrRenderTarget from GrPipelineBuilder (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: update to ToT Created 4 years, 6 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"
(...skipping 956 matching lines...) Expand 10 before | Expand all | Expand 10 after
967 "GrAAHairlinePathRenderer::onDrawPath"); 967 "GrAAHairlinePathRenderer::onDrawPath");
968 SkIRect devClipBounds; 968 SkIRect devClipBounds;
969 args.fClip->getConservativeBounds(args.fDrawContext->width(), args.fDrawCont ext->height(), 969 args.fClip->getConservativeBounds(args.fDrawContext->width(), args.fDrawCont ext->height(),
970 &devClipBounds); 970 &devClipBounds);
971 971
972 SkAutoTUnref<GrDrawBatch> batch(create_hairline_batch(args.fColor, *args.fVi ewMatrix, *args.fPath, 972 SkAutoTUnref<GrDrawBatch> batch(create_hairline_batch(args.fColor, *args.fVi ewMatrix, *args.fPath,
973 *args.fStyle, devClipB ounds)); 973 *args.fStyle, devClipB ounds));
974 974
975 GrPipelineBuilder pipelineBuilder(*args.fPaint, 975 GrPipelineBuilder pipelineBuilder(*args.fPaint,
976 args.fDrawContext->isStencilBufferMultisam pled()); 976 args.fDrawContext->isStencilBufferMultisam pled());
977 pipelineBuilder.setRenderTarget(args.fDrawContext->accessRenderTarget());
978 pipelineBuilder.setUserStencil(args.fUserStencilSettings); 977 pipelineBuilder.setUserStencil(args.fUserStencilSettings);
979 978
980 args.fDrawContext->drawBatch(pipelineBuilder, *args.fClip, batch); 979 args.fDrawContext->drawBatch(pipelineBuilder, *args.fClip, batch);
981 980
982 return true; 981 return true;
983 } 982 }
984 983
985 //////////////////////////////////////////////////////////////////////////////// /////////////////// 984 //////////////////////////////////////////////////////////////////////////////// ///////////////////
986 985
987 #ifdef GR_TEST_UTILS 986 #ifdef GR_TEST_UTILS
988 987
989 DRAW_BATCH_TEST_DEFINE(AAHairlineBatch) { 988 DRAW_BATCH_TEST_DEFINE(AAHairlineBatch) {
990 GrColor color = GrRandomColor(random); 989 GrColor color = GrRandomColor(random);
991 SkMatrix viewMatrix = GrTest::TestMatrix(random); 990 SkMatrix viewMatrix = GrTest::TestMatrix(random);
992 SkPath path = GrTest::TestPath(random); 991 SkPath path = GrTest::TestPath(random);
993 SkIRect devClipBounds; 992 SkIRect devClipBounds;
994 devClipBounds.setEmpty(); 993 devClipBounds.setEmpty();
995 return create_hairline_batch(color, viewMatrix, path, GrStyle::SimpleHairlin e(), devClipBounds); 994 return create_hairline_batch(color, viewMatrix, path, GrStyle::SimpleHairlin e(), devClipBounds);
996 } 995 }
997 996
998 #endif 997 #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