aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTreehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com>2024-03-07 18:53:51 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2024-03-07 18:53:51 +0000
commitc63f29e5f3a86f07b8575c31b444dffa9bbfb50b (patch)
treeedb4a52be1a61d4aea35d68817bdea3a09f9f37b
parent59fb4589d15ebbf84346f09b88d222f5ce57a0d3 (diff)
parente011ad74ce84a77effb30966fc9b12214a49c68f (diff)
downloadaemu-c63f29e5f3a86f07b8575c31b444dffa9bbfb50b.tar.gz
Merge "resizable: add interface to skip draw" into main
-rw-r--r--host-common/include/host-common/misc.h2
-rw-r--r--host-common/misc.cpp11
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;