Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dca24c77 authored by Ricardo Cerqueira's avatar Ricardo Cerqueira Committed by Ricardo Cerqueira
Browse files

surfaceflinger: Add support for LGE's HDMI rotation

Use BOARD_USES_LGE_HDMI_ROTATION to align the HDMI output orientation
with the device's, on LGE phones (p990/p999, at least)

Change-Id: I4aefa9b13bf9ca3e51e944818838a3954d6cbcb5
parent fc496c06
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -48,6 +48,12 @@ LOCAL_SHARED_LIBRARIES := \
# this is only needed for DDMS debugging
LOCAL_SHARED_LIBRARIES += libdvm libandroid_runtime

ifeq ($(BOARD_USES_LGE_HDMI_ROTATION),true)
LOCAL_CFLAGS += -DUSE_LGE_HDMI
LOCAL_SHARED_LIBRARIES += \
	libnvdispmgr_d
endif

LOCAL_C_INCLUDES := \
	$(call include-path-for, corecg graphics)

+7 −0
Original line number Diff line number Diff line
@@ -67,6 +67,10 @@

#define DISPLAY_COUNT       1

#ifdef USE_LGE_HDMI
extern "C" void NvDispMgrAutoOrientation(int rotation);
#endif

namespace android {
// ---------------------------------------------------------------------------

@@ -2747,6 +2751,9 @@ status_t GraphicPlane::setOrientation(int orientation)
    mWidth = int(w);
    mHeight = int(h);

#ifdef USE_LGE_HDMI
    NvDispMgrAutoOrientation(orientation);
#endif
    Transform orientationTransform;
    GraphicPlane::orientationToTransfrom(orientation, w, h,
            &orientationTransform);