summaryrefslogtreecommitdiffstats
path: root/skia/gl/SkTextureCache.h
diff options
context:
space:
mode:
authorbrettw@google.com <brettw@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-12-12 21:01:41 +0000
committerbrettw@google.com <brettw@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-12-12 21:01:41 +0000
commit52e935d04c59135739c3a68fb6e19d313dc6d5ad (patch)
tree95f7ab178b045bef4456cbf92c6aa7e476becd99 /skia/gl/SkTextureCache.h
parent30fab79877b4bb067944b74d98346ac9bb6bfc7e (diff)
downloadchromium_src-52e935d04c59135739c3a68fb6e19d313dc6d5ad.zip
chromium_src-52e935d04c59135739c3a68fb6e19d313dc6d5ad.tar.gz
chromium_src-52e935d04c59135739c3a68fb6e19d313dc6d5ad.tar.bz2
New drop of Skia. This is up to CL 121320.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6925 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'skia/gl/SkTextureCache.h')
-rw-r--r--skia/gl/SkTextureCache.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/skia/gl/SkTextureCache.h b/skia/gl/SkTextureCache.h
index e4ffc78..0bc3091 100644
--- a/skia/gl/SkTextureCache.h
+++ b/skia/gl/SkTextureCache.h
@@ -17,11 +17,12 @@ public:
void setMaxCount(size_t count);
void setMaxSize(size_t size);
- /** Call this if the context has changed behind our backs, and the cache
- needs to abandon all of its existing textures. This saves us from using
- or deleting a texture created from a different context
+ /** Deletes all the caches. Pass true if the texture IDs are still valid,
+ and if so, it will call glDeleteTextures. Pass false if the texture IDs
+ are invalid (e.g. the gl-context has changed), in which case they will
+ just be abandoned.
*/
- void zapAllTextures();
+ void deleteAllCaches(bool texturesAreValid);
static int HashMask() { return kHashMask; }
@@ -90,7 +91,7 @@ public:
// call this to clear the texture name, in case the context has changed
// in which case we should't reference or delete this texture in GL
- void zapName() { fName = 0; }
+ void abandonTexture() { fName = 0; }
private:
Entry(const SkBitmap& bitmap);