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

Unified Diff: src/gpu/GrResourceProvider.cpp

Issue 1286203002: Defer flushes if kPreferNoIO is specified (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: use explicit size in test Created 5 years, 4 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 | « src/gpu/GrResourceCache.cpp ('k') | src/gpu/GrSurface.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrResourceProvider.cpp
diff --git a/src/gpu/GrResourceProvider.cpp b/src/gpu/GrResourceProvider.cpp
index 8b04caca4ecc29ae8155f5cf45cef038b08aad56..3adb0fafc23b88a753ed7f83d70cb99419e70dcb 100644
--- a/src/gpu/GrResourceProvider.cpp
+++ b/src/gpu/GrResourceProvider.cpp
@@ -106,7 +106,7 @@ GrIndexBuffer* GrResourceProvider::createIndexBuffer(size_t size, BufferUsage us
} else {
scratchFlags = GrResourceCache::kPreferNoPendingIO_ScratchFlag;
}
- GrGpuResource* resource = this->cache()->findAndRefScratchResource(key, scratchFlags);
+ GrGpuResource* resource = this->cache()->findAndRefScratchResource(key, size, scratchFlags);
if (resource) {
return static_cast<GrIndexBuffer*>(resource);
}
@@ -135,7 +135,7 @@ GrVertexBuffer* GrResourceProvider::createVertexBuffer(size_t size, BufferUsage
} else {
scratchFlags = GrResourceCache::kPreferNoPendingIO_ScratchFlag;
}
- GrGpuResource* resource = this->cache()->findAndRefScratchResource(key, scratchFlags);
+ GrGpuResource* resource = this->cache()->findAndRefScratchResource(key, size, scratchFlags);
if (resource) {
return static_cast<GrVertexBuffer*>(resource);
}
« no previous file with comments | « src/gpu/GrResourceCache.cpp ('k') | src/gpu/GrSurface.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698