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

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

Issue 2041283002: Replace targetHasUnifiedMultisampling in GrPB constructor (Closed) Base URL: https://skia.googlesource.com/skia.git@fixdash
Patch Set: rebase 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 "GrPLSPathRenderer.h" 8 #include "GrPLSPathRenderer.h"
9 9
10 #include "SkChunkAlloc.h" 10 #include "SkChunkAlloc.h"
(...skipping 968 matching lines...) Expand 10 before | Expand all | Expand 10 after
979 } 979 }
980 SkASSERT(!inPLSDraw); 980 SkASSERT(!inPLSDraw);
981 SkDEBUGCODE(inPLSDraw = true;) 981 SkDEBUGCODE(inPLSDraw = true;)
982 PLSPathBatch::Geometry geometry; 982 PLSPathBatch::Geometry geometry;
983 geometry.fColor = args.fColor; 983 geometry.fColor = args.fColor;
984 geometry.fViewMatrix = *args.fViewMatrix; 984 geometry.fViewMatrix = *args.fViewMatrix;
985 geometry.fPath = *args.fPath; 985 geometry.fPath = *args.fPath;
986 986
987 SkAutoTUnref<GrDrawBatch> batch(PLSPathBatch::Create(geometry)); 987 SkAutoTUnref<GrDrawBatch> batch(PLSPathBatch::Create(geometry));
988 988
989 GrPipelineBuilder pipelineBuilder(*args.fPaint, args.fDrawContext->isUnified Multisampled()); 989 GrPipelineBuilder pipelineBuilder(*args.fPaint, args.fDrawContext->mustUseHW AA(*args.fPaint));
990 pipelineBuilder.setUserStencil(args.fUserStencilSettings); 990 pipelineBuilder.setUserStencil(args.fUserStencilSettings);
991 991
992 args.fDrawContext->drawBatch(pipelineBuilder, *args.fClip, batch); 992 args.fDrawContext->drawBatch(pipelineBuilder, *args.fClip, batch);
993 993
994 SkDEBUGCODE(inPLSDraw = false;) 994 SkDEBUGCODE(inPLSDraw = false;)
995 return true; 995 return true;
996 996
997 } 997 }
998 998
999 //////////////////////////////////////////////////////////////////////////////// /////////////////// 999 //////////////////////////////////////////////////////////////////////////////// ///////////////////
1000 1000
1001 #ifdef GR_TEST_UTILS 1001 #ifdef GR_TEST_UTILS
1002 1002
1003 DRAW_BATCH_TEST_DEFINE(PLSPathBatch) { 1003 DRAW_BATCH_TEST_DEFINE(PLSPathBatch) {
1004 PLSPathBatch::Geometry geometry; 1004 PLSPathBatch::Geometry geometry;
1005 geometry.fColor = GrRandomColor(random); 1005 geometry.fColor = GrRandomColor(random);
1006 geometry.fViewMatrix = GrTest::TestMatrixInvertible(random); 1006 geometry.fViewMatrix = GrTest::TestMatrixInvertible(random);
1007 geometry.fPath = GrTest::TestPathConvex(random); 1007 geometry.fPath = GrTest::TestPathConvex(random);
1008 1008
1009 return PLSPathBatch::Create(geometry); 1009 return PLSPathBatch::Create(geometry);
1010 } 1010 }
1011 1011
1012 #endif 1012 #endif
OLDNEW
« no previous file with comments | « src/gpu/batches/GrMSAAPathRenderer.cpp ('k') | src/gpu/batches/GrStencilAndCoverPathRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698