xref: /aosp_15_r20/frameworks/base/libs/hwui/platform/host/renderthread/CacheManager.cpp (revision d57664e9bc4670b3ecf6748a746a57c557b6bc9e)
1 /*
2  * Copyright (C) 2024 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #include "renderthread/CacheManager.h"
18 
19 namespace android {
20 namespace uirenderer {
21 namespace renderthread {
22 
CacheManager(RenderThread & thread)23 CacheManager::CacheManager(RenderThread& thread)
24         : mRenderThread(thread), mMemoryPolicy(loadMemoryPolicy()) {}
25 
setupCacheLimits()26 void CacheManager::setupCacheLimits() {}
27 
destroy()28 void CacheManager::destroy() {}
29 
trimMemory(TrimLevel mode)30 void CacheManager::trimMemory(TrimLevel mode) {}
31 
trimCaches(CacheTrimLevel mode)32 void CacheManager::trimCaches(CacheTrimLevel mode) {}
33 
trimStaleResources()34 void CacheManager::trimStaleResources() {}
35 
getMemoryUsage(size_t * cpuUsage,size_t * gpuUsage)36 void CacheManager::getMemoryUsage(size_t* cpuUsage, size_t* gpuUsage) {}
37 
dumpMemoryUsage(String8 & log,const RenderState * renderState)38 void CacheManager::dumpMemoryUsage(String8& log, const RenderState* renderState) {}
39 
onFrameCompleted()40 void CacheManager::onFrameCompleted() {}
41 
onThreadIdle()42 void CacheManager::onThreadIdle() {}
43 
scheduleDestroyContext()44 void CacheManager::scheduleDestroyContext() {}
45 
cancelDestroyContext()46 void CacheManager::cancelDestroyContext() {}
47 
areAllContextsStopped()48 bool CacheManager::areAllContextsStopped() {
49     return false;
50 }
51 
checkUiHidden()52 void CacheManager::checkUiHidden() {}
53 
registerCanvasContext(CanvasContext * context)54 void CacheManager::registerCanvasContext(CanvasContext* context) {}
55 
unregisterCanvasContext(CanvasContext * context)56 void CacheManager::unregisterCanvasContext(CanvasContext* context) {}
57 
onContextStopped(CanvasContext * context)58 void CacheManager::onContextStopped(CanvasContext* context) {}
59 
notifyNextFrameSize(int width,int height)60 void CacheManager::notifyNextFrameSize(int width, int height) {}
61 
62 } /* namespace renderthread */
63 } /* namespace uirenderer */
64 } /* namespace android */
65