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

Side by Side Diff: src/gpu/batches/GrStencilAndCoverPathRenderer.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 | « src/gpu/batches/GrAAHairLinePathRenderer.cpp ('k') | no next file » | 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 2012 Google Inc. 2 * Copyright 2012 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 8
9 #include "GrStencilAndCoverPathRenderer.h" 9 #include "GrStencilAndCoverPathRenderer.h"
10 #include "GrCaps.h" 10 #include "GrCaps.h"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 } 62 }
63 } else { 63 } else {
64 SkASSERT(path->isEqualTo(skPath, style)); 64 SkASSERT(path->isEqualTo(skPath, style));
65 } 65 }
66 return path.release(); 66 return path.release();
67 } 67 }
68 68
69 void GrStencilAndCoverPathRenderer::onStencilPath(const StencilPathArgs& args) { 69 void GrStencilAndCoverPathRenderer::onStencilPath(const StencilPathArgs& args) {
70 GR_AUDIT_TRAIL_AUTO_FRAME(args.fDrawContext->auditTrail(), 70 GR_AUDIT_TRAIL_AUTO_FRAME(args.fDrawContext->auditTrail(),
71 "GrStencilAndCoverPathRenderer::onStencilPath"); 71 "GrStencilAndCoverPathRenderer::onStencilPath");
72 SkASSERT(!args.fIsAA || args.fDrawContext->isStencilBufferMultisampled());
72 73
73 GrPaint paint; 74 GrPaint paint;
74 SkSafeUnref(paint.setXPFactory(GrDisableColorXPFactory::Create())); 75 SkSafeUnref(paint.setXPFactory(GrDisableColorXPFactory::Create()));
75 paint.setAntiAlias(args.fIsAA); 76 paint.setAntiAlias(args.fIsAA);
76 77
77 const GrPipelineBuilder pipelineBuilder(paint, args.fDrawContext->isUnifiedM ultisampled()); 78 GrPipelineBuilder pipelineBuilder(paint, args.fDrawContext->isUnifiedMultisa mpled());
79 pipelineBuilder.setState(GrPipelineBuilder::kHWAntialias_Flag, args.fIsAA);
78 80
79 SkASSERT(!args.fPath->isInverseFillType()); 81 SkASSERT(!args.fPath->isInverseFillType());
80 SkAutoTUnref<GrPath> path(get_gr_path(fResourceProvider, *args.fPath, GrStyl e::SimpleFill())); 82 SkAutoTUnref<GrPath> path(get_gr_path(fResourceProvider, *args.fPath, GrStyl e::SimpleFill()));
81 args.fDrawContext->drawContextPriv().stencilPath(pipelineBuilder, 83 args.fDrawContext->drawContextPriv().stencilPath(pipelineBuilder,
82 *args.fClip, 84 *args.fClip,
83 *args.fViewMatrix, 85 *args.fViewMatrix,
84 path, 86 path,
85 path->getFillType()); 87 path->getFillType());
86 } 88 }
87 89
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 if (args.fAntiAlias) { 182 if (args.fAntiAlias) {
181 SkASSERT(args.fDrawContext->isStencilBufferMultisampled()); 183 SkASSERT(args.fDrawContext->isStencilBufferMultisampled());
182 pipelineBuilder.enableState(GrPipelineBuilder::kHWAntialias_Flag); 184 pipelineBuilder.enableState(GrPipelineBuilder::kHWAntialias_Flag);
183 } 185 }
184 186
185 args.fDrawContext->drawBatch(pipelineBuilder, *args.fClip, batch); 187 args.fDrawContext->drawBatch(pipelineBuilder, *args.fClip, batch);
186 } 188 }
187 189
188 return true; 190 return true;
189 } 191 }
OLDNEW
« no previous file with comments | « src/gpu/batches/GrAAHairLinePathRenderer.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698