summaryrefslogtreecommitdiff
path: root/libs/surfaceflinger/LayerBitmap.cpp
diff options
context:
space:
mode:
author Mathias Agopian <mathias@google.com> 2009-05-05 00:37:46 -0700
committer Mathias Agopian <mathias@google.com> 2009-05-05 00:37:46 -0700
commite71212ba5397387100a578d23b15862518a7a859 (patch)
tree3bbcd9e77ec897c785781aacc35a5498fe2a0edc /libs/surfaceflinger/LayerBitmap.cpp
parentb2dd686d06a608ee40285b93bc0217cf26c2b035 (diff)
removed the "bits" attribute from android_native_buffer_t.
"bits" can never be trusted now that we need to call lock() on the handle to get the virtual address of the buffer.
Diffstat (limited to 'libs/surfaceflinger/LayerBitmap.cpp')
-rw-r--r--libs/surfaceflinger/LayerBitmap.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/libs/surfaceflinger/LayerBitmap.cpp b/libs/surfaceflinger/LayerBitmap.cpp
index 38d4bcf02f..765d90b82e 100644
--- a/libs/surfaceflinger/LayerBitmap.cpp
+++ b/libs/surfaceflinger/LayerBitmap.cpp
@@ -116,7 +116,8 @@ status_t Buffer::initSize(uint32_t w, uint32_t h)
status_t Buffer::lock(GGLSurface* sur, uint32_t usage)
{
- status_t res = SurfaceBuffer::lock(usage);
+ void* vaddr;
+ status_t res = SurfaceBuffer::lock(usage, &vaddr);
if (res == NO_ERROR && sur) {
sur->version = sizeof(GGLSurface);
sur->width = width;
@@ -124,7 +125,7 @@ status_t Buffer::lock(GGLSurface* sur, uint32_t usage)
sur->stride = stride;
sur->format = format;
sur->vstride = mVStride;
- sur->data = static_cast<GGLubyte*>(bits);
+ sur->data = static_cast<GGLubyte*>(vaddr);
}
return res;
}