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

Side by Side Diff: src/gpu/GrRenderTarget.cpp

Issue 1344033002: Minor fix to attaching stencils (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 3 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/gl/GrGLRenderTarget.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 2011 Google Inc. 3 * Copyright 2011 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 "GrRenderTarget.h" 10 #include "GrRenderTarget.h"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 62
63 void GrRenderTarget::onAbandon() { 63 void GrRenderTarget::onAbandon() {
64 SkSafeSetNull(fStencilAttachment); 64 SkSafeSetNull(fStencilAttachment);
65 65
66 INHERITED::onAbandon(); 66 INHERITED::onAbandon();
67 } 67 }
68 68
69 /////////////////////////////////////////////////////////////////////////////// 69 ///////////////////////////////////////////////////////////////////////////////
70 70
71 bool GrRenderTargetPriv::attachStencilAttachment(GrStencilAttachment* stencil) { 71 bool GrRenderTargetPriv::attachStencilAttachment(GrStencilAttachment* stencil) {
72 if (!stencil && !fRenderTarget->fStencilAttachment) {
73 // No need to do any work since we currently don't have a stencil attach ment and
74 // we're not acctually adding one.
75 return true;
76 }
72 fRenderTarget->fStencilAttachment = stencil; 77 fRenderTarget->fStencilAttachment = stencil;
73 if (!fRenderTarget->completeStencilAttachment()) { 78 if (!fRenderTarget->completeStencilAttachment()) {
74 SkSafeSetNull(fRenderTarget->fStencilAttachment); 79 SkSafeSetNull(fRenderTarget->fStencilAttachment);
75 return false; 80 return false;
76 } 81 }
77 return true; 82 return true;
78 } 83 }
OLDNEW
« no previous file with comments | « no previous file | src/gpu/gl/GrGLRenderTarget.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698