Break a dependency of libui on libandroid
This was only a header dependency, but it still
created a circular dependency, which will cause
problems in another CL.
We fix this by creating a libarect static library
containing only that header. both libui and
libandroid now depend on it and reexport the
header.
We also make sure rect.h ends-up in the right
place.
Test: built and booted device
Bug: 35164655
Change-Id: Iba25b8b801b26b26ec1401c00caf367a06f197ca
diff --git a/services/surfaceflinger/DisplayHardware/FramebufferSurface.cpp b/services/surfaceflinger/DisplayHardware/FramebufferSurface.cpp
index d3d0d51..ae6e0cc 100644
--- a/services/surfaceflinger/DisplayHardware/FramebufferSurface.cpp
+++ b/services/surfaceflinger/DisplayHardware/FramebufferSurface.cpp
@@ -27,15 +27,16 @@
#include <utils/String8.h>
#include <log/log.h>
-#include <ui/Rect.h>
-
#include <EGL/egl.h>
#include <hardware/hardware.h>
#include <gui/BufferItem.h>
+#include <gui/BufferQueue.h>
#include <gui/GraphicBufferAlloc.h>
#include <gui/Surface.h>
+
#include <ui/GraphicBuffer.h>
+#include <ui/Rect.h>
#include "FramebufferSurface.h"
#include "HWComposer.h"
diff --git a/services/surfaceflinger/DisplayHardware/VirtualDisplaySurface.cpp b/services/surfaceflinger/DisplayHardware/VirtualDisplaySurface.cpp
index 5f3c388..c5a4f99 100644
--- a/services/surfaceflinger/DisplayHardware/VirtualDisplaySurface.cpp
+++ b/services/surfaceflinger/DisplayHardware/VirtualDisplaySurface.cpp
@@ -19,6 +19,7 @@
#include "HWComposer.h"
#include <gui/BufferItem.h>
+#include <gui/BufferQueue.h>
#include <gui/IProducerListener.h>
// ---------------------------------------------------------------------------
diff --git a/services/surfaceflinger/DisplayHardware/VirtualDisplaySurface.h b/services/surfaceflinger/DisplayHardware/VirtualDisplaySurface.h
index 2636667..fb5fcc8 100644
--- a/services/surfaceflinger/DisplayHardware/VirtualDisplaySurface.h
+++ b/services/surfaceflinger/DisplayHardware/VirtualDisplaySurface.h
@@ -179,7 +179,7 @@
// slot. Both mProducerSlotSource and mProducerBuffers are indexed by a
// "producer slot"; see the mapSlot*() functions.
uint64_t mProducerSlotSource;
- sp<GraphicBuffer> mProducerBuffers[BufferQueue::NUM_BUFFER_SLOTS];
+ sp<GraphicBuffer> mProducerBuffers[BufferQueueDefs::NUM_BUFFER_SLOTS];
// The QueueBufferOutput with the latest info from the sink, and with the
// transform hint cleared. Since we defer queueBuffer from the GLES driver