| 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 | 50 |
| 51 /** Assigns a unique key to the texture. The texture will be findable via th
is key using | 51 /** Assigns a unique key to the texture. The texture will be findable via th
is key using |
| 52 findTextureByUniqueKey(). If an existing texture has this key, it's key
will be removed. */ | 52 findTextureByUniqueKey(). If an existing texture has this key, it's key
will be removed. */ |
| 53 void assignUniqueKeyToTexture(const GrUniqueKey& key, GrTexture* texture) { | 53 void assignUniqueKeyToTexture(const GrUniqueKey& key, GrTexture* texture) { |
| 54 this->assignUniqueKeyToResource(key, texture); | 54 this->assignUniqueKeyToResource(key, texture); |
| 55 } | 55 } |
| 56 | 56 |
| 57 /** Finds a texture by unique key. If the texture is found it is ref'ed and
returned. */ | 57 /** Finds a texture by unique key. If the texture is found it is ref'ed and
returned. */ |
| 58 GrTexture* findAndRefTextureByUniqueKey(const GrUniqueKey& key); | 58 GrTexture* findAndRefTextureByUniqueKey(const GrUniqueKey& key); |
| 59 | 59 |
| 60 /** Finds a render target by unique key. If the render target is found it is
ref'ed and |
| 61 * returned. */ |
| 62 GrRenderTarget* findAndRefRenderTargetByUniqueKey(const GrUniqueKey& key); |
| 63 |
| 60 /** | 64 /** |
| 61 * Determines whether a texture is associated with the unique key. If the te
xture is found it | 65 * Determines whether a texture is associated with the unique key. If the te
xture is found it |
| 62 * will not be locked or returned. This call does not affect the priority of
the resource for | 66 * will not be locked or returned. This call does not affect the priority of
the resource for |
| 63 * deletion. | 67 * deletion. |
| 64 */ | 68 */ |
| 65 bool existsTextureWithUniqueKey(const GrUniqueKey& key) const { | 69 bool existsTextureWithUniqueKey(const GrUniqueKey& key) const { |
| 66 return this->existsResourceWithUniqueKey(key); | 70 return this->existsResourceWithUniqueKey(key); |
| 67 } | 71 } |
| 68 | 72 |
| 69 /** | 73 /** |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 | 169 |
| 166 private: | 170 private: |
| 167 GrResourceCache* fCache; | 171 GrResourceCache* fCache; |
| 168 GrGpu* fGpu; | 172 GrGpu* fGpu; |
| 169 | 173 |
| 170 // In debug builds we guard against improper thread handling | 174 // In debug builds we guard against improper thread handling |
| 171 SkDEBUGCODE(mutable GrSingleOwner* fSingleOwner;) | 175 SkDEBUGCODE(mutable GrSingleOwner* fSingleOwner;) |
| 172 }; | 176 }; |
| 173 | 177 |
| 174 #endif | 178 #endif |
| OLD | NEW |