diff options
author | Mathias Agopian <mathias@google.com> | 2009-08-11 22:34:02 -0700 |
---|---|---|
committer | Mathias Agopian <mathias@google.com> | 2009-08-11 23:44:13 -0700 |
commit | cf70e3301bcbfbdeb6a4fd04196f3e4ea5420c39 (patch) | |
tree | 699d3012ce271d628248a235541547a8cce76dfb /libs | |
parent | 5221271375f361b84a6eeec3d7086f223997fbb3 (diff) | |
download | frameworks_native-cf70e3301bcbfbdeb6a4fd04196f3e4ea5420c39.zip frameworks_native-cf70e3301bcbfbdeb6a4fd04196f3e4ea5420c39.tar.gz frameworks_native-cf70e3301bcbfbdeb6a4fd04196f3e4ea5420c39.tar.bz2 |
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')
-rw-r--r-- | libs/surfaceflinger/LayerBuffer.cpp | 1 | ||||
-rw-r--r-- | libs/surfaceflinger/LayerDim.cpp | 5 |
2 files changed, 2 insertions, 4 deletions
diff --git a/libs/surfaceflinger/LayerBuffer.cpp b/libs/surfaceflinger/LayerBuffer.cpp index e1f4bea..bd6d472 100644 --- a/libs/surfaceflinger/LayerBuffer.cpp +++ b/libs/surfaceflinger/LayerBuffer.cpp @@ -467,7 +467,6 @@ void LayerBuffer::BufferSource::onDraw(const Region& clip) const mTempBitmap.clear(); mTempBitmap = new android::Buffer( tmp_w, tmp_h, src.img.format, - BufferAllocator::USAGE_HW_TEXTURE | BufferAllocator::USAGE_HW_2D); err = mTempBitmap->initCheck(); } diff --git a/libs/surfaceflinger/LayerDim.cpp b/libs/surfaceflinger/LayerDim.cpp index 6ebb49f..f613767 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; |