diff options
author | chaochen <c.chen@sta.samsung.com> | 2014-11-19 17:14:00 -0800 |
---|---|---|
committer | Steve Kondik <steve@cyngn.com> | 2015-10-17 13:59:32 -0700 |
commit | ac086d353e02e745ddf6d5d43f1a3f8298df1688 (patch) | |
tree | 48273df012abdf1a5ea2a60d8dc0f24cdce7b639 /services/surfaceflinger | |
parent | 437e2364270105dfe109ab61dbd985fa444e1996 (diff) | |
download | frameworks_native-ac086d353e02e745ddf6d5d43f1a3f8298df1688.zip frameworks_native-ac086d353e02e745ddf6d5d43f1a3f8298df1688.tar.gz frameworks_native-ac086d353e02e745ddf6d5d43f1a3f8298df1688.tar.bz2 |
Fix for landscape thumbnail images on GLES11RenderEngine
Change-Id: If825345be2c30645c7b87258b7e24d6009f3090a
Signed-off-by: Raj Mamadgi <rmamadgi@sta.samsung.com>
Diffstat (limited to 'services/surfaceflinger')
-rw-r--r-- | services/surfaceflinger/RenderEngine/GLES11RenderEngine.cpp | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/services/surfaceflinger/RenderEngine/GLES11RenderEngine.cpp b/services/surfaceflinger/RenderEngine/GLES11RenderEngine.cpp index aded96f..853a4eb 100644 --- a/services/surfaceflinger/RenderEngine/GLES11RenderEngine.cpp +++ b/services/surfaceflinger/RenderEngine/GLES11RenderEngine.cpp @@ -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; } |