OLD | NEW |
1 | |
2 /* | 1 /* |
3 * Copyright 2011 Google Inc. | 2 * Copyright 2011 Google Inc. |
4 * | 3 * |
5 * 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 |
6 * found in the LICENSE file. | 5 * found in the LICENSE file. |
7 */ | 6 */ |
8 | 7 |
9 | 8 |
10 #include "GrRenderTarget.h" | 9 #include "GrRenderTarget.h" |
11 | 10 |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 bool GrRenderTargetPriv::attachStencilAttachment(GrStencilAttachment* stencil) { | 94 bool GrRenderTargetPriv::attachStencilAttachment(GrStencilAttachment* stencil) { |
96 if (!stencil && !fRenderTarget->fStencilAttachment) { | 95 if (!stencil && !fRenderTarget->fStencilAttachment) { |
97 // No need to do any work since we currently don't have a stencil attach
ment and | 96 // No need to do any work since we currently don't have a stencil attach
ment and |
98 // we're not acctually adding one. | 97 // we're not acctually adding one. |
99 return true; | 98 return true; |
100 } | 99 } |
101 fRenderTarget->fStencilAttachment = stencil; | 100 fRenderTarget->fStencilAttachment = stencil; |
102 if (!fRenderTarget->completeStencilAttachment()) { | 101 if (!fRenderTarget->completeStencilAttachment()) { |
103 SkSafeSetNull(fRenderTarget->fStencilAttachment); | 102 SkSafeSetNull(fRenderTarget->fStencilAttachment); |
104 return false; | 103 return false; |
105 } | 104 } |
106 return true; | 105 return true; |
107 } | 106 } |
108 | 107 |
109 const GrGpu::MultisampleSpecs& | 108 const GrGpu::MultisampleSpecs& |
110 GrRenderTargetPriv::getMultisampleSpecs(const GrStencilSettings& stencil) const
{ | 109 GrRenderTargetPriv::getMultisampleSpecs(const GrStencilSettings& stencil) const
{ |
111 return fRenderTarget->getGpu()->getMultisampleSpecs(fRenderTarget, stencil); | 110 return fRenderTarget->getGpu()->getMultisampleSpecs(fRenderTarget, stencil); |
112 } | 111 } |
OLD | NEW |