diff options
author | Jinhyung Jo <jinhyung.jo@samsung.com> | 2016-09-30 20:47:28 +0900 |
---|---|---|
committer | Jinhyung Jo <jinhyung.jo@samsung.com> | 2016-09-30 20:47:28 +0900 |
commit | c4145f7dc2d523e446b28738410288764bb0910a (patch) | |
tree | 83bbad13e98583d55af370beba6db2eae6b6cd16 | |
parent | 79aa7aeed2cbf343d465f42bdf4a8509e0546449 (diff) | |
download | qemu-c4145f7dc2d523e446b28738410288764bb0910a.tar.gz qemu-c4145f7dc2d523e446b28738410288764bb0910a.tar.bz2 qemu-c4145f7dc2d523e446b28738410288764bb0910a.zip |
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 <jinhyung.jo@samsung.com>
-rw-r--r-- | tizen/src/ui/displayglwidget.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
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 */ |