Index: src/gpu/gl/GrGLGpuProgramCache.cpp |
diff --git a/src/gpu/gl/GrGLGpuProgramCache.cpp b/src/gpu/gl/GrGLGpuProgramCache.cpp |
index 911fd936e80296293c767ede5d071ad193e205eb..06efe299c1c916dd92bcfd843e4d7b11e08aa307 100644 |
--- a/src/gpu/gl/GrGLGpuProgramCache.cpp |
+++ b/src/gpu/gl/GrGLGpuProgramCache.cpp |
@@ -90,7 +90,7 @@ int GrGLGpu::ProgramCache::search(const GrProgramDesc& desc) const { |
return SkTSearch(fEntries, fCount, desc, sizeof(Entry*), less); |
} |
-GrGLProgram* GrGLGpu::ProgramCache::getProgram(const DrawArgs& args) { |
+GrGLProgram* GrGLGpu::ProgramCache::refProgram(const DrawArgs& args) { |
#ifdef PROGRAM_CACHE_STATS |
++fTotalRequests; |
#endif |
@@ -193,5 +193,5 @@ GrGLProgram* GrGLGpu::ProgramCache::getProgram(const DrawArgs& args) { |
} |
} |
++fCurrLRUStamp; |
- return entry->fProgram; |
+ return SkRef(entry->fProgram.get()); |
} |