commit | 201faf32b6419b3fe4660652a2d8a7d7bc2d2646 | [log] [tgz] |
---|---|---|
author | Ankit Goyal <layog@google.com> | Fri Jan 15 22:04:13 2021 +0800 |
committer | Sean Callanan <spyffe@google.com> | Thu Jan 21 14:37:12 2021 -0800 |
tree | 92ebf674ba964ac6df6b2972c21b776d7cb0d15c | |
parent | 597592d1970832e9fce414dc80589fe988c79f55 [diff] |
VendorGraphicBuffer: Add plane offsets to VendorGraphicBufferMeta Bug: 177685505 Test: Boots on Gralloc3 and builds on Gralloc4 Change-Id: I62d14cd76d5b54d6a8868617f0b750ab92c102e8
diff --git a/libvendorgraphicbuffer/gralloc3/vendor_graphicbuffer_meta.cpp b/libvendorgraphicbuffer/gralloc3/vendor_graphicbuffer_meta.cpp index 40cef84..dee9ca3 100644 --- a/libvendorgraphicbuffer/gralloc3/vendor_graphicbuffer_meta.cpp +++ b/libvendorgraphicbuffer/gralloc3/vendor_graphicbuffer_meta.cpp
@@ -193,6 +193,10 @@ size1 = gralloc_hnd->sizes[1]; size2 = gralloc_hnd->sizes[2]; + offsets[0] = gralloc_hnd->plane_info[0].offset; + offsets[1] = gralloc_hnd->plane_info[1].offset; + offsets[2] = gralloc_hnd->plane_info[2].offset; + internal_format = gralloc_hnd->internal_format; frameworkFormat = gralloc_hnd->req_format;
diff --git a/libvendorgraphicbuffer/gralloc4/vendor_graphicbuffer_meta.cpp b/libvendorgraphicbuffer/gralloc4/vendor_graphicbuffer_meta.cpp index 8d7f702..053e043 100644 --- a/libvendorgraphicbuffer/gralloc4/vendor_graphicbuffer_meta.cpp +++ b/libvendorgraphicbuffer/gralloc4/vendor_graphicbuffer_meta.cpp
@@ -198,6 +198,10 @@ size1 = gralloc_hnd->alloc_sizes[1]; size2 = gralloc_hnd->alloc_sizes[2]; + offsets[0] = gralloc_hnd->plane_info[0].offset; + offsets[1] = gralloc_hnd->plane_info[1].offset; + offsets[2] = gralloc_hnd->plane_info[2].offset; + uint64_t usage = gralloc_hnd->producer_usage | gralloc_hnd->consumer_usage; if (usage & VendorGraphicBufferUsage::VIDEO_PRIVATE_DATA) { switch (gralloc_hnd->get_share_attr_fd_index()) {
diff --git a/libvendorgraphicbuffer/include/VendorGraphicBuffer.h b/libvendorgraphicbuffer/include/VendorGraphicBuffer.h index b8c9b58..4b93f11 100644 --- a/libvendorgraphicbuffer/include/VendorGraphicBuffer.h +++ b/libvendorgraphicbuffer/include/VendorGraphicBuffer.h
@@ -90,6 +90,8 @@ }; }; + uint32_t offsets[3]; + union { uint32_t format;