Fix the screen rotation issue in FHub Device.
When glViewport/glScissor is set, the screen rotation should be considered.
Change-Id: I34b3c07f4efd678806d05c9b651ad44a05269909
Rect<int> surfaceRect = scene.GetCurrentSurfaceRect();
if(clippingRect == surfaceRect)
{
Rect<int> surfaceRect = scene.GetCurrentSurfaceRect();
if(clippingRect == surfaceRect)
{
- mDamagedRects.assign(1, RecalculateRect[std::min(scene.GetCurrentSurfaceOrientation() / 90, 3)](surfaceRect, surfaceRect));
+ int32_t totalAngle = scene.GetCurrentSurfaceOrientation() + scene.GetCurrentScreenOrientation();
+ if(totalAngle >= 360)
+ {
+ totalAngle -= 360;
+ }
+ mDamagedRects.assign(1, RecalculateRect[std::min(totalAngle / 90, 3)](surfaceRect, surfaceRect));
if(scene)
{
surfaceRect = scene.GetCurrentSurfaceRect();
if(scene)
{
surfaceRect = scene.GetCurrentSurfaceRect();
- orientation = std::min(scene.GetCurrentSurfaceOrientation() / 90, 3);
+ int32_t totalAngle = scene.GetCurrentSurfaceOrientation() + scene.GetCurrentScreenOrientation();
+ if(totalAngle >= 360)
+ {
+ totalAngle -= 360;
+ }
+ orientation = std::min(totalAngle / 90, 3);
}
Internal::Adaptor::EglImplementation& eglImpl = eglGraphics->GetEglImplementation();
}
Internal::Adaptor::EglImplementation& eglImpl = eglGraphics->GetEglImplementation();