diff options
| author | Mathias Agopian <mathias@google.com> | 2010-10-27 23:46:25 -0700 |
|---|---|---|
| committer | Android Git Automerger <android-git-automerger@android.com> | 2010-10-27 23:46:25 -0700 |
| commit | 5c0efef9a15595fb855595b917ae6c3bcf216f78 (patch) | |
| tree | 5db74b5f6a946ff518e67316f6d3c9a0568cc8e7 /services/surfaceflinger/LayerBase.cpp | |
| parent | 70a68f9544426fa47ba7284d80a95807e820e17a (diff) | |
| parent | 7d452f693f06dfa4ad6a26a51ce03edf60107e8c (diff) | |
| download | frameworks_base-5c0efef9a15595fb855595b917ae6c3bcf216f78.zip frameworks_base-5c0efef9a15595fb855595b917ae6c3bcf216f78.tar.gz frameworks_base-5c0efef9a15595fb855595b917ae6c3bcf216f78.tar.bz2 | |
am 7d452f69: Merge "really fix [3118445] Transform * Transform does not work as expected" into gingerbread
Diffstat (limited to 'services/surfaceflinger/LayerBase.cpp')
| -rw-r--r-- | services/surfaceflinger/LayerBase.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/services/surfaceflinger/LayerBase.cpp b/services/surfaceflinger/LayerBase.cpp index 069b85a..64eed4b 100644 --- a/services/surfaceflinger/LayerBase.cpp +++ b/services/surfaceflinger/LayerBase.cpp @@ -415,6 +415,20 @@ void LayerBase::drawWithOpenGL(const Region& clip, const Texture& texture) const cb = (texture.NPOTAdjust ? texture.hScale : 1.0f); } + /* + * For the buffer transformation, we apply the rotation last. + * Since we're transforming the texture-coordinates, we need + * to apply the inverse of the buffer transformation: + * inverse( FLIP_V -> FLIP_H -> ROT_90 ) + * <=> inverse( ROT_90 * FLIP_H * FLIP_V ) + * = inverse(FLIP_V) * inverse(FLIP_H) * inverse(ROT_90) + * = FLIP_V * FLIP_H * ROT_270 + * <=> ROT_270 -> FLIP_H -> FLIP_V + * + * The rotation is performed first, in the texture coordinate space. + * + */ + struct TexCoords { GLfloat u; GLfloat v; |
