gralloc: Add support for getFormatLayout HAL API.
Implement an empty getFormatLayout API to work with
QTIMapperExtension HAL.
CRs-Fixed: 2473652
Change-Id: I2a014ee8a0add8c6ba59fa33e4d2ba0383278ce9
diff --git a/gralloc/QtiMapperExtensions.cpp b/gralloc/QtiMapperExtensions.cpp
index 8b6f4c9..afe3efa 100644
--- a/gralloc/QtiMapperExtensions.cpp
+++ b/gralloc/QtiMapperExtensions.cpp
@@ -339,6 +339,18 @@
return Void();
}
+Return<void> QtiMapperExtensions::getFormatLayout(int32_t format, uint64_t usage, int32_t flags,
+ int32_t width, int32_t height,
+ getFormatLayout_cb hidl_cb) {
+ ALOGD_IF(DEBUG, "%s: Input parameters - wxh: %dx%d usage: 0x%" PRIu64 " format: %d flags: %d",
+ __FUNCTION__, width, height, usage, format, flags);
+ auto err = Error::NONE;
+ hidl_vec<PlaneLayout> plane_info;
+ uint64_t size = 0;
+ hidl_cb(err, size, plane_info);
+ return Void();
+}
+
} // namespace implementation
} // namespace V1_0
} // namespace mapperextensions
diff --git a/gralloc/QtiMapperExtensions.h b/gralloc/QtiMapperExtensions.h
index 45bb93e..e266e66 100644
--- a/gralloc/QtiMapperExtensions.h
+++ b/gralloc/QtiMapperExtensions.h
@@ -86,6 +86,8 @@
Return<void> getId(void *buffer, getId_cb _hidl_cb) override;
Return<void> getUsageFlags(void *buffer, getUsageFlags_cb _hidl_cb) override;
Return<void> getSurfaceMetadata(void *buffer, getSurfaceMetadata_cb _hidl_cb) override;
+ Return<void> getFormatLayout(int32_t format, uint64_t usage, int32_t flags, int32_t width,
+ int32_t height, getFormatLayout_cb hidl_cb) override;
};
} // namespace implementation