Merge remote-tracking branch 'aosp/upstream-master' into HEAD
am: bdf5d72c1b
Change-Id: I835efd69c4369f784088d1d9123393e8a6fb853e
diff --git a/Android.mk b/Android.mk
index a2fe0ef..d5ee200 100644
--- a/Android.mk
+++ b/Android.mk
@@ -77,9 +77,6 @@
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 @@
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;