Fix for landscape thumbnail images on GLES11RenderEngine

Change-Id: If825345be2c30645c7b87258b7e24d6009f3090a
Signed-off-by: Raj Mamadgi <rmamadgi@sta.samsung.com>
This commit is contained in:
chaochen 2014-11-19 17:14:00 -08:00 committed by Steve Kondik
parent 437e236427
commit ac086d353e

View File

@ -92,14 +92,29 @@ void GLES11RenderEngine::setViewportAndProjection(
case Transform::ROT_0: case Transform::ROT_0:
break; break;
case Transform::ROT_90: case Transform::ROT_90:
glRotatef(90, 0, 0, 1); {
break; float x1 = (l+r)/2;
case Transform::ROT_180: float y1 = (t+b)/2;
glRotatef(180, 0, 0, 1); glTranslatef(x1-y1, x1+y1, 0);
break;
case Transform::ROT_270:
glRotatef(270, 0, 0, 1); glRotatef(270, 0, 0, 1);
break; 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:
{
float x1 = (l+r)/2;
float y1 = (t+b)/2;
glTranslatef(x1+y1, y1-x1, 0);
glRotatef(90, 0, 0, 1);
break;
}
default: default:
break; break;
} }