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
commit430f2ed5c03312700131a70c858b98e1cc6bc161 (patch)
tree9ca0a2fbaeab0b932002818f2a33bd0de2e80623 /libs/surfaceflinger/LayerBitmap.cpp
parent6279619e4279daf77feff0c76e089b26ad66124f (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 38d4bcf02f7d..765d90b82ef5 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;
}