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

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: update 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
Index: src/gpu/GrContext.cpp
diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp
index 1cce72a2778384bf883a8f2c05934768ff75a42d..2a2ac89104c39fd5e31dc0e6f0744a8bb396b706 100755
--- a/src/gpu/GrContext.cpp
+++ b/src/gpu/GrContext.cpp
@@ -479,7 +479,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);
bsalomon 2014/11/13 19:20:54 This was the only function where we were deliberat
+ 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 {

Powered by Google App Engine
This is Rietveld 408576698