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

Unified Diff: samplecode/SampleApp.cpp

Issue 275563005: cleanup GrContext resource cache api (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Fix use of SK_ATTR_DEPRECATED Created 6 years, 7 months 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/GrContext.h ('k') | src/gpu/GrContext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samplecode/SampleApp.cpp
diff --git a/samplecode/SampleApp.cpp b/samplecode/SampleApp.cpp
index 71fb8d3bfd6d9b1e74868ecd58a5414333b5152b..8003a0668f8c5f71e923b9468e895203f751134e 100644
--- a/samplecode/SampleApp.cpp
+++ b/samplecode/SampleApp.cpp
@@ -1863,10 +1863,10 @@ bool SampleWindow::onHandleChar(SkUnichar uni) {
{
GrContext* grContext = this->getGrContext();
if (grContext) {
- size_t cacheBytes = grContext->getGpuTextureCacheBytes();
+ size_t cacheBytes;
+ grContext->getResourceCacheUsage(NULL, &cacheBytes);
grContext->freeGpuResources();
- SkDebugf("Purged %d bytes from the GPU resource cache.\n",
- cacheBytes);
+ SkDebugf("Purged %d bytes from the GPU resource cache.\n", cacheBytes);
}
}
return true;
« no previous file with comments | « include/gpu/GrContext.h ('k') | src/gpu/GrContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698