gralloc/qdutils: Remove unused gralloc code, add driver type check
Remove unused code related to macro tiling from galloc and qdutils.
Add API to check for driver type and query caps based on driver.
Change-Id: I36cfa5529395c69deb886080be1c904ff5c9ad15
CRs-fixed: 1109207
diff --git a/libgralloc1/gr_buf_mgr.cpp b/libgralloc1/gr_buf_mgr.cpp
index 9650583..cea8ac9 100644
--- a/libgralloc1/gr_buf_mgr.cpp
+++ b/libgralloc1/gr_buf_mgr.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011-2016 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2011-2017 The Linux Foundation. All rights reserved.
* Not a Contribution
*
* Copyright (C) 2010 The Android Open Source Project
@@ -332,10 +332,6 @@
flags |= private_handle_t::PRIV_FLAGS_SECURE_DISPLAY;
}
- if (allocator_->IsMacroTileEnabled(format, prod_usage, cons_usage)) {
- flags |= private_handle_t::PRIV_FLAGS_TILE_RENDERED;
- }
-
if (allocator_->IsUBwcEnabled(format, prod_usage, cons_usage)) {
flags |= private_handle_t::PRIV_FLAGS_UBWC_ALIGNED;
}
@@ -573,8 +569,7 @@
int *tile_enabled = va_arg(args, int *);
unsigned int alignedw, alignedh;
BufferDescriptor descriptor(width, height, format, prod_usage, cons_usage);
- *tile_enabled = allocator_->IsUBwcEnabled(format, prod_usage, cons_usage) ||
- allocator_->IsMacroTileEnabled(format, prod_usage, cons_usage);
+ *tile_enabled = allocator_->IsUBwcEnabled(format, prod_usage, cons_usage);
allocator_->GetAlignedWidthAndHeight(descriptor, &alignedw, &alignedh);
*aligned_width = INT(alignedw);