Skip to content

Commit

Permalink
Fix for landscape thumbnail images on GLES11RenderEngine
Browse files Browse the repository at this point in the history
Change-Id: If825345be2c30645c7b87258b7e24d6009f3090a
Signed-off-by: Raj Mamadgi <rmamadgi@sta.samsung.com>
  • Loading branch information
iverson1407 authored and Ziyann committed Sep 15, 2016
1 parent 5ac1ac3 commit cd866c1
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions services/surfaceflinger/RenderEngine/GLES11RenderEngine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,14 +92,29 @@ void GLES11RenderEngine::setViewportAndProjection(
case Transform::ROT_0:
break;
case Transform::ROT_90:
glRotatef(90, 0, 0, 1);
{
float x1 = (l+r)/2;
float y1 = (t+b)/2;
glTranslatef(x1-y1, x1+y1, 0);
glRotatef(270, 0, 0, 1);
break;
}
case Transform::ROT_180:
{
float x1 = (l+r)/2;
float y1 = (t+b)/2;
glTranslatef(x1*2, y1*2, 0);
glRotatef(180, 0, 0, 1);
break;
}
case Transform::ROT_270:
glRotatef(270, 0, 0, 1);
{
float x1 = (l+r)/2;
float y1 = (t+b)/2;
glTranslatef(x1+y1, y1-x1, 0);
glRotatef(90, 0, 0, 1);
break;
}
default:
break;
}
Expand Down

0 comments on commit cd866c1

Please sign in to comment.