| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 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 #include "GrResourceProvider.h" | 8 #include "GrResourceProvider.h" |
| 9 | 9 |
| 10 #include "GrBuffer.h" | 10 #include "GrBuffer.h" |
| (...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 // We used to clear down in the GL subclass using a special purp
ose | 198 // We used to clear down in the GL subclass using a special purp
ose |
| 199 // FBO. But iOS doesn't allow a stencil-only FBO. It reports uns
upported | 199 // FBO. But iOS doesn't allow a stencil-only FBO. It reports uns
upported |
| 200 // FBO status. | 200 // FBO status. |
| 201 this->gpu()->clearStencil(rt); | 201 this->gpu()->clearStencil(rt); |
| 202 } | 202 } |
| 203 } | 203 } |
| 204 } | 204 } |
| 205 return rt->renderTargetPriv().getStencilAttachment(); | 205 return rt->renderTargetPriv().getStencilAttachment(); |
| 206 } | 206 } |
| 207 | 207 |
| 208 GrRenderTarget* GrResourceProvider::wrapBackendTextureAsRenderTarget( | 208 sk_sp<GrRenderTarget> GrResourceProvider::wrapBackendTextureAsRenderTarget( |
| 209 const GrBackendTextureDesc& desc) { | 209 const GrBackendTextureDesc& desc) |
| 210 { |
| 210 if (this->isAbandoned()) { | 211 if (this->isAbandoned()) { |
| 211 return nullptr; | 212 return nullptr; |
| 212 } | 213 } |
| 213 return this->gpu()->wrapBackendTextureAsRenderTarget(desc); | 214 return this->gpu()->wrapBackendTextureAsRenderTarget(desc); |
| 214 } | 215 } |
| OLD | NEW |