summaryrefslogtreecommitdiffstats
path: root/libs/surfaceflinger/LayerDim.cpp
diff options
context:
space:
mode:
authorFred Quintana <fredq@google.com>2009-08-11 20:49:35 -0700
committerFred Quintana <fredq@google.com>2009-08-11 20:49:35 -0700
commitb2fd4665e66fe81969f1f07fd724c6f68dd8f7f1 (patch)
tree8564d48ba85748bdb281a3bcda22b41ed17c72e8 /libs/surfaceflinger/LayerDim.cpp
parent01b535185805d5b22c5fffc30833decdca308b5b (diff)
downloadframeworks_native-b2fd4665e66fe81969f1f07fd724c6f68dd8f7f1.zip
frameworks_native-b2fd4665e66fe81969f1f07fd724c6f68dd8f7f1.tar.gz
frameworks_native-b2fd4665e66fe81969f1f07fd724c6f68dd8f7f1.tar.bz2
Revert "SurfaceFlinger will now allocate buffers based on the usage specified by the clients. This allows to allocate the right kind of buffer automatically, without having the user to specify anything."
This reverts commit 8b76a0ac6fbf07254629ed1ea86af014d5abe050.
Diffstat (limited to 'libs/surfaceflinger/LayerDim.cpp')
-rw-r--r--libs/surfaceflinger/LayerDim.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/libs/surfaceflinger/LayerDim.cpp b/libs/surfaceflinger/LayerDim.cpp
index 6ebb49f..8e9df9c 100644
--- a/libs/surfaceflinger/LayerDim.cpp
+++ b/libs/surfaceflinger/LayerDim.cpp
@@ -21,7 +21,6 @@
#include <utils/Errors.h>
#include <utils/Log.h>
-#include "BufferAllocator.h"
#include "LayerDim.h"
#include "SurfaceFlinger.h"
#include "DisplayHardware/DisplayHardware.h"
@@ -69,11 +68,7 @@ void LayerDim::initDimmer(SurfaceFlinger* flinger, uint32_t w, uint32_t h)
if (LIKELY(flags & DisplayHardware::DIRECT_TEXTURE)) {
// TODO: api to pass the usage flags
- sp<Buffer> buffer = new Buffer(w, h, PIXEL_FORMAT_RGB_565,
- BufferAllocator::USAGE_SW_WRITE_OFTEN |
- BufferAllocator::USAGE_HW_TEXTURE |
- BufferAllocator::USAGE_HW_2D);
-
+ sp<Buffer> buffer = new Buffer(w, h, PIXEL_FORMAT_RGB_565);
android_native_buffer_t* clientBuf = buffer->getNativeBuffer();
glGenTextures(1, &sTexId);