gralloc: Query GPU for UBWC use cases only
1. Query GPU only if the client uses UBWC specific HAL pixel format
or sets UBWC gralloc flag in the usage flags.
2. Add an adreno pixel format in the utils.
Change-Id: I84a4701b40deae349f49440f0508972974c4b12a
diff --git a/libgralloc/gpu.cpp b/libgralloc/gpu.cpp
index 9be93d6..be7bd4b 100644
--- a/libgralloc/gpu.cpp
+++ b/libgralloc/gpu.cpp
@@ -142,8 +142,8 @@
flags |= private_handle_t::PRIV_FLAGS_TILE_RENDERED;
}
- if (AdrenoMemInfo::getInstance().isUBWCSupportedByGPU(format) &&
- isUBwcEnabled(format, usage)) {
+ if (isUBwcEnabled(format, usage) &&
+ AdrenoMemInfo::getInstance().isUBWCSupportedByGPU(format)) {
flags |= private_handle_t::PRIV_FLAGS_UBWC_ALIGNED;
}