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

Unified Diff: src/gpu/GrContext.cpp

Issue 18466005: Allow the resource cache to (indirectly) flush the InOrderDrawBuffer (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Addressed code review issues Created 7 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « include/gpu/GrContext.h ('k') | src/gpu/GrResourceCache.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrContext.cpp
===================================================================
--- src/gpu/GrContext.cpp (revision 9928)
+++ src/gpu/GrContext.cpp (working copy)
@@ -541,6 +541,20 @@
}
}
+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) {
« no previous file with comments | « include/gpu/GrContext.h ('k') | src/gpu/GrResourceCache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698