aboutsummaryrefslogtreecommitdiff
path: root/system/OpenglSystemCommon/HostConnection.cpp
diff options
context:
space:
mode:
authorGurchetan Singh <gurchetansingh@chromium.org>2022-07-28 10:22:59 -0700
committerGurchetan Singh <gurchetansingh@google.com>2022-07-28 14:54:29 -0700
commit389684b0734001e0fdd26064e11ccb0f4d3a54ab (patch)
treeaafeff0a4fe65b3f74545c956b662bdc549882a5 /system/OpenglSystemCommon/HostConnection.cpp
parent8bcbe221f73bb77a2c396a99492ff0c9292e2e4a (diff)
downloadgoldfish-opengl-389684b0734001e0fdd26064e11ccb0f4d3a54ab.tar.gz
goldfish-opengl: nuke use std::optional
Although this builds, we could also use the fact DRM_FORMAT_INVALID is zero and eventually refactor the gralloc helper out of the HostConnection. BUG=None TEST=meson amd64-build/ ninja -C amd64-build/ Change-Id: I5801abe78fee472652f507be07f27c761dd4dd94
Diffstat (limited to 'system/OpenglSystemCommon/HostConnection.cpp')
-rw-r--r--system/OpenglSystemCommon/HostConnection.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/system/OpenglSystemCommon/HostConnection.cpp b/system/OpenglSystemCommon/HostConnection.cpp
index 1888b81a..00144823 100644
--- a/system/OpenglSystemCommon/HostConnection.cpp
+++ b/system/OpenglSystemCommon/HostConnection.cpp
@@ -263,9 +263,8 @@ public:
return ((cros_gralloc_handle *)handle)->droid_format;
}
- virtual std::optional<uint32_t> getFormatDrmFourcc(native_handle_t const* handle) override {
- uint32_t format = ((cros_gralloc_handle *)handle)->format;
- return std::optional<uint32_t>(format);
+ virtual uint32_t getFormatDrmFourcc(native_handle_t const* handle) override {
+ return ((cros_gralloc_handle *)handle)->format;
}
virtual size_t getAllocatedSize(native_handle_t const* handle) {