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

Side by Side Diff: include/gpu/GrTextureProvider.h

Issue 1810323002: Cache render targets that render to wrapped textures Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: moved the refactoring to another patch Created 4 years, 8 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 | « no previous file | src/gpu/GrGpu.h » ('j') | 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 * 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
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
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
OLDNEW
« no previous file with comments | « no previous file | src/gpu/GrGpu.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698