From 392edd88cb63d71a21a86a02cf9c56ac97637128 Mon Sep 17 00:00:00 2001 From: Jamie Gennis Date: Thu, 29 Nov 2012 23:26:29 -0800 Subject: [PATCH] SurfaceFlinger: Move GraphicBufferAlloc to libgui This change moves the GraphicBufferAlloc class from SurfaceFlinger to libgui. Change-Id: Idf31d2004efa2651b60590733f73c4a7b831e8a9 --- .../gui}/GraphicBufferAlloc.h | 0 libs/gui/Android.mk | 23 ++++++++++--------- .../gui}/GraphicBufferAlloc.cpp | 2 +- services/surfaceflinger/Android.mk | 1 - .../DisplayHardware/FramebufferSurface.cpp | 2 +- services/surfaceflinger/SurfaceFlinger.cpp | 2 +- 6 files changed, 15 insertions(+), 15 deletions(-) rename {services/surfaceflinger/DisplayHardware => include/gui}/GraphicBufferAlloc.h (100%) rename {services/surfaceflinger/DisplayHardware => libs/gui}/GraphicBufferAlloc.cpp (97%) diff --git a/services/surfaceflinger/DisplayHardware/GraphicBufferAlloc.h b/include/gui/GraphicBufferAlloc.h similarity index 100% rename from services/surfaceflinger/DisplayHardware/GraphicBufferAlloc.h rename to include/gui/GraphicBufferAlloc.h diff --git a/libs/gui/Android.mk b/libs/gui/Android.mk index d970a33b2..04444e937 100644 --- a/libs/gui/Android.mk +++ b/libs/gui/Android.mk @@ -3,29 +3,30 @@ include $(CLEAR_VARS) LOCAL_SRC_FILES:= \ BitTube.cpp \ + BufferItemConsumer.cpp \ BufferQueue.cpp \ ConsumerBase.cpp \ + CpuConsumer.cpp \ DisplayEventReceiver.cpp \ + DummyConsumer.cpp \ + GraphicBufferAlloc.cpp \ + GuiConfig.cpp \ IDisplayEventConnection.cpp \ + IGraphicBufferAlloc.cpp \ ISensorEventConnection.cpp \ ISensorServer.cpp \ + ISurface.cpp \ + ISurfaceComposer.cpp \ + ISurfaceComposerClient.cpp \ ISurfaceTexture.cpp \ + LayerState.cpp \ Sensor.cpp \ SensorEventQueue.cpp \ SensorManager.cpp \ - SurfaceTexture.cpp \ - SurfaceTextureClient.cpp \ - ISurfaceComposer.cpp \ - ISurface.cpp \ - ISurfaceComposerClient.cpp \ - IGraphicBufferAlloc.cpp \ - LayerState.cpp \ Surface.cpp \ SurfaceComposerClient.cpp \ - DummyConsumer.cpp \ - CpuConsumer.cpp \ - BufferItemConsumer.cpp \ - GuiConfig.cpp + SurfaceTexture.cpp \ + SurfaceTextureClient.cpp \ LOCAL_SHARED_LIBRARIES := \ libbinder \ diff --git a/services/surfaceflinger/DisplayHardware/GraphicBufferAlloc.cpp b/libs/gui/GraphicBufferAlloc.cpp similarity index 97% rename from services/surfaceflinger/DisplayHardware/GraphicBufferAlloc.cpp rename to libs/gui/GraphicBufferAlloc.cpp index 965ff01c9..b360e81d4 100644 --- a/services/surfaceflinger/DisplayHardware/GraphicBufferAlloc.cpp +++ b/libs/gui/GraphicBufferAlloc.cpp @@ -19,7 +19,7 @@ #include -#include "DisplayHardware/GraphicBufferAlloc.h" +#include // ---------------------------------------------------------------------------- namespace android { diff --git a/services/surfaceflinger/Android.mk b/services/surfaceflinger/Android.mk index f7870f49f..b4b19b426 100644 --- a/services/surfaceflinger/Android.mk +++ b/services/surfaceflinger/Android.mk @@ -11,7 +11,6 @@ LOCAL_SRC_FILES:= \ LayerDim.cpp \ LayerScreenshot.cpp \ DisplayHardware/FramebufferSurface.cpp \ - DisplayHardware/GraphicBufferAlloc.cpp \ DisplayHardware/HWComposer.cpp \ DisplayHardware/PowerHAL.cpp \ GLExtensions.cpp \ diff --git a/services/surfaceflinger/DisplayHardware/FramebufferSurface.cpp b/services/surfaceflinger/DisplayHardware/FramebufferSurface.cpp index 6c86a53a3..cccb29b77 100644 --- a/services/surfaceflinger/DisplayHardware/FramebufferSurface.cpp +++ b/services/surfaceflinger/DisplayHardware/FramebufferSurface.cpp @@ -30,10 +30,10 @@ #include #include +#include #include #include "DisplayHardware/FramebufferSurface.h" -#include "DisplayHardware/GraphicBufferAlloc.h" #include "DisplayHardware/HWComposer.h" #ifndef NUM_FRAMEBUFFER_SURFACE_BUFFERS diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp index 41c5ccec7..f65b82fb7 100644 --- a/services/surfaceflinger/SurfaceFlinger.cpp +++ b/services/surfaceflinger/SurfaceFlinger.cpp @@ -40,6 +40,7 @@ #include #include #include +#include #include #include @@ -65,7 +66,6 @@ #include "SurfaceFlinger.h" #include "DisplayHardware/FramebufferSurface.h" -#include "DisplayHardware/GraphicBufferAlloc.h" #include "DisplayHardware/HWComposer.h"