summaryrefslogtreecommitdiff
path: root/libs/hwui/Properties.cpp
diff options
context:
space:
mode:
authorLingfeng Yang <lfy@google.com>2018-01-24 10:40:18 -0800
committerLingfeng Yang <lfy@google.com>2018-01-24 12:21:46 -0800
commit3a9f223dd1fe6a74e6bcf9a1080280034043409c (patch)
treefca32b3b7b9490abadab526e64b2be71f7dc57f9 /libs/hwui/Properties.cpp
parent1a68be0f0defb679a246352c30921bb011f2d5cb (diff)
Don't use shader disk cache on emulator
bug: 71900691 Emulator user might switch renderers, migrate a snapshot to a different machine with a different shader binary format, etc. Plus, program binaries don't seem to work so well on some desktop GPUs. Change-Id: I0c6239acbd556097494aa903d6603c963d3141cb
Diffstat (limited to 'libs/hwui/Properties.cpp')
-rw-r--r--libs/hwui/Properties.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/libs/hwui/Properties.cpp b/libs/hwui/Properties.cpp
index 4243e7eeef8c..6cd283a9063c 100644
--- a/libs/hwui/Properties.cpp
+++ b/libs/hwui/Properties.cpp
@@ -61,6 +61,8 @@ bool Properties::disableVsync = false;
bool Properties::skpCaptureEnabled = false;
bool Properties::enableRTAnimations = true;
+bool Properties::runningInEmulator = false;
+
static int property_get_int(const char* key, int defaultValue) {
char buf[PROPERTY_VALUE_MAX] = {
'\0',
@@ -135,6 +137,8 @@ bool Properties::load() {
skpCaptureEnabled = property_get_bool("ro.debuggable", false) &&
property_get_bool(PROPERTY_CAPTURE_SKP_ENABLED, false);
+ runningInEmulator = property_get_bool(PROPERTY_QEMU_KERNEL, false);
+
return (prevDebugLayersUpdates != debugLayersUpdates) || (prevDebugOverdraw != debugOverdraw) ||
(prevDebugStencilClip != debugStencilClip);
}