diff options
author | Mathias Agopian <mathias@google.com> | 2010-06-08 19:54:15 -0700 |
---|---|---|
committer | Mathias Agopian <mathias@google.com> | 2010-06-08 20:10:02 -0700 |
commit | 579b3f88d03d06b897b778bd11818f5104677d1d (patch) | |
tree | fcdb35e14852bd834d1d702aa94f07e2f3405942 /libs/ui/GraphicBuffer.cpp | |
parent | 53503a97a9afa9e876b1e95ca7e3b46c76aa4f15 (diff) | |
download | frameworks_native-579b3f88d03d06b897b778bd11818f5104677d1d.zip frameworks_native-579b3f88d03d06b897b778bd11818f5104677d1d.tar.gz frameworks_native-579b3f88d03d06b897b778bd11818f5104677d1d.tar.bz2 |
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
Diffstat (limited to 'libs/ui/GraphicBuffer.cpp')
-rw-r--r-- | libs/ui/GraphicBuffer.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libs/ui/GraphicBuffer.cpp b/libs/ui/GraphicBuffer.cpp index 3ddde38..4b5f025 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); |