diff options
author | brettw@google.com <brettw@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-12 21:01:41 +0000 |
---|---|---|
committer | brettw@google.com <brettw@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-12 21:01:41 +0000 |
commit | 52e935d04c59135739c3a68fb6e19d313dc6d5ad (patch) | |
tree | 95f7ab178b045bef4456cbf92c6aa7e476becd99 /skia/gl/SkGLTextCache.h | |
parent | 30fab79877b4bb067944b74d98346ac9bb6bfc7e (diff) | |
download | chromium_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/SkGLTextCache.h')
-rw-r--r-- | skia/gl/SkGLTextCache.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/skia/gl/SkGLTextCache.h b/skia/gl/SkGLTextCache.h index 386b274..eb552aa 100644 --- a/skia/gl/SkGLTextCache.h +++ b/skia/gl/SkGLTextCache.h @@ -9,8 +9,13 @@ class SkGLTextCache { public: SkGLTextCache(); ~SkGLTextCache(); - - void* getCtx() const { return fCtx; } + + /** Delete all of the strikes in the cache. Pass true if the texture IDs are + still valid, in which case glDeleteTextures will be called. Pass false + if they are invalid (e.g. the gl-context has changed), in which case + they will just be abandoned. + */ + void deleteAllStrikes(bool texturesAreValid); class Strike { public: @@ -22,7 +27,7 @@ public: // call this to force us to ignore the texture name in our destructor // only call it right before our destructor - void zapTexture() { fTexName = 0; } + void abandonTexture() { fTexName = 0; } private: // if next is non-null, its height must match our height @@ -66,8 +71,6 @@ public: Strike* addGlyphAndBind(const SkGlyph&, const uint8_t image[], int* offset); private: - void* fCtx; - enum { // greater than this we won't cache kMaxGlyphHeightShift = 9, |