diff options
author | Bo Hu <bohu@google.com> | 2024-03-01 20:57:16 -0800 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2024-03-18 17:22:43 +0000 |
commit | a9522199a1fcf383be1f6824203d69806911f2d4 (patch) | |
tree | b97e367db3085b5178e76156155297f4bf9f721d | |
parent | 6293c1ed37aa6e9dc75e3a06096459cf78eb0d43 (diff) | |
download | aemu-a9522199a1fcf383be1f6824203d69806911f2d4.tar.gz |
resizable: add interface to skip draw
Bug: 327052018
(cherry picked from https://android-review.googlesource.com/q/commit:2bc59e470ba9181a417115b9f65fa8b2a1d866cf)
Merged-In: Ic546243ac97c1aff0420b3ed40eec513271f9c5b
Change-Id: Ic546243ac97c1aff0420b3ed40eec513271f9c5b
-rw-r--r-- | host-common/include/host-common/misc.h | 2 | ||||
-rw-r--r-- | host-common/misc.cpp | 11 |
2 files changed, 13 insertions, 0 deletions
diff --git a/host-common/include/host-common/misc.h b/host-common/include/host-common/misc.h index eaa41f5..17e3c05 100644 --- a/host-common/include/host-common/misc.h +++ b/host-common/include/host-common/misc.h @@ -52,6 +52,8 @@ namespace emugl { EMUGL_COMMON_API void setAvdInfo(bool isPhone, int apiLevel); EMUGL_COMMON_API void getAvdInfo(bool* isPhone, int* apiLevel); + EMUGL_COMMON_API void setShouldSkipDraw(bool skip); + EMUGL_COMMON_API bool shouldSkipDraw(); // CPU usage get/set. EMUGL_COMMON_API void setCpuUsage(android::base::CpuUsage* usage); EMUGL_COMMON_API android::base::CpuUsage* getCpuUsage(); diff --git a/host-common/misc.cpp b/host-common/misc.cpp index ec7a085..ecd3294 100644 --- a/host-common/misc.cpp +++ b/host-common/misc.cpp @@ -21,6 +21,8 @@ static int s_apiLevel = -1; static bool s_isPhone = false; +static bool s_shouldSkipDrawing = false; + android::base::CpuUsage* s_cpu_usage = nullptr; android::base::MemoryTracker* s_mem_usage = nullptr; @@ -29,6 +31,15 @@ void emugl::setAvdInfo(bool phone, int apiLevel) { s_apiLevel = apiLevel; } +bool emugl::shouldSkipDraw() { + return s_shouldSkipDrawing; +} + + +void emugl::setShouldSkipDraw(bool skip) { + s_shouldSkipDrawing = skip; +} + void emugl::getAvdInfo(bool* phone, int* apiLevel) { if (phone) *phone = s_isPhone; if (apiLevel) *apiLevel = s_apiLevel; |