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

Side by Side Diff: src/gpu/batches/GrAALinearizingConvexPathRenderer.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 2015 Google Inc. 2 * Copyright 2015 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 "GrAALinearizingConvexPathRenderer.h" 8 #include "GrAALinearizingConvexPathRenderer.h"
9 9
10 #include "GrAAConvexTessellator.h" 10 #include "GrAAConvexTessellator.h"
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 geometry.fViewMatrix = *args.fViewMatrix; 330 geometry.fViewMatrix = *args.fViewMatrix;
331 geometry.fPath = *args.fPath; 331 geometry.fPath = *args.fPath;
332 bool fill = args.fStyle->isSimpleFill(); 332 bool fill = args.fStyle->isSimpleFill();
333 geometry.fStrokeWidth = fill ? -1.0f : args.fStyle->strokeRec().getWidth(); 333 geometry.fStrokeWidth = fill ? -1.0f : args.fStyle->strokeRec().getWidth();
334 geometry.fJoin = fill ? SkPaint::Join::kMiter_Join : args.fStyle->strokeRec( ).getJoin(); 334 geometry.fJoin = fill ? SkPaint::Join::kMiter_Join : args.fStyle->strokeRec( ).getJoin();
335 geometry.fMiterLimit = args.fStyle->strokeRec().getMiter(); 335 geometry.fMiterLimit = args.fStyle->strokeRec().getMiter();
336 336
337 SkAutoTUnref<GrDrawBatch> batch(AAFlatteningConvexPathBatch::Create(geometry )); 337 SkAutoTUnref<GrDrawBatch> batch(AAFlatteningConvexPathBatch::Create(geometry ));
338 338
339 GrPipelineBuilder pipelineBuilder(*args.fPaint, args.fDrawContext->isUnified Multisampled()); 339 GrPipelineBuilder pipelineBuilder(*args.fPaint, args.fDrawContext->isUnified Multisampled());
340 pipelineBuilder.setRenderTarget(args.fDrawContext->accessRenderTarget());
341 pipelineBuilder.setUserStencil(args.fUserStencilSettings); 340 pipelineBuilder.setUserStencil(args.fUserStencilSettings);
342 341
343 args.fDrawContext->drawBatch(pipelineBuilder, *args.fClip, batch); 342 args.fDrawContext->drawBatch(pipelineBuilder, *args.fClip, batch);
344 343
345 return true; 344 return true;
346 } 345 }
347 346
348 //////////////////////////////////////////////////////////////////////////////// /////////////////// 347 //////////////////////////////////////////////////////////////////////////////// ///////////////////
349 348
350 #ifdef GR_TEST_UTILS 349 #ifdef GR_TEST_UTILS
351 350
352 DRAW_BATCH_TEST_DEFINE(AAFlatteningConvexPathBatch) { 351 DRAW_BATCH_TEST_DEFINE(AAFlatteningConvexPathBatch) {
353 AAFlatteningConvexPathBatch::Geometry geometry; 352 AAFlatteningConvexPathBatch::Geometry geometry;
354 geometry.fColor = GrRandomColor(random); 353 geometry.fColor = GrRandomColor(random);
355 geometry.fViewMatrix = GrTest::TestMatrixInvertible(random); 354 geometry.fViewMatrix = GrTest::TestMatrixInvertible(random);
356 geometry.fPath = GrTest::TestPathConvex(random); 355 geometry.fPath = GrTest::TestPathConvex(random);
357 356
358 return AAFlatteningConvexPathBatch::Create(geometry); 357 return AAFlatteningConvexPathBatch::Create(geometry);
359 } 358 }
360 359
361 #endif 360 #endif
OLDNEW
« no previous file with comments | « src/gpu/batches/GrAAHairLinePathRenderer.cpp ('k') | src/gpu/batches/GrDashLinePathRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698