libui: remove gralloc0/gralloc1 support
We now talk to HIDL gralloc exclusively.
Bug: 37433368
Test: boots
Change-Id: Iecd2f9a02c7066b2f33f24c1de57e9c4af8e28f5
diff --git a/include/ui/GraphicBufferAllocator.h b/include/ui/GraphicBufferAllocator.h
index 95eb8fd..c4cbfc4 100644
--- a/include/ui/GraphicBufferAllocator.h
+++ b/include/ui/GraphicBufferAllocator.h
@@ -25,14 +25,15 @@
#include <cutils/native_handle.h>
+#include <system/window.h>
+
+#include <ui/PixelFormat.h>
+
#include <utils/Errors.h>
#include <utils/KeyedVector.h>
#include <utils/Mutex.h>
#include <utils/Singleton.h>
-#include <ui/Gralloc1.h>
-#include <ui/PixelFormat.h>
-
namespace android {
namespace Gralloc2 {
@@ -45,25 +46,6 @@
class GraphicBufferAllocator : public Singleton<GraphicBufferAllocator>
{
public:
- enum {
- USAGE_SW_READ_NEVER = GRALLOC1_CONSUMER_USAGE_CPU_READ_NEVER,
- USAGE_SW_READ_RARELY = GRALLOC1_CONSUMER_USAGE_CPU_READ,
- USAGE_SW_READ_OFTEN = GRALLOC1_CONSUMER_USAGE_CPU_READ_OFTEN,
- USAGE_SW_READ_MASK = GRALLOC1_CONSUMER_USAGE_CPU_READ_OFTEN,
-
- USAGE_SW_WRITE_NEVER = GRALLOC1_PRODUCER_USAGE_CPU_WRITE_NEVER,
- USAGE_SW_WRITE_RARELY = GRALLOC1_PRODUCER_USAGE_CPU_WRITE,
- USAGE_SW_WRITE_OFTEN = GRALLOC1_PRODUCER_USAGE_CPU_WRITE_OFTEN,
- USAGE_SW_WRITE_MASK = GRALLOC1_PRODUCER_USAGE_CPU_WRITE_OFTEN,
-
- USAGE_SOFTWARE_MASK = USAGE_SW_READ_MASK|USAGE_SW_WRITE_MASK,
-
- USAGE_HW_TEXTURE = GRALLOC1_CONSUMER_USAGE_GPU_TEXTURE,
- USAGE_HW_RENDER = GRALLOC1_PRODUCER_USAGE_GPU_RENDER_TARGET,
- USAGE_HW_2D = 0x00000400, // Deprecated
- USAGE_HW_MASK = 0x00071F00, // Deprecated
- };
-
static inline GraphicBufferAllocator& get() { return getInstance(); }
status_t allocate(uint32_t w, uint32_t h, PixelFormat format,
@@ -98,9 +80,6 @@
GraphicBufferMapper& mMapper;
const std::unique_ptr<const Gralloc2::Allocator> mAllocator;
-
- std::unique_ptr<Gralloc1::Loader> mLoader;
- std::unique_ptr<Gralloc1::Device> mDevice;
};
// ---------------------------------------------------------------------------