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

Commit f7375c8e 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 30a0e006
Loading
Loading
Loading
Loading
+19 −1
Original line number Diff line number Diff line
@@ -78,6 +78,10 @@
#include "RenderEngine/RenderEngine.h"
#include <cutils/compiler.h>

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

#define DISPLAY_COUNT       1

/*
@@ -1319,12 +1323,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];
@@ -1336,8 +1343,19 @@ void SurfaceFlinger::handleTransactionLocked(uint32_t transactionFlags)
                                }
                                disp->setProjection(panelOrientation,
                                        state.viewport, state.frame);

                                orient = panelOrientation;
                            }
                            // 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
                        }
                        if (state.width != draw[i].width || state.height != draw[i].height) {
                            disp->setDisplaySize(state.width, state.height);