summaryrefslogtreecommitdiffstats
path: root/libs/ui
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2009-05-21 16:29:38 -0700
committerMathias Agopian <mathias@google.com>2009-05-21 16:29:38 -0700
commitdfece80c790934e4413def863070ac0dd21f6e29 (patch)
tree8e9e2d17e5ecd6086bf02416f3a700c0d09247d7 /libs/ui
parent8f80eef228cfd01b938ca48202d6a264f7689154 (diff)
downloadframeworks_base-dfece80c790934e4413def863070ac0dd21f6e29.zip
frameworks_base-dfece80c790934e4413def863070ac0dd21f6e29.tar.gz
frameworks_base-dfece80c790934e4413def863070ac0dd21f6e29.tar.bz2
change 2115 wasn't merged properly into master. this fixes that.
Merge change 2115 into donut * changes: bring the native_handle stuff back from master_gl Conflicts: libs/binder/Parcel.cpp
Diffstat (limited to 'libs/ui')
-rw-r--r--libs/ui/Overlay.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/libs/ui/Overlay.cpp b/libs/ui/Overlay.cpp
index 9fae416..a092f8d 100644
--- a/libs/ui/Overlay.cpp
+++ b/libs/ui/Overlay.cpp
@@ -129,12 +129,8 @@ OverlayRef::OverlayRef(overlay_handle_t handle, const sp<IOverlay>& channel,
OverlayRef::~OverlayRef()
{
if (mOwnHandle) {
- /* FIXME: handles should be promoted to "real" API and be handled by
- * the framework */
- for (int i=0 ; i<mOverlayHandle->numFds ; i++) {
- close(mOverlayHandle->data[i]);
- }
- free((void*)mOverlayHandle);
+ native_handle_close(mOverlayHandle);
+ native_handle_delete(const_cast<native_handle*>(mOverlayHandle));
}
}
@@ -147,7 +143,7 @@ sp<OverlayRef> OverlayRef::readFromParcel(const Parcel& data) {
uint32_t f = data.readInt32();
uint32_t ws = data.readInt32();
uint32_t hs = data.readInt32();
- native_handle* handle = data.readNativeHandle(NULL, NULL);
+ native_handle* handle = data.readNativeHandle();
result = new OverlayRef();
result->mOverlayHandle = handle;
@@ -169,7 +165,7 @@ status_t OverlayRef::writeToParcel(Parcel* reply, const sp<OverlayRef>& o) {
reply->writeInt32(o->mFormat);
reply->writeInt32(o->mWidthStride);
reply->writeInt32(o->mHeightStride);
- reply->writeNativeHandle(*(o->mOverlayHandle));
+ reply->writeNativeHandle(o->mOverlayHandle);
} else {
reply->writeStrongBinder(NULL);
}