From 579b3f88d03d06b897b778bd11818f5104677d1d Mon Sep 17 00:00:00 2001 From: Mathias Agopian Date: Tue, 8 Jun 2010 19:54:15 -0700 Subject: allow re-targetting of surfaces Surfaces can now be parcelized and sent to remote processes. When a surface crosses a process boundary, it looses its connection with the current process and gets attached to the new one. Change-Id: I39c7b055bcd3ea1162ef2718d3d4b866bf7c81c0 --- libs/ui/GraphicBuffer.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'libs/ui/GraphicBuffer.cpp') diff --git a/libs/ui/GraphicBuffer.cpp b/libs/ui/GraphicBuffer.cpp index 3ddde38f2c..4b5f02517a 100644 --- a/libs/ui/GraphicBuffer.cpp +++ b/libs/ui/GraphicBuffer.cpp @@ -111,6 +111,9 @@ status_t GraphicBuffer::reallocate(uint32_t w, uint32_t h, PixelFormat f, if (mOwner != ownData) return INVALID_OPERATION; + if (handle && w==width && h==height && f==format && reqUsage==usage) + return NO_ERROR; + if (handle) { GraphicBufferAllocator& allocator(GraphicBufferAllocator::get()); allocator.free(handle); -- cgit v1.2.3-59-g8ed1b