aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGurchetan Singh <gurchetansingh@google.com>2022-01-12 18:41:41 -0800
committerKaiyi Li <kaiyili@google.com>2024-01-11 12:54:11 -0800
commit105fd0b55a15e56e4fdd320334fc976959391323 (patch)
treec93dff9f3a1cc883bb62c219c41e979e4690dc1d
parent3502ff5021d73dee45f045b1354592933a8d172b (diff)
downloadgoldfish-opengl-105fd0b55a15e56e4fdd320334fc976959391323.tar.gz
goldfish-opengl: differentiate goldfish/virtio-gpu via minigbm only
Whether or not ANGLE is used isn't import for determining the presence of the goldfish device. BUG=213488545 TEST=boot VM, run apps Cherry-picked from https://android-review.git.corp.google.com/c/device/generic/goldfish-opengl/+/1948114 from HWC2 to HWC3. git fetch https://android.googlesource.com/device/generic/goldfish-opengl refs/changes/14/1948114/1 && git format-patch -1 FETCH_HEAD --stdout | git am -3 -p2 --directory='system/hwc3' Change-Id: I88185c2591850e81e9f96d943df3ccb05162a9a9
-rw-r--r--system/hwc3/HostFrameComposer.cpp22
-rw-r--r--system/hwc3/HostFrameComposer.h2
2 files changed, 3 insertions, 21 deletions
diff --git a/system/hwc3/HostFrameComposer.cpp b/system/hwc3/HostFrameComposer.cpp
index d82ece64..03739946 100644
--- a/system/hwc3/HostFrameComposer.cpp
+++ b/system/hwc3/HostFrameComposer.cpp
@@ -99,21 +99,6 @@ static bool isMinigbmFromProperty() {
}
}
-static bool useAngleFromProperty() {
- static constexpr const auto kEglProp = "ro.hardware.egl";
-
- const auto eglProp = ::android::base::GetProperty(kEglProp, "");
- DEBUG_LOG("%s: prop value is: %s", __FUNCTION__, eglProp.c_str());
-
- if (eglProp == "angle") {
- DEBUG_LOG("%s: Using ANGLE.\n", __FUNCTION__);
- return true;
- } else {
- DEBUG_LOG("%s: Not using ANGLE.\n", __FUNCTION__);
- return false;
- }
-}
-
typedef struct compose_layer {
uint32_t cbHandle;
hwc2_composition_t composeMode;
@@ -184,7 +169,6 @@ void FreeDisplayColorBuffer(const native_handle_t* h) {
HWC3::Error HostFrameComposer::init() {
mIsMinigbm = isMinigbmFromProperty();
- mUseAngle = useAngleFromProperty();
if (mIsMinigbm) {
mDrmClient.emplace();
@@ -688,9 +672,9 @@ HWC3::Error HostFrameComposer::presentDisplay(
uint64_t sync_handle, thread_handle;
- // We don't use rc command to sync if we are using ANGLE on the guest with
- // virtio-gpu.
- bool useRcCommandToSync = !(mUseAngle && mIsMinigbm);
+ // We don't use rc command to sync if we are using virtio-gpu, which is
+ // proxied by minigbm.
+ bool useRcCommandToSync = !mIsMinigbm;
if (useRcCommandToSync) {
hostCon->lock();
diff --git a/system/hwc3/HostFrameComposer.h b/system/hwc3/HostFrameComposer.h
index b42f480d..9b5e5c34 100644
--- a/system/hwc3/HostFrameComposer.h
+++ b/system/hwc3/HostFrameComposer.h
@@ -82,8 +82,6 @@ class HostFrameComposer : public FrameComposer {
bool mIsMinigbm = false;
- bool mUseAngle = false;
-
int mSyncDeviceFd = -1;
struct HostComposerDisplayInfo {