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

Commit 04b8813d authored by Ramkumar Radhakrishnan's avatar Ramkumar Radhakrishnan Committed by Steve Kondik
Browse files

sf: Set view frame of each display using binder

Set the view frame of a display using binder when set projection
for that display changes

Change-Id: Ib85ce80e88b207a4cf2559b2cc0e74e60ab3d4d4
parent bc9ad369
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -109,9 +109,15 @@ endif
ifeq ($(TARGET_USES_QCOM_BSP), true)
ifneq ($(TARGET_QCOM_DISPLAY_VARIANT),)
    LOCAL_C_INCLUDES += hardware/qcom/display-$(TARGET_QCOM_DISPLAY_VARIANT)/libgralloc
    LOCAL_C_INCLUDES += hardware/qcom/display-$(TARGET_QCOM_DISPLAY_VARIANT)/libqdutils
    ifeq ($(TARGET_QCOM_DISPLAY_VARIANT),caf-new)
        LOCAL_CFLAGS += -DQCOM_B_FAMILY
    endif
else
    LOCAL_C_INCLUDES += hardware/qcom/display/$(TARGET_BOARD_PLATFORM)/libgralloc
    LOCAL_C_INCLUDES += hardware/qcom/display/$(TARGET_BOARD_PLATFORM)/libqdutils
endif
    LOCAL_SHARED_LIBRARIES += libqdutils
    LOCAL_CFLAGS += -DQCOM_BSP
endif

+21 −1
Original line number Diff line number Diff line
@@ -82,6 +82,10 @@
#include "SecTVOutService.h"
#endif

#ifdef QCOM_BSP
#include <display_config.h>
#endif

#define DISPLAY_COUNT       1

/*
@@ -1503,12 +1507,15 @@ void SurfaceFlinger::handleTransactionLocked(uint32_t transactionFlags)
                                || (state.viewport != draw[i].viewport)
                                || (state.frame != draw[i].frame))
                        {
#ifdef QCOM_BSP
                            int orient = state.orientation;
                            // Honor the orientation change after boot
                            // animation completes and make sure boot
                            // animation is shown in panel orientation always.
                            if(mBootFinished){
                                disp->setProjection(state.orientation,
                                        state.viewport, state.frame);
                                orient = state.orientation;
                            }
                            else{
                                char property[PROPERTY_VALUE_MAX];
@@ -1520,8 +1527,21 @@ void SurfaceFlinger::handleTransactionLocked(uint32_t transactionFlags)
                                }
                                disp->setProjection(panelOrientation,
                                        state.viewport, state.frame);

                                orient = panelOrientation;
                            }
#endif
#ifdef QCOM_B_FAMILY
                            // Set the view frame of each display only of its
                            // default orientation.
                            if(orient == DisplayState::eOrientationDefault) {
                                qdutils::setViewFrame(disp->getHwcDisplayId(),
                                    state.frame.left, state.frame.top,
                                    state.frame.right, state.frame.bottom);
                            }
#else
                            disp->setProjection(state.orientation,
                                state.viewport, state.frame);
#endif
                        }
                    }
                }