| Index: src/gpu/GrGpuResource.cpp
|
| diff --git a/src/gpu/GrGpuResource.cpp b/src/gpu/GrGpuResource.cpp
|
| index a0a72785d9c74c0385e52d1b08da7beeac4eca99..bce7d2cae8b9c85661d1c9be14c9c63dd9ad5c53 100644
|
| --- a/src/gpu/GrGpuResource.cpp
|
| +++ b/src/gpu/GrGpuResource.cpp
|
| @@ -22,7 +22,8 @@ GrGpuResource::GrGpuResource(GrGpu* gpu, bool isWrapped)
|
| : fGpu(gpu)
|
| , fRefCnt(1)
|
| , fCacheEntry(NULL)
|
| - , fUniqueID(CreateUniqueID()) {
|
| + , fUniqueID(CreateUniqueID())
|
| + , fScratchKey(GrResourceKey::NullScratchKey()) {
|
| if (isWrapped) {
|
| fFlags = kWrapped_FlagBit;
|
| } else {
|
| @@ -72,6 +73,13 @@ GrContext* GrGpuResource::getContext() {
|
| }
|
| }
|
|
|
| +void GrGpuResource::setScratchKey(const GrResourceKey& scratchKey) {
|
| + SkASSERT(fScratchKey.isNullScratch());
|
| + SkASSERT(scratchKey.isScratch());
|
| + SkASSERT(!scratchKey.isNullScratch());
|
| + fScratchKey = scratchKey;
|
| +}
|
| +
|
| uint32_t GrGpuResource::CreateUniqueID() {
|
| static int32_t gUniqueID = SK_InvalidUniqueID;
|
| uint32_t id;
|
|
|