From 430f2ed5c03312700131a70c858b98e1cc6bc161 Mon Sep 17 00:00:00 2001 From: Mathias Agopian Date: Tue, 5 May 2009 00:37:46 -0700 Subject: 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. --- libs/surfaceflinger/LayerBitmap.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'libs/surfaceflinger/LayerBitmap.cpp') 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(bits); + sur->data = static_cast(vaddr); } return res; } -- cgit v1.2.3-59-g8ed1b