| 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 #ifndef GrTextureProvider_DEFINED | 8 #ifndef GrTextureProvider_DEFINED |
| 9 #define GrTextureProvider_DEFINED | 9 #define GrTextureProvider_DEFINED |
| 10 | 10 |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 GrTexture* wrapBackendTexture(const GrBackendTextureDesc& desc, | 91 GrTexture* wrapBackendTexture(const GrBackendTextureDesc& desc, |
| 92 GrWrapOwnership = kBorrow_GrWrapOwnership); | 92 GrWrapOwnership = kBorrow_GrWrapOwnership); |
| 93 | 93 |
| 94 /** | 94 /** |
| 95 * Wraps an existing render target with a GrRenderTarget object. It is | 95 * Wraps an existing render target with a GrRenderTarget object. It is |
| 96 * similar to wrapBackendTexture but can be used to draw into surfaces | 96 * similar to wrapBackendTexture but can be used to draw into surfaces |
| 97 * that are not also textures (e.g. FBO 0 in OpenGL, or an MSAA buffer that | 97 * that are not also textures (e.g. FBO 0 in OpenGL, or an MSAA buffer that |
| 98 * the client will resolve to a texture). Currently wrapped render targets | 98 * the client will resolve to a texture). Currently wrapped render targets |
| 99 * always use the kBorrow_GrWrapOwnership semantics. | 99 * always use the kBorrow_GrWrapOwnership semantics. |
| 100 * | 100 * |
| 101 * @return GrTexture object or NULL on failure. | 101 * @return GrRenderTarget object or NULL on failure. |
| 102 */ | 102 */ |
| 103 GrRenderTarget* wrapBackendRenderTarget(const GrBackendRenderTargetDesc& de
sc); | 103 GrRenderTarget* wrapBackendRenderTarget(const GrBackendRenderTargetDesc& de
sc); |
| 104 | 104 |
| 105 protected: | 105 protected: |
| 106 GrTextureProvider(GrGpu* gpu, GrResourceCache* cache, GrSingleOwner* singleO
wner); | 106 GrTextureProvider(GrGpu* gpu, GrResourceCache* cache, GrSingleOwner* singleO
wner); |
| 107 | 107 |
| 108 /** | 108 /** |
| 109 * Assigns a unique key to a resource. If the key is associated with another
resource that | 109 * Assigns a unique key to a resource. If the key is associated with another
resource that |
| 110 * association is removed and replaced by this resource. | 110 * association is removed and replaced by this resource. |
| 111 */ | 111 */ |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 | 154 |
| 155 private: | 155 private: |
| 156 GrResourceCache* fCache; | 156 GrResourceCache* fCache; |
| 157 GrGpu* fGpu; | 157 GrGpu* fGpu; |
| 158 | 158 |
| 159 // In debug builds we guard against improper thread handling | 159 // In debug builds we guard against improper thread handling |
| 160 SkDEBUGCODE(mutable GrSingleOwner* fSingleOwner;) | 160 SkDEBUGCODE(mutable GrSingleOwner* fSingleOwner;) |
| 161 }; | 161 }; |
| 162 | 162 |
| 163 #endif | 163 #endif |
| OLD | NEW |