diff options
Diffstat (limited to 'src/gpu/GrGpuResource.cpp')
-rw-r--r-- | src/gpu/GrGpuResource.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/gpu/GrGpuResource.cpp b/src/gpu/GrGpuResource.cpp index a2df7e13e8..2f267a4197 100644 --- a/src/gpu/GrGpuResource.cpp +++ b/src/gpu/GrGpuResource.cpp @@ -6,7 +6,6 @@ * found in the LICENSE file. */ - #include "GrGpuResource.h" #include "GrResourceCache2.h" #include "GrGpu.h" @@ -134,6 +133,13 @@ void GrGpuResource::removeScratchKey() { } } +void GrGpuResource::makeBudgeted() { + if (GrGpuResource::kUncached_LifeCycle == fLifeCycle) { + fLifeCycle = kCached_LifeCycle; + get_resource_cache2(fGpu)->resourceAccess().didChangeBudgetStatus(this); + } +} + uint32_t GrGpuResource::CreateUniqueID() { static int32_t gUniqueID = SK_InvalidUniqueID; uint32_t id; |