From: Jinhyung Jo Date: Fri, 30 Sep 2016 11:47:28 +0000 (+0900) Subject: display: fix display rotation failure X-Git-Tag: Tizen_Studio_1.3_Release_p2.3.2~23^2~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c4145f7dc2d523e446b28738410288764bb0910a;p=sdk%2Femulator%2Fqemu.git display: fix display rotation failure The degree 0(90) & degree 180(270) have same size of display. For that reason, the resize event does not occur when the rotate angle is changed. So update the status of the rotate & scale before drawing. Change-Id: I2092a45ad60e65d4ee14ed8bb66def210b28cc68 Signed-off-by: Jinhyung Jo --- diff --git a/tizen/src/ui/displayglwidget.cpp b/tizen/src/ui/displayglwidget.cpp index d88947b441..6ccb3eb2a0 100644 --- a/tizen/src/ui/displayglwidget.cpp +++ b/tizen/src/ui/displayglwidget.cpp @@ -442,6 +442,14 @@ void DisplayGLWidget::paintGL() } mFuncs->glBlendFunc(GL_DST_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + mOrtho.setToIdentity(); + mOrtho.rotate((float)-rotateAngle, 0.0f, 0.0f, 1.0f); + mOrtho.ortho(0.0f, (float)mGuestResolution.width(), + 0.0f, (float)mGuestResolution.height(), + -1.0f, 1.0f); + needScale = (mGuestResolution.width() != width()) + || (mGuestResolution.height() != height()); + drawQuad(dpyTexture, false); if (isTsEnabled) { drawMultiTouchPoints(); @@ -459,13 +467,6 @@ void DisplayGLWidget::resizeGL(int w, int h) // TODO: check changing of the guest resolution // for 'Runtime Resolution Change' - mOrtho.setToIdentity(); - mOrtho.rotate((float)-rotateAngle, 0.0f, 0.0f, 1.0f); - mOrtho.ortho(0.0f, (float)mGuestResolution.width(), - 0.0f, (float)mGuestResolution.height(), - -1.0f, 1.0f); - needScale = (mGuestResolution.width() != width()) - || (mGuestResolution.height() != height()); } /* override */