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

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

Issue 2041113004: sk_sp for gpu. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Reserve correctly. 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/GrNonAAStrokeRectBatch.cpp ('k') | src/gpu/batches/GrTInstanceBatch.h » ('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 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 SkASSERT(!args.fIsAA || args.fDrawContext->isStencilBufferMultisampled());
73 73
74 GrPaint paint; 74 GrPaint paint;
75 SkSafeUnref(paint.setXPFactory(GrDisableColorXPFactory::Create())); 75 paint.setXPFactory(GrDisableColorXPFactory::Make());
76 paint.setAntiAlias(args.fIsAA); 76 paint.setAntiAlias(args.fIsAA);
77 77
78 const GrPipelineBuilder pipelineBuilder(paint, args.fIsAA); 78 const GrPipelineBuilder pipelineBuilder(paint, args.fIsAA);
79 79
80 SkASSERT(!args.fPath->isInverseFillType()); 80 SkASSERT(!args.fPath->isInverseFillType());
81 SkAutoTUnref<GrPath> path(get_gr_path(fResourceProvider, *args.fPath, GrStyl e::SimpleFill())); 81 SkAutoTUnref<GrPath> path(get_gr_path(fResourceProvider, *args.fPath, GrStyl e::SimpleFill()));
82 args.fDrawContext->drawContextPriv().stencilPath(pipelineBuilder, 82 args.fDrawContext->drawContextPriv().stencilPath(pipelineBuilder,
83 *args.fClip, 83 *args.fClip,
84 *args.fViewMatrix, 84 *args.fViewMatrix,
85 path, 85 path,
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 if (args.fAntiAlias) { 170 if (args.fAntiAlias) {
171 SkASSERT(args.fDrawContext->isStencilBufferMultisampled()); 171 SkASSERT(args.fDrawContext->isStencilBufferMultisampled());
172 pipelineBuilder.enableState(GrPipelineBuilder::kHWAntialias_Flag); 172 pipelineBuilder.enableState(GrPipelineBuilder::kHWAntialias_Flag);
173 } 173 }
174 174
175 args.fDrawContext->drawBatch(pipelineBuilder, *args.fClip, batch); 175 args.fDrawContext->drawBatch(pipelineBuilder, *args.fClip, batch);
176 } 176 }
177 177
178 return true; 178 return true;
179 } 179 }
OLDNEW
« no previous file with comments | « src/gpu/batches/GrNonAAStrokeRectBatch.cpp ('k') | src/gpu/batches/GrTInstanceBatch.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698