diff options
author | Mathias Agopian <mathias@google.com> | 2011-07-07 17:30:31 -0700 |
---|---|---|
committer | Mathias Agopian <mathias@google.com> | 2011-07-08 14:37:06 -0700 |
commit | ffcf4657718831edecb6ff2ed1b45ac8bf8b9a58 (patch) | |
tree | 9a2152b6f57fc67ea7c10201549e2172d4a84026 /services/surfaceflinger/LayerBase.cpp | |
parent | 6163091a2c366f8311fc3ee627dc7deb9681236e (diff) | |
download | frameworks_native-ffcf4657718831edecb6ff2ed1b45ac8bf8b9a58.zip frameworks_native-ffcf4657718831edecb6ff2ed1b45ac8bf8b9a58.tar.gz frameworks_native-ffcf4657718831edecb6ff2ed1b45ac8bf8b9a58.tar.bz2 |
fix screen on/off animation (again)
- surfaceflinger now uses the GL-convention of
placing the origin in the left-bottom corner
- map texture coordinates of the screen capture
properly
- add the ability to control the animation
speed through a debug property
Bug: 4989276
Change-Id: Ifb3297bb578078b47146fff666c01f85417e0d6f
Diffstat (limited to 'services/surfaceflinger/LayerBase.cpp')
-rw-r--r-- | services/surfaceflinger/LayerBase.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/services/surfaceflinger/LayerBase.cpp b/services/surfaceflinger/LayerBase.cpp index bcd8c83..c86c659 100644 --- a/services/surfaceflinger/LayerBase.cpp +++ b/services/surfaceflinger/LayerBase.cpp @@ -228,13 +228,18 @@ void LayerBase::validateVisibility(const Transform& planeTransform) const Layer::State& s(drawingState()); const Transform tr(planeTransform * s.transform); const bool transformed = tr.transformed(); - + const DisplayHardware& hw(graphicPlane(0).displayHardware()); + const uint32_t hw_h = hw.getHeight(); + uint32_t w = s.w; uint32_t h = s.h; tr.transform(mVertices[0], 0, 0); tr.transform(mVertices[1], 0, h); tr.transform(mVertices[2], w, h); tr.transform(mVertices[3], w, 0); + for (size_t i=0 ; i<4 ; i++) + mVertices[i][1] = hw_h - mVertices[i][1]; + if (UNLIKELY(transformed)) { // NOTE: here we could also punt if we have too many rectangles // in the transparent region |