diff options
author | 2013-07-10 10:14:35 +0000 | |
---|---|---|
committer | 2013-07-10 10:14:35 +0000 | |
commit | cae27fed5e45e8899e56ece22b27e8958ffc0162 (patch) | |
tree | ffa32b028263d62da6fa581c6a62f5d9301a3e1d /src/gpu/GrContext.cpp | |
parent | 9e1ec1a52985cce9db3a0d0e8d448b82a32e70cb (diff) |
Allow the resource cache to (indirectly) flush the InOrderDrawBuffer
R=bsalomon@google.com
Author: robertphillips@google.com
Review URL: https://chromiumcodereview.appspot.com/18466005
git-svn-id: http://skia.googlecode.com/svn/trunk@9949 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/gpu/GrContext.cpp')
-rw-r--r-- | src/gpu/GrContext.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp index 78220c0279..39d0db33b4 100644 --- a/src/gpu/GrContext.cpp +++ b/src/gpu/GrContext.cpp @@ -541,6 +541,20 @@ void GrContext::purgeCache() { } } +bool GrContext::OverbudgetCB(void* data) { + GrAssert(NULL != data); + + GrContext* context = reinterpret_cast<GrContext*>(data); + + // Flush the InOrderDrawBuffer to possibly free up some textures + context->flush(); + + // TODO: actually track flush's behavior rather than always just + // returning true. + return true; +} + + GrTexture* GrContext::createUncachedTexture(const GrTextureDesc& descIn, void* srcData, size_t rowBytes) { |