diff options
author | 2009-08-11 22:34:02 -0700 | |
---|---|---|
committer | 2009-08-11 23:44:13 -0700 | |
commit | 2ec8458c5fd5b1bfad2d6e16b606f5acbcfa34cc (patch) | |
tree | 2b81d3ecbac6fa27ca3c232f695445982d3727f0 /libs/surfaceflinger/LayerDim.cpp | |
parent | 5cec4742b3a1d7448bd32ae57cb4cf70b484c64c (diff) |
second take, hopefully this time it doesn't break one of the builds: "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."
Diffstat (limited to 'libs/surfaceflinger/LayerDim.cpp')
-rw-r--r-- | libs/surfaceflinger/LayerDim.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/libs/surfaceflinger/LayerDim.cpp b/libs/surfaceflinger/LayerDim.cpp index 6ebb49f64ca2..f613767de8d5 100644 --- a/libs/surfaceflinger/LayerDim.cpp +++ b/libs/surfaceflinger/LayerDim.cpp @@ -71,8 +71,7 @@ void LayerDim::initDimmer(SurfaceFlinger* flinger, uint32_t w, uint32_t h) // 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); + BufferAllocator::USAGE_HW_TEXTURE); android_native_buffer_t* clientBuf = buffer->getNativeBuffer(); @@ -97,7 +96,7 @@ void LayerDim::initDimmer(SurfaceFlinger* flinger, uint32_t w, uint32_t h) // initialize the texture with zeros GGLSurface t; - buffer->lock(&t, GRALLOC_USAGE_SW_READ_NEVER | GRALLOC_USAGE_SW_WRITE_OFTEN); + buffer->lock(&t, GRALLOC_USAGE_SW_WRITE_OFTEN); memset(t.data, 0, t.stride * t.height * 2); buffer->unlock(); sUseTexture = true; |