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

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

Issue 2043203004: Fix instances where hwaa was wrong for mixed samples (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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
« no previous file with comments | « no previous file | src/gpu/batches/GrStencilAndCoverPathRenderer.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 954 matching lines...) Expand 10 before | Expand all | Expand 10 after
965 bool GrAAHairLinePathRenderer::onDrawPath(const DrawPathArgs& args) { 965 bool GrAAHairLinePathRenderer::onDrawPath(const DrawPathArgs& args) {
966 GR_AUDIT_TRAIL_AUTO_FRAME(args.fDrawContext->auditTrail(), 966 GR_AUDIT_TRAIL_AUTO_FRAME(args.fDrawContext->auditTrail(),
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, args.fDrawContext->isUnified Multisampled());
976 args.fDrawContext->isStencilBufferMultisam pled());
977 pipelineBuilder.setUserStencil(args.fUserStencilSettings); 976 pipelineBuilder.setUserStencil(args.fUserStencilSettings);
978 977
979 args.fDrawContext->drawBatch(pipelineBuilder, *args.fClip, batch); 978 args.fDrawContext->drawBatch(pipelineBuilder, *args.fClip, batch);
980 979
981 return true; 980 return true;
982 } 981 }
983 982
984 //////////////////////////////////////////////////////////////////////////////// /////////////////// 983 //////////////////////////////////////////////////////////////////////////////// ///////////////////
985 984
986 #ifdef GR_TEST_UTILS 985 #ifdef GR_TEST_UTILS
987 986
988 DRAW_BATCH_TEST_DEFINE(AAHairlineBatch) { 987 DRAW_BATCH_TEST_DEFINE(AAHairlineBatch) {
989 GrColor color = GrRandomColor(random); 988 GrColor color = GrRandomColor(random);
990 SkMatrix viewMatrix = GrTest::TestMatrix(random); 989 SkMatrix viewMatrix = GrTest::TestMatrix(random);
991 SkPath path = GrTest::TestPath(random); 990 SkPath path = GrTest::TestPath(random);
992 SkIRect devClipBounds; 991 SkIRect devClipBounds;
993 devClipBounds.setEmpty(); 992 devClipBounds.setEmpty();
994 return create_hairline_batch(color, viewMatrix, path, GrStyle::SimpleHairlin e(), devClipBounds); 993 return create_hairline_batch(color, viewMatrix, path, GrStyle::SimpleHairlin e(), devClipBounds);
995 } 994 }
996 995
997 #endif 996 #endif
OLDNEW
« no previous file with comments | « no previous file | src/gpu/batches/GrStencilAndCoverPathRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698