summaryrefslogtreecommitdiff
path: root/libs/hwui/renderthread/CacheManager.cpp
diff options
context:
space:
mode:
authorGreg Daniel <egdaniel@google.com>2017-12-08 11:44:27 -0500
committerGreg Daniel <egdaniel@google.com>2017-12-11 09:39:16 -0500
commit660d6eca991f15de77c02a7e259ed709338a0972 (patch)
treed1b8b44a39f028c49394aa4dfd109a1a9dffb957 /libs/hwui/renderthread/CacheManager.cpp
parent23627fbff5f13629e997a00b006a1ebdc423e735 (diff)
Update GrContext creation calls to use sk_sp
Test: manual testing Change-Id: I68d8706ffa7bc7c6622ea0b8c45d7297a131f6bf
Diffstat (limited to 'libs/hwui/renderthread/CacheManager.cpp')
-rw-r--r--libs/hwui/renderthread/CacheManager.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/libs/hwui/renderthread/CacheManager.cpp b/libs/hwui/renderthread/CacheManager.cpp
index 5e89faec1bab..907f2d2d398f 100644
--- a/libs/hwui/renderthread/CacheManager.cpp
+++ b/libs/hwui/renderthread/CacheManager.cpp
@@ -53,13 +53,13 @@ CacheManager::CacheManager(const DisplayInfo& display) : mMaxSurfaceArea(display
}
}
-void CacheManager::reset(GrContext* context) {
- if (context != mGrContext.get()) {
+void CacheManager::reset(sk_sp<GrContext> context) {
+ if (context != mGrContext) {
destroy();
}
if (context) {
- mGrContext = sk_ref_sp(context);
+ mGrContext = std::move(context);
mGrContext->getResourceCacheLimits(&mMaxResources, nullptr);
updateContextCacheSizes();
}