summaryrefslogtreecommitdiffstats
path: root/libs
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2009-06-29 17:32:20 -0700
committerMathias Agopian <mathias@google.com>2009-06-29 17:32:20 -0700
commit5fc1b60e7f8b19d7d7a2244c0e1e005c7ed91659 (patch)
tree70079df7423c7213ecb110e1a4a7cbc7010b2d3f /libs
parent0f53af13b783eafa566722eb118aabcb84d88da5 (diff)
downloadframeworks_base-5fc1b60e7f8b19d7d7a2244c0e1e005c7ed91659.zip
frameworks_base-5fc1b60e7f8b19d7d7a2244c0e1e005c7ed91659.tar.gz
frameworks_base-5fc1b60e7f8b19d7d7a2244c0e1e005c7ed91659.tar.bz2
don't use a 1/4th of the screen size texture for the dim layer
we can't use a texture of 1/4th of the screen for the dim layer, because the mdp internal input resultion is alwyas integers and for very small blits of a couple pixels the scale factor can get way out of range, for instance for a 7 pixels source, the scale factor would be either 7 (7/1) or 3.5 (7/2) instead of 4 (7/1.75). This caused the mdp to fail in some cases and revert to software. we now always use a texture of the actual screen size, so the problem will never happen. This burns 300KB of pmem instead of 21KB. On devices with a larger screen we might want to use a smaller texture and tile it by hand.
Diffstat (limited to 'libs')
-rw-r--r--libs/surfaceflinger/LayerDim.cpp6
1 files changed, 0 insertions, 6 deletions
diff --git a/libs/surfaceflinger/LayerDim.cpp b/libs/surfaceflinger/LayerDim.cpp
index 4114a42..8e9df9c 100644
--- a/libs/surfaceflinger/LayerDim.cpp
+++ b/libs/surfaceflinger/LayerDim.cpp
@@ -63,12 +63,6 @@ void LayerDim::initDimmer(SurfaceFlinger* flinger, uint32_t w, uint32_t h)
* This burns a full-screen worth of graphic memory.
*/
- // copybit supports 4x scaling, so we only need to allocate 1/16 of the
- // buffer.
- // FIXME: we have to add 1px because the mdp fails
- w = w/4 + 1;
- h = h/4 + 1;
-
const DisplayHardware& hw(flinger->graphicPlane(0).displayHardware());
uint32_t flags = hw.getFlags();