aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Stultz <john.stultz@linaro.org>2019-01-15 15:54:24 -0800
committerJohn Stultz <john.stultz@linaro.org>2019-01-15 15:55:33 -0800
commitbdf5d72c1b71e23ca396f3703cbc3778753812d1 (patch)
tree58de81c9181ad085c35cac5cfd28774cfdca15f7
parent8345f0a664004fb0e6099cd9bcc035a72f0fbd33 (diff)
parent734ee1c2e3d0b2c39f111db8efbf253bc17005b8 (diff)
downloaddrm_hwcomposer-bdf5d72c1b71e23ca396f3703cbc3778753812d1.tar.gz
Merge remote-tracking branch 'aosp/upstream-master' into HEAD
Merge in upstream-master branch from freedesktop. This syncs the AOSP tree completely with the upstream branch - with the exception of the OWNERS file. Change-Id: If87394e44fcec163daddcd51d7f7a451d49aec8c Signed-off-by: John Stultz <john.stultz@linaro.org>
-rw-r--r--Android.mk3
-rw-r--r--drmhwctwo.cpp17
2 files changed, 5 insertions, 15 deletions
diff --git a/Android.mk b/Android.mk
index a2fe0ef..d5ee200 100644
--- a/Android.mk
+++ b/Android.mk
@@ -77,9 +77,6 @@ LOCAL_SRC_FILES := \
LOCAL_CFLAGS := $(common_drm_hwcomposer_cflags)
-# Suppress warnings until they are fixed in drmhwctwo.cpp
-LOCAL_CFLAGS += -Wno-error=implicit-fallthrough
-
LOCAL_CPPFLAGS += \
-DHWC2_USE_CPP11 \
-DHWC2_INCLUDE_STRINGIFICATION
diff --git a/drmhwctwo.cpp b/drmhwctwo.cpp
index cd79e7b..cf4ec11 100644
--- a/drmhwctwo.cpp
+++ b/drmhwctwo.cpp
@@ -745,18 +745,11 @@ HWC2::Error DrmHwcTwo::HwcDisplay::ValidateDisplay(uint32_t *num_types,
for (std::pair<const hwc2_layer_t, DrmHwcTwo::HwcLayer> &l : layers_) {
DrmHwcTwo::HwcLayer &layer = l.second;
- switch (layer.sf_type()) {
- case HWC2::Composition::Device:
- if (layer.validated_type() == HWC2::Composition::Device)
- break;
- // fall thru
- case HWC2::Composition::SolidColor:
- case HWC2::Composition::Cursor:
- case HWC2::Composition::Sideband:
- default:
- layer.set_validated_type(HWC2::Composition::Client);
- ++*num_types;
- break;
+ // We can only handle layers of Device type, send everything else to SF
+ if (layer.sf_type() != HWC2::Composition::Device ||
+ layer.validated_type() != HWC2::Composition::Device) {
+ layer.set_validated_type(HWC2::Composition::Client);
+ ++*num_types;
}
}
return *num_types ? HWC2::Error::HasChanges : HWC2::Error::None;