summaryrefslogtreecommitdiff
path: root/libs/surfaceflinger/LayerDim.cpp
diff options
context:
space:
mode:
author Fred Quintana <fredq@google.com> 2009-08-11 20:49:35 -0700
committer Fred Quintana <fredq@google.com> 2009-08-11 20:49:35 -0700
commit64e89a8aff9a45a491f1d7064a655b9021fe644a (patch)
tree5cad5d20370d2d77335324e55551ce2a2fe8b903 /libs/surfaceflinger/LayerDim.cpp
parent50cb54ff5cdb233d01e1dd94b355cbfe0a371520 (diff)
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 6ebb49f64ca2..8e9df9cc9bcc 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);