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

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

Issue 1419613005: Revert of Dependencies are now added between the drawTargets in GrPipeline (Closed) Base URL: https://skia.googlesource.com/skia.git@mdb-adddeps
Patch Set: Created 5 years, 2 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/GrPipeline.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 /* 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 64
65 void GrRenderTarget::onAbandon() { 65 void GrRenderTarget::onAbandon() {
66 SkSafeSetNull(fStencilAttachment); 66 SkSafeSetNull(fStencilAttachment);
67 fLastDrawTarget = nullptr; 67 fLastDrawTarget = nullptr;
68 68
69 INHERITED::onAbandon(); 69 INHERITED::onAbandon();
70 } 70 }
71 71
72 void GrRenderTarget::setLastDrawTarget(GrDrawTarget* dt) { 72 void GrRenderTarget::setLastDrawTarget(GrDrawTarget* dt) {
73 if (fLastDrawTarget) { 73 if (fLastDrawTarget) {
74 // The non-MDB world never closes so we can't check this condition
75 #ifdef ENABLE_MDB
76 SkASSERT(fLastDrawTarget->isClosed()); 74 SkASSERT(fLastDrawTarget->isClosed());
77 #endif
78 } 75 }
79 76
80 fLastDrawTarget = dt; 77 fLastDrawTarget = dt;
81 } 78 }
82 79
83 /////////////////////////////////////////////////////////////////////////////// 80 ///////////////////////////////////////////////////////////////////////////////
84 81
85 bool GrRenderTargetPriv::attachStencilAttachment(GrStencilAttachment* stencil) { 82 bool GrRenderTargetPriv::attachStencilAttachment(GrStencilAttachment* stencil) {
86 if (!stencil && !fRenderTarget->fStencilAttachment) { 83 if (!stencil && !fRenderTarget->fStencilAttachment) {
87 // No need to do any work since we currently don't have a stencil attach ment and 84 // No need to do any work since we currently don't have a stencil attach ment and
88 // we're not acctually adding one. 85 // we're not acctually adding one.
89 return true; 86 return true;
90 } 87 }
91 fRenderTarget->fStencilAttachment = stencil; 88 fRenderTarget->fStencilAttachment = stencil;
92 if (!fRenderTarget->completeStencilAttachment()) { 89 if (!fRenderTarget->completeStencilAttachment()) {
93 SkSafeSetNull(fRenderTarget->fStencilAttachment); 90 SkSafeSetNull(fRenderTarget->fStencilAttachment);
94 return false; 91 return false;
95 } 92 }
96 return true; 93 return true;
97 } 94 }
OLDNEW
« no previous file with comments | « src/gpu/GrPipeline.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698