OSDN Git Service

Change GraphicBuffer to AnwBuffer and update its fields.
authorPawin Vongmasa <pawin@google.com>
Wed, 7 Dec 2016 12:49:22 +0000 (04:49 -0800)
committerPawin Vongmasa <pawin@google.com>
Mon, 19 Dec 2016 06:04:44 +0000 (13:04 +0700)
The server side only needs information of type ANativeWindowBuffer, not
GraphicBuffer.

Test: Compiles

Bug: 31399200
Change-Id: Ic967c58d8c922e0c422e5b63fa5ce2188da89010

media/1.0/types.hal
media/omx/1.0/types.hal

index 98dfe14..89b7fa2 100644 (file)
@@ -27,28 +27,28 @@ typedef vec<uint8_t> Bytes;
 
 /**
  * Ref: frameworks/native/include/ui/GraphicBuffer.h
- * Ref: system/core/include/system/window.h
+ * Ref: system/core/include/system/window.h: ANativeWindowBuffer
  */
 
 /**
  * This struct contains attributes for a gralloc buffer that can be put into a
  * union.
  */
-struct GraphicBufferAttributes {
+struct AnwBufferAttributes {
     uint32_t width;
     uint32_t height;
     uint32_t stride;
     PixelFormat format;
     uint32_t usage; // TODO: convert to an enum
-    uint32_t generationNumber;
+    uint64_t layerCount;
 };
 
 /**
- * A GraphicBuffer is simply GraphicBufferAttributes plus a native handle.
+ * An AnwBuffer is simply AnwBufferAttributes plus a native handle.
  */
-struct GraphicBuffer {
+struct AnwBuffer {
     handle nativeHandle;
-    GraphicBufferAttributes attr;
+    AnwBufferAttributes attr;
 };
 
 /**
index e1ef5c9..ccb2ddf 100644 (file)
@@ -150,7 +150,7 @@ struct CodecBuffer {
         SharedMemoryAttributes sharedMem;
 
         // if bufferType == ANW_BUFFER
-        GraphicBufferAttributes anwBuffer;
+        AnwBufferAttributes anwBuffer;
 
         // if bufferType == NATIVE_HANDLE
         // No additional attributes.