summaryrefslogtreecommitdiffstats
path: root/include/ui
diff options
context:
space:
mode:
authorDan Stoza <stoza@google.com>2014-03-28 15:10:52 -0700
committerDan Stoza <stoza@google.com>2014-03-31 14:10:07 -0700
commitb1363d37fc6a661508fad106eb7698c5850a6c17 (patch)
tree73d95d7810e96e5bb5e8ddc47bc4b84e33f59277 /include/ui
parentf0eaf25e9247edf4d124bedaeb863f7abdf35a3e (diff)
downloadframeworks_native-b1363d37fc6a661508fad106eb7698c5850a6c17.zip
frameworks_native-b1363d37fc6a661508fad106eb7698c5850a6c17.tar.gz
frameworks_native-b1363d37fc6a661508fad106eb7698c5850a6c17.tar.bz2
Add unique ID to GraphicBuffer
Adds a globally-unique ID (PID + sequence number) to every GraphicBuffer, which will remain the same while crossing Binder, even if the underlying handles change. Change-Id: Ib11330a4c5e99621b82204e0adb31b9a88658426
Diffstat (limited to 'include/ui')
-rw-r--r--include/ui/GraphicBuffer.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/ui/GraphicBuffer.h b/include/ui/GraphicBuffer.h
index 3cf628c..a92424c 100644
--- a/include/ui/GraphicBuffer.h
+++ b/include/ui/GraphicBuffer.h
@@ -88,7 +88,8 @@ public:
uint32_t getUsage() const { return usage; }
PixelFormat getPixelFormat() const { return format; }
Rect getBounds() const { return Rect(width, height); }
-
+ uint64_t getId() const { return mId; }
+
status_t reallocate(uint32_t w, uint32_t h, PixelFormat f, uint32_t usage);
status_t lock(uint32_t usage, void** vaddr);
@@ -146,6 +147,8 @@ private:
// If we're wrapping another buffer then this reference will make sure it
// doesn't get freed.
sp<ANativeWindowBuffer> mWrappedBuffer;
+
+ uint64_t mId;
};
}; // namespace android