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

Unified Diff: src/gpu/GrContext.cpp

Issue 721353002: Allow GPU resources to not be counted against the cache budget. (Closed) Base URL: https://skia.googlesource.com/skia.git@wrap
Patch Set: fix constructor order Created 6 years, 1 month 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/GrGpuResource.h ('k') | src/gpu/GrGpuResource.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrContext.cpp
diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp
index 7012988ab8ec4cb61715dac284ba38ec145806ae..e7449da23b6ed73b222fd854ca9ce80f89eb4e93 100755
--- a/src/gpu/GrContext.cpp
+++ b/src/gpu/GrContext.cpp
@@ -490,7 +490,13 @@ GrTexture* GrContext::createUncachedTexture(const GrSurfaceDesc& descIn,
void* srcData,
size_t rowBytes) {
GrSurfaceDesc descCopy = descIn;
- return fGpu->createTexture(descCopy, srcData, rowBytes);
+ GrTexture* texture = fGpu->createTexture(descCopy, srcData, rowBytes);
+ if (texture) {
+ // TODO: It'd be nice to be able to do this before creation so we don't boot something
+ // out of the cache. We could temporarily boost the cache budget.
+ texture->cacheAccess().setBudgeted(false);
+ }
+ return texture;
}
void GrContext::getResourceCacheLimits(int* maxTextures, size_t* maxTextureBytes) const {
« no previous file with comments | « include/gpu/GrGpuResource.h ('k') | src/gpu/GrGpuResource.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698