diff options
author | 2012-09-07 19:44:33 +0000 | |
---|---|---|
committer | 2012-09-07 19:44:33 +0000 | |
commit | 50a035ddbb068446645b0978f4c092dec87a1a02 (patch) | |
tree | 99e9534267ee9394d8a336301e37750c85b5e1a7 /src/gpu/GrContext.cpp | |
parent | 5fd07ec782faaf4b47cc5a15a911b320ae95bcb2 (diff) |
Added explicit cache clearing
http://codereview.appspot.com/6492094/
git-svn-id: http://skia.googlecode.com/svn/trunk@5444 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/gpu/GrContext.cpp')
-rw-r--r-- | src/gpu/GrContext.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp index f91f4206c2..9b01eb27e2 100644 --- a/src/gpu/GrContext.cpp +++ b/src/gpu/GrContext.cpp @@ -494,6 +494,7 @@ void GrContext::addExistingTextureToCache(GrTexture* texture) { // and it should still be locked fTextureCache->unlock(texture->getCacheEntry()); + this->purgeCache(); } void GrContext::lockTexture(GrTexture* texture) { @@ -519,6 +520,11 @@ void GrContext::unlockTexture(GrTexture* texture) { } fTextureCache->unlock(texture->getCacheEntry()); + this->purgeCache(); +} + +void GrContext::purgeCache() { + fTextureCache->purgeAsNeeded(); } GrTexture* GrContext::createUncachedTexture(const GrTextureDesc& descIn, |