summaryrefslogtreecommitdiffstats
path: root/libs/surfaceflinger/LayerBuffer.h
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2009-10-05 17:07:12 -0700
committerMathias Agopian <mathias@google.com>2009-10-06 17:00:25 -0700
commit3330b203039dea366d4981db1408a460134b2d2c (patch)
treef165f7801f2ee8034ad1edfd34e2b554fdaf662f /libs/surfaceflinger/LayerBuffer.h
parent0ad3f9f4009c76b56f41da5d26eb7712dee938f1 (diff)
downloadframeworks_native-3330b203039dea366d4981db1408a460134b2d2c.zip
frameworks_native-3330b203039dea366d4981db1408a460134b2d2c.tar.gz
frameworks_native-3330b203039dea366d4981db1408a460134b2d2c.tar.bz2
fix [2167050] glTexImage2D code path buggy in SurfaceFlinger
When EGLImage extension is not available, SurfaceFlinger will fallback to using glTexImage2D and glTexSubImage2D instead, which requires 50% more memory and an extra copy. However this code path has never been exercised and had some bugs which this patch fix. Mainly the scale factor wasn't computed right when falling back on glDrawElements. We also fallback to this mode of operation if a buffer doesn't have the adequate usage bits for EGLImage usage. This changes only code that is currently not executed. Some refactoring was needed to keep the change clean. This doesn't change anything functionaly.
Diffstat (limited to 'libs/surfaceflinger/LayerBuffer.h')
-rw-r--r--libs/surfaceflinger/LayerBuffer.h5
1 files changed, 1 insertions, 4 deletions
diff --git a/libs/surfaceflinger/LayerBuffer.h b/libs/surfaceflinger/LayerBuffer.h
index 0452818..5eb472c 100644
--- a/libs/surfaceflinger/LayerBuffer.h
+++ b/libs/surfaceflinger/LayerBuffer.h
@@ -20,9 +20,6 @@
#include <stdint.h>
#include <sys/types.h>
-#include <binder/IMemory.h>
-#include <private/ui/LayerState.h>
-
#include "LayerBase.h"
struct copybit_device_t;
@@ -133,7 +130,7 @@ private:
status_t mStatus;
ISurface::BufferHeap mBufferHeap;
size_t mBufferSize;
- mutable sp<android::Buffer> mTempBitmap;
+ mutable sp<GraphicBuffer> mTempBitmap;
mutable LayerBase::Texture mTexture;
copybit_device_t* mBlitEngine;
};