summaryrefslogtreecommitdiff
path: root/libs/hwui/renderthread/EglManager.cpp
diff options
context:
space:
mode:
authorNader Jawad <njawad@google.com>2021-09-24 13:42:47 -0700
committerNader Jawad <njawad@google.com>2021-10-08 00:00:45 +0000
commit086645d88a10574ea54aed011bc00b5160ff72f1 (patch)
treedf977dc3f63164ea19a32e0a2017eb7cba520768 /libs/hwui/renderthread/EglManager.cpp
parent78359a1dc7077390ab09c6c7730e74fc742715db (diff)
Update RenderEffectCache capability query
Updated logic to determine if RenderEffectCache is supported to very both the vendor name as well as the corresponding driver version. Bug: 193145089 Test: Added test to EglManagerTests + RenderEffectCapabilityQueryTests Change-Id: Ia0fd66c40790b94566f495d2c4128c4988d406b6
Diffstat (limited to 'libs/hwui/renderthread/EglManager.cpp')
-rw-r--r--libs/hwui/renderthread/EglManager.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/libs/hwui/renderthread/EglManager.cpp b/libs/hwui/renderthread/EglManager.cpp
index 383c79b27918..c7d7a17a23eb 100644
--- a/libs/hwui/renderthread/EglManager.cpp
+++ b/libs/hwui/renderthread/EglManager.cpp
@@ -28,6 +28,7 @@
#include "Frame.h"
#include "Properties.h"
+#include "RenderEffectCapabilityQuery.h"
#include "utils/Color.h"
#include "utils/StringUtils.h"
@@ -148,7 +149,11 @@ void EglManager::initialize() {
mHasWideColorGamutSupport = EglExtensions.glColorSpace && hasWideColorSpaceExtension;
auto* vendor = reinterpret_cast<const char*>(glGetString(GL_VENDOR));
- Properties::enableRenderEffectCache = (strcmp(vendor, "Qualcomm") != 0);
+ auto* version = reinterpret_cast<const char*>(glGetString(GL_VERSION));
+ Properties::enableRenderEffectCache = supportsRenderEffectCache(
+ vendor, version);
+ ALOGV("RenderEffectCache supported %d on driver version %s",
+ Properties::enableRenderEffectCache, version);
}
EGLConfig EglManager::load8BitsConfig(EGLDisplay display, EglManager::SwapBehavior swapBehavior) {