summaryrefslogtreecommitdiffstats
path: root/media/1.0
diff options
context:
space:
mode:
authorPawin Vongmasa2016-12-19 01:49:56 -0600
committerPawin Vongmasa2017-01-25 19:14:20 -0600
commit120c4da82a39f77ce2471a0ab761cfeab1f72390 (patch)
tree477b8efc263690e82ae67b90e552ae1c2b8fe6e7 /media/1.0
parentc91e7fb95e7cff9baf9a37b534d90b3d87fd26fa (diff)
downloadplatform-hardware-interfaces-120c4da82a39f77ce2471a0ab761cfeab1f72390.tar.gz
platform-hardware-interfaces-120c4da82a39f77ce2471a0ab761cfeab1f72390.tar.xz
platform-hardware-interfaces-120c4da82a39f77ce2471a0ab761cfeab1f72390.zip
Use HIDL's memory for shared memory and add wrapper interfaces for
IGraphicBufferProducer. Test: Compiles Bug: 31399200 Change-Id: I17a3b1c8f20e9c11474761d120edd2e75353cc6d
Diffstat (limited to 'media/1.0')
-rw-r--r--media/1.0/types.hal27
1 files changed, 11 insertions, 16 deletions
diff --git a/media/1.0/types.hal b/media/1.0/types.hal
index 89b7fa21..1f9c4dc4 100644
--- a/media/1.0/types.hal
+++ b/media/1.0/types.hal
@@ -40,7 +40,9 @@ struct AnwBufferAttributes {
40 uint32_t stride; 40 uint32_t stride;
41 PixelFormat format; 41 PixelFormat format;
42 uint32_t usage; // TODO: convert to an enum 42 uint32_t usage; // TODO: convert to an enum
43 uint32_t generationNumber;
43 uint64_t layerCount; 44 uint64_t layerCount;
45 uint64_t id;
44}; 46};
45 47
46/** 48/**
@@ -52,25 +54,18 @@ struct AnwBuffer {
52}; 54};
53 55
54/** 56/**
55 * Ref: frameworks/native/include/binder/IMemory.h 57 * Ref: frameworks/native/include/android/rect.h
56 * Ref: frameworks/native/libs/binder/IMemory.cpp 58 * Ref: frameworks/native/include/ui/Rect.h
57 */ 59 */
58 60struct Rect {
59/** 61 int32_t left;
60 * This struct contains attributes for a shared memory buffer that can be put 62 int32_t top;
61 * into a union. 63 int32_t right;
62 */ 64 int32_t bottom;
63struct SharedMemoryAttributes {
64 uint32_t size;
65 uint32_t flags; // TODO: convert to an enum
66 uint32_t offset;
67}; 65};
68 66
69/** 67/**
70 * A SharedMemory is simply SharedMemoryAttributes plus a native handle. 68 * Ref: frameworks/native/include/ui/Region.h
71 */ 69 */
72struct SharedMemory { 70typedef vec<Rect> Region;
73 handle nativeHandle;
74 SharedMemoryAttributes attr;
75};
76 71