surfaceflinger: remove TARGET_USES_HWC2
Remove TARGET_USES_HWC2 and assume it to be true. Remove the unused
SurfaceFlinger_hwc1.cpp and DisplayHardware/HWComposer_hwc1.cpp.
This is expected to break some devices. All affected devices should
add
PRODUCT_PACKAGES += android.hardware.graphics.composer@2.1-impl
to their device.mk and update their manifest.xml. In the worse
case, we want to fork frameworks/native/services/surfaceflinger
before this change to
frameworks/native/services/surfaceflinger_hwc1.
Test: boots taimen and hikey960
Change-Id: I27ddd4c6c8af3c39cda99d94002d179486575b28
diff --git a/services/surfaceflinger/Android.mk b/services/surfaceflinger/Android.mk
index 7115ad6..469e598 100644
--- a/services/surfaceflinger/Android.mk
+++ b/services/surfaceflinger/Android.mk
@@ -20,6 +20,7 @@
LayerVector.cpp \
MessageQueue.cpp \
MonitoredProducer.cpp \
+ SurfaceFlinger.cpp \
SurfaceFlingerConsumer.cpp \
SurfaceInterceptor.cpp \
SurfaceTracing.cpp \
@@ -27,6 +28,7 @@
DisplayHardware/ComposerHal.cpp \
DisplayHardware/FramebufferSurface.cpp \
DisplayHardware/HWC2.cpp \
+ DisplayHardware/HWComposer.cpp \
DisplayHardware/HWComposerBufferCache.cpp \
DisplayHardware/PowerHAL.cpp \
DisplayHardware/VirtualDisplaySurface.cpp \
@@ -52,17 +54,7 @@
LOCAL_CFLAGS := -DLOG_TAG=\"SurfaceFlinger\"
LOCAL_CFLAGS += -DGL_GLEXT_PROTOTYPES -DEGL_EGLEXT_PROTOTYPES
-
-ifeq ($(TARGET_USES_HWC2),true)
- LOCAL_CFLAGS += -DUSE_HWC2
- LOCAL_SRC_FILES += \
- SurfaceFlinger.cpp \
- DisplayHardware/HWComposer.cpp
-else
- LOCAL_SRC_FILES += \
- SurfaceFlinger_hwc1.cpp \
- DisplayHardware/HWComposer_hwc1.cpp
-endif
+LOCAL_CFLAGS += -DUSE_HWC2
LOCAL_CFLAGS += -fvisibility=hidden -Werror=format
@@ -128,9 +120,7 @@
LOCAL_INIT_RC := surfaceflinger.rc
-ifeq ($(TARGET_USES_HWC2),true)
- LOCAL_CFLAGS += -DUSE_HWC2
-endif
+LOCAL_CFLAGS += -DUSE_HWC2
LOCAL_SRC_FILES := \
main_surfaceflinger.cpp