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

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

Issue 1809733002: detach -> release (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: (C) Created 4 years, 9 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/GrDrawPathBatch.cpp ('k') | src/gpu/gl/GrGLExtensions.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 /* 2 /*
3 * Copyright 2012 Google Inc. 3 * Copyright 2012 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 #include "GrStencilAndCoverPathRenderer.h" 10 #include "GrStencilAndCoverPathRenderer.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 SkAutoTUnref<GrPath> path( 53 SkAutoTUnref<GrPath> path(
54 static_cast<GrPath*>(resourceProvider->findAndRefResourceByUniqueKey(key ))); 54 static_cast<GrPath*>(resourceProvider->findAndRefResourceByUniqueKey(key )));
55 if (!path) { 55 if (!path) {
56 path.reset(resourceProvider->createPath(skPath, stroke)); 56 path.reset(resourceProvider->createPath(skPath, stroke));
57 if (!isVolatile) { 57 if (!isVolatile) {
58 resourceProvider->assignUniqueKeyToResource(key, path); 58 resourceProvider->assignUniqueKeyToResource(key, path);
59 } 59 }
60 } else { 60 } else {
61 SkASSERT(path->isEqualTo(skPath, stroke)); 61 SkASSERT(path->isEqualTo(skPath, stroke));
62 } 62 }
63 return path.detach(); 63 return path.release();
64 } 64 }
65 65
66 void GrStencilAndCoverPathRenderer::onStencilPath(const StencilPathArgs& args) { 66 void GrStencilAndCoverPathRenderer::onStencilPath(const StencilPathArgs& args) {
67 GR_AUDIT_TRAIL_AUTO_FRAME(args.fTarget->getAuditTrail(), 67 GR_AUDIT_TRAIL_AUTO_FRAME(args.fTarget->getAuditTrail(),
68 "GrStencilAndCoverPathRenderer::onStencilPath"); 68 "GrStencilAndCoverPathRenderer::onStencilPath");
69 SkASSERT(!args.fPath->isInverseFillType()); 69 SkASSERT(!args.fPath->isInverseFillType());
70 SkAutoTUnref<GrPath> p(get_gr_path(fResourceProvider, *args.fPath, *args.fSt roke)); 70 SkAutoTUnref<GrPath> p(get_gr_path(fResourceProvider, *args.fPath, *args.fSt roke));
71 args.fTarget->stencilPath(*args.fPipelineBuilder, *args.fViewMatrix, p, p->g etFillType()); 71 args.fTarget->stencilPath(*args.fPipelineBuilder, *args.fViewMatrix, p, p->g etFillType());
72 } 72 }
73 73
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 142
143 pipelineBuilder->setStencil(kStencilPass); 143 pipelineBuilder->setStencil(kStencilPass);
144 SkAutoTUnref<GrDrawPathBatchBase> batch( 144 SkAutoTUnref<GrDrawPathBatchBase> batch(
145 GrDrawPathBatch::Create(viewMatrix, args.fColor, p->getFillType( ), p)); 145 GrDrawPathBatch::Create(viewMatrix, args.fColor, p->getFillType( ), p));
146 args.fTarget->drawPathBatch(*pipelineBuilder, batch); 146 args.fTarget->drawPathBatch(*pipelineBuilder, batch);
147 } 147 }
148 148
149 pipelineBuilder->stencil()->setDisabled(); 149 pipelineBuilder->stencil()->setDisabled();
150 return true; 150 return true;
151 } 151 }
OLDNEW
« no previous file with comments | « src/gpu/batches/GrDrawPathBatch.cpp ('k') | src/gpu/gl/GrGLExtensions.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698