Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

split libsurfaceflinger_client and libcamera_client out of libui

  • Loading branch information...
commit 000479f9e325b4e426a67033abd92d47da412725 1 parent 28a5dc2
Mathias Agopian authored

Showing 77 changed files with 265 additions and 197 deletions. Show diff stats Hide diff stats

  1. +3 1 camera/libcameraservice/Android.mk
  2. +1 1  camera/libcameraservice/CameraHardwareStub.h
  3. +3 1 camera/libcameraservice/CameraService.cpp
  4. +3 3 camera/libcameraservice/CameraService.h
  5. +3 1 camera/tests/CameraServiceTest/Android.mk
  6. +6 6 camera/tests/CameraServiceTest/CameraServiceTest.cpp
  7. +2 1  cmds/bootanimation/Android.mk
  8. +3 2 cmds/bootanimation/BootAnimation.cpp
  9. +2 2 cmds/bootanimation/BootAnimation.h
  10. +1 1  cmds/bootanimation/bootanimation_main.cpp
  11. +2 0  core/jni/Android.mk
  12. +2 2 core/jni/android_hardware_Camera.cpp
  13. +1 1  core/jni/android_view_Display.cpp
  14. +1 1  core/jni/android_view_Surface.cpp
  15. +1 1  core/jni/com_google_android_gles_jni_EGLImpl.cpp
  16. +2 1  graphics/jni/Android.mk
  17. +1 1  graphics/jni/android_renderscript_RenderScript.cpp
  18. +3 1 include/{ui → camera}/Camera.h
  19. +6 4 include/{ui → camera}/CameraHardwareInterface.h
  20. 0  include/{ui → camera}/CameraParameters.h
  21. +2 2 include/{ui → camera}/ICamera.h
  22. 0  include/{ui → camera}/ICameraClient.h
  23. +2 2 include/{ui → camera}/ICameraService.h
  24. +2 1  include/media/MediaPlayerInterface.h
  25. +2 1  include/media/mediaplayer.h
  26. +1 1  include/media/stagefright/HardwareAPI.h
  27. +5 4 include/private/{ui → surfaceflinger}/LayerState.h
  28. +3 3 include/private/{ui → surfaceflinger}/SharedBufferStack.h
  29. +6 4 include/{ui → surfaceflinger}/ISurface.h
  30. +10 11 include/{ui → surfaceflinger}/ISurfaceComposer.h
  31. +7 9 include/{ui → surfaceflinger}/ISurfaceFlingerClient.h
  32. +6 6 include/{ui → surfaceflinger}/Surface.h
  33. +7 6 include/{ui → surfaceflinger}/SurfaceComposerClient.h
  34. +25 0 libs/camera/Android.mk
  35. +7 4 libs/{ui → camera}/Camera.cpp
  36. +1 1  libs/{ui → camera}/CameraParameters.cpp
  37. +1 1  libs/{ui → camera}/ICamera.cpp
  38. +1 1  libs/{ui → camera}/ICameraClient.cpp
  39. +1 1  libs/{ui → camera}/ICameraService.cpp
  40. +1 0  libs/rs/rsContext.cpp
  41. +3 2 libs/rs/rsContext.h
  42. +2 1  libs/surfaceflinger/Android.mk
  43. +2 1  libs/surfaceflinger/Layer.cpp
  44. +4 3 libs/surfaceflinger/LayerBase.h
  45. +0 2  libs/surfaceflinger/LayerBlur.h
  46. +2 5 libs/surfaceflinger/SurfaceFlinger.h
  47. +2 1  libs/surfaceflinger/tests/overlays/Android.mk
  48. +4 3 libs/surfaceflinger/tests/overlays/overlays.cpp
  49. +2 1  libs/surfaceflinger/tests/resize/Android.mk
  50. +8 6 libs/surfaceflinger/tests/resize/resize.cpp
  51. +26 0 libs/surfaceflinger_client/Android.mk
  52. +3 3 libs/{ui → surfaceflinger_client}/ISurface.cpp
  53. +2 1  libs/{ui → surfaceflinger_client}/ISurfaceComposer.cpp
  54. +3 3 libs/{ui → surfaceflinger_client}/ISurfaceFlingerClient.cpp
  55. +1 13 libs/{ui → surfaceflinger_client}/LayerState.cpp
  56. +1 1  libs/{ui → surfaceflinger_client}/SharedBufferStack.cpp
  57. +10 7 libs/{ui → surfaceflinger_client}/Surface.cpp
  58. +9 7 libs/{ui → surfaceflinger_client}/SurfaceComposerClient.cpp
  59. +1 13 libs/ui/Android.mk
  60. +0 1  libs/ui/FramebufferNativeWindow.cpp
  61. +3 1 media/jni/Android.mk
  62. +1 1  media/jni/android_media_MediaPlayer.cpp
  63. +3 3 media/jni/android_media_MediaRecorder.cpp
  64. +1 1  media/libmedia/Android.mk
  65. +1 1  media/libmedia/IMediaPlayer.cpp
  66. +2 2 media/libmedia/IMediaRecorder.cpp
  67. +2 2 media/libmedia/IOMX.cpp
  68. +2 0  media/libmedia/mediaplayer.cpp
  69. +1 1  media/libmedia/mediarecorder.cpp
  70. +14 13 media/libmediaplayerservice/Android.mk
  71. +0 1  media/libmediaplayerservice/MediaPlayerService.h
  72. +2 2 media/libmediaplayerservice/StagefrightRecorder.cpp
  73. +3 1 media/libstagefright/Android.mk
  74. +2 0  media/libstagefright/AwesomePlayer.cpp
  75. +3 3 media/libstagefright/CameraSource.cpp
  76. +3 1 media/libstagefright/colorconversion/Android.mk
  77. +1 1  media/libstagefright/colorconversion/SoftwareRenderer.cpp
4 camera/libcameraservice/Android.mk
@@ -48,7 +48,9 @@ LOCAL_SHARED_LIBRARIES:= \
48 48 libutils \
49 49 libbinder \
50 50 libcutils \
51   - libmedia
  51 + libmedia \
  52 + libcamera_client \
  53 + libsurfaceflinger_client
52 54
53 55 LOCAL_MODULE:= libcameraservice
54 56
2  camera/libcameraservice/CameraHardwareStub.h
@@ -20,7 +20,7 @@
20 20
21 21 #include "FakeCamera.h"
22 22 #include <utils/threads.h>
23   -#include <ui/CameraHardwareInterface.h>
  23 +#include <camera/CameraHardwareInterface.h>
24 24 #include <binder/MemoryBase.h>
25 25 #include <binder/MemoryHeapBase.h>
26 26 #include <utils/threads.h>
4 camera/libcameraservice/CameraService.cpp
@@ -25,7 +25,9 @@
25 25 #include <utils/Errors.h>
26 26 #include <binder/MemoryBase.h>
27 27 #include <binder/MemoryHeapBase.h>
28   -#include <ui/ICameraService.h>
  28 +#include <camera/ICameraService.h>
  29 +#include <surfaceflinger/ISurface.h>
  30 +#include <ui/Overlay.h>
29 31
30 32 #include <media/mediaplayer.h>
31 33 #include <media/AudioSystem.h>
6 camera/libcameraservice/CameraService.h
@@ -19,9 +19,9 @@
19 19 #ifndef ANDROID_SERVERS_CAMERA_CAMERASERVICE_H
20 20 #define ANDROID_SERVERS_CAMERA_CAMERASERVICE_H
21 21
22   -#include <ui/ICameraService.h>
23   -#include <ui/CameraHardwareInterface.h>
24   -#include <ui/Camera.h>
  22 +#include <camera/ICameraService.h>
  23 +#include <camera/CameraHardwareInterface.h>
  24 +#include <camera/Camera.h>
25 25
26 26 namespace android {
27 27
4 camera/tests/CameraServiceTest/Android.mk
@@ -17,6 +17,8 @@ LOCAL_SHARED_LIBRARIES += \
17 17 libbinder \
18 18 libcutils \
19 19 libutils \
20   - libui
  20 + libui \
  21 + libcamera_client \
  22 + libsurfaceflinger_client
21 23
22 24 include $(BUILD_EXECUTABLE)
12 camera/tests/CameraServiceTest/CameraServiceTest.cpp
@@ -6,13 +6,13 @@
6 6 #include <sys/types.h>
7 7 #include <sys/wait.h>
8 8 #include <unistd.h>
9   -#include <ui/ISurface.h>
10   -#include <ui/Camera.h>
11   -#include <ui/CameraParameters.h>
  9 +#include <surfaceflinger/ISurface.h>
  10 +#include <camera/Camera.h>
  11 +#include <camera/CameraParameters.h>
12 12 #include <ui/GraphicBuffer.h>
13   -#include <ui/ICamera.h>
14   -#include <ui/ICameraClient.h>
15   -#include <ui/ICameraService.h>
  13 +#include <camera/ICamera.h>
  14 +#include <camera/ICameraClient.h>
  15 +#include <camera/ICameraService.h>
16 16 #include <ui/Overlay.h>
17 17 #include <binder/IPCThreadState.h>
18 18 #include <binder/IServiceManager.h>
3  cmds/bootanimation/Android.mk
@@ -21,7 +21,8 @@ LOCAL_SHARED_LIBRARIES := \
21 21 libui \
22 22 libskia \
23 23 libEGL \
24   - libGLESv1_CM
  24 + libGLESv1_CM \
  25 + libsurfaceflinger_client
25 26
26 27 LOCAL_C_INCLUDES := \
27 28 $(call include-path-for, corecg graphics)
5 cmds/bootanimation/BootAnimation.cpp
@@ -34,11 +34,12 @@
34 34 #include <ui/Rect.h>
35 35 #include <ui/Region.h>
36 36 #include <ui/DisplayInfo.h>
37   -#include <ui/ISurfaceComposer.h>
38   -#include <ui/ISurfaceFlingerClient.h>
39 37 #include <ui/FramebufferNativeWindow.h>
40 38 #include <ui/EGLUtils.h>
41 39
  40 +#include <surfaceflinger/ISurfaceComposer.h>
  41 +#include <surfaceflinger/ISurfaceFlingerClient.h>
  42 +
42 43 #include <core/SkBitmap.h>
43 44 #include <images/SkImageDecoder.h>
44 45
4 cmds/bootanimation/BootAnimation.h
@@ -23,8 +23,8 @@
23 23 #include <utils/threads.h>
24 24 #include <utils/AssetManager.h>
25 25
26   -#include <ui/ISurfaceComposer.h>
27   -#include <ui/SurfaceComposerClient.h>
  26 +#include <surfaceflinger/ISurfaceComposer.h>
  27 +#include <surfaceflinger/SurfaceComposerClient.h>
28 28
29 29 #include <EGL/egl.h>
30 30 #include <GLES/gl.h>
2  cmds/bootanimation/bootanimation_main.cpp
@@ -25,7 +25,7 @@
25 25 #include <utils/Log.h>
26 26 #include <utils/threads.h>
27 27
28   -#include <ui/ISurfaceComposer.h>
  28 +#include <surfaceflinger/ISurfaceComposer.h>
29 29
30 30 #if defined(HAVE_PTHREADS)
31 31 # include <pthread.h>
2  core/jni/Android.mk
@@ -159,6 +159,8 @@ LOCAL_SHARED_LIBRARIES := \
159 159 libbinder \
160 160 libnetutils \
161 161 libui \
  162 + libsurfaceflinger_client \
  163 + libcamera_client \
162 164 libskiagl \
163 165 libskia \
164 166 libsqlite \
4 core/jni/android_hardware_Camera.cpp
@@ -25,8 +25,8 @@
25 25
26 26 #include <utils/Vector.h>
27 27
28   -#include <ui/Surface.h>
29   -#include <ui/Camera.h>
  28 +#include <surfaceflinger/Surface.h>
  29 +#include <camera/Camera.h>
30 30 #include <binder/IMemory.h>
31 31
32 32 using namespace android;
2  core/jni/android_view_Display.cpp
@@ -17,7 +17,7 @@
17 17 #include <stdio.h>
18 18 #include <assert.h>
19 19
20   -#include <ui/SurfaceComposerClient.h>
  20 +#include <surfaceflinger/SurfaceComposerClient.h>
21 21 #include <ui/PixelFormat.h>
22 22 #include <ui/DisplayInfo.h>
23 23
2  core/jni/android_view_Surface.cpp
@@ -18,7 +18,7 @@
18 18
19 19 #include "android_util_Binder.h"
20 20
21   -#include <ui/SurfaceComposerClient.h>
  21 +#include <surfaceflinger/SurfaceComposerClient.h>
22 22 #include <ui/Region.h>
23 23 #include <ui/Rect.h>
24 24
2  core/jni/com_google_android_gles_jni_EGLImpl.cpp
@@ -21,7 +21,7 @@
21 21 #include <EGL/egl.h>
22 22 #include <GLES/gl.h>
23 23
24   -#include <ui/Surface.h>
  24 +#include <surfaceflinger/Surface.h>
25 25 #include <SkBitmap.h>
26 26 #include <SkPixelRef.h>
27 27
3  graphics/jni/Android.mk
@@ -19,7 +19,8 @@ LOCAL_SHARED_LIBRARIES := \
19 19 libcutils \
20 20 libskia \
21 21 libutils \
22   - libui
  22 + libui \
  23 + libsurfaceflinger_client
23 24
24 25 LOCAL_STATIC_LIBRARIES :=
25 26
2  graphics/jni/android_renderscript_RenderScript.cpp
@@ -23,7 +23,7 @@
23 23 #include <math.h>
24 24 #include <utils/misc.h>
25 25
26   -#include <ui/Surface.h>
  26 +#include <surfaceflinger/Surface.h>
27 27
28 28 #include <core/SkBitmap.h>
29 29 #include <core/SkPixelRef.h>
4 include/ui/Camera.h → include/camera/Camera.h
@@ -19,10 +19,12 @@
19 19 #define ANDROID_HARDWARE_CAMERA_H
20 20
21 21 #include <utils/Timers.h>
22   -#include <ui/ICameraClient.h>
  22 +#include <camera/ICameraClient.h>
23 23
24 24 namespace android {
25 25
  26 +class ISurface;
  27 +
26 28 /*
27 29 * A set of bit masks for specifying how the received preview frames are
28 30 * handled before the previewCallback() call.
10 include/ui/CameraHardwareInterface.h → include/camera/CameraHardwareInterface.h
@@ -19,12 +19,14 @@
19 19
20 20 #include <binder/IMemory.h>
21 21 #include <utils/RefBase.h>
22   -#include <ui/ISurface.h>
23   -#include <ui/Camera.h>
24   -#include <ui/CameraParameters.h>
25   -#include <ui/Overlay.h>
  22 +#include <surfaceflinger/ISurface.h>
  23 +#include <camera/Camera.h>
  24 +#include <camera/CameraParameters.h>
26 25
27 26 namespace android {
  27 +
  28 +class Overlay;
  29 +
28 30 /**
29 31 * The size of image for display.
30 32 */
0  include/ui/CameraParameters.h → include/camera/CameraParameters.h
File renamed without changes
4 include/ui/ICamera.h → include/camera/ICamera.h
@@ -20,10 +20,10 @@
20 20 #include <utils/RefBase.h>
21 21 #include <binder/IInterface.h>
22 22 #include <binder/Parcel.h>
23   -#include <ui/ISurface.h>
  23 +#include <surfaceflinger/ISurface.h>
24 24 #include <binder/IMemory.h>
25 25 #include <utils/String8.h>
26   -#include <ui/Camera.h>
  26 +#include <camera/Camera.h>
27 27
28 28 namespace android {
29 29
0  include/ui/ICameraClient.h → include/camera/ICameraClient.h
File renamed without changes
4 include/ui/ICameraService.h → include/camera/ICameraService.h
@@ -21,8 +21,8 @@
21 21 #include <binder/IInterface.h>
22 22 #include <binder/Parcel.h>
23 23
24   -#include <ui/ICameraClient.h>
25   -#include <ui/ICamera.h>
  24 +#include <camera/ICameraClient.h>
  25 +#include <camera/ICamera.h>
26 26
27 27 namespace android {
28 28
3  include/media/MediaPlayerInterface.h
@@ -20,7 +20,6 @@
20 20 #ifdef __cplusplus
21 21
22 22 #include <sys/types.h>
23   -#include <ui/ISurface.h>
24 23 #include <utils/Errors.h>
25 24 #include <utils/KeyedVector.h>
26 25 #include <utils/String8.h>
@@ -33,6 +32,8 @@
33 32 namespace android {
34 33
35 34 class Parcel;
  35 +class ISurface;
  36 +
36 37 template<typename T> class SortedVector;
37 38
38 39 enum player_type {
3  include/media/mediaplayer.h
@@ -18,7 +18,6 @@
18 18 #define ANDROID_MEDIAPLAYER_H
19 19
20 20 #include <binder/IMemory.h>
21   -#include <ui/Surface.h>
22 21 #include <media/IMediaPlayerClient.h>
23 22 #include <media/IMediaPlayer.h>
24 23 #include <media/IMediaDeathNotifier.h>
@@ -28,6 +27,8 @@
28 27
29 28 namespace android {
30 29
  30 +class Surface;
  31 +
31 32 enum media_event_type {
32 33 MEDIA_NOP = 0, // interface test message
33 34 MEDIA_PREPARED = 1,
2  include/media/stagefright/HardwareAPI.h
@@ -20,7 +20,7 @@
20 20
21 21 #include <media/stagefright/OMXPluginBase.h>
22 22 #include <media/stagefright/VideoRenderer.h>
23   -#include <ui/ISurface.h>
  23 +#include <surfaceflinger/ISurface.h>
24 24 #include <utils/RefBase.h>
25 25
26 26 #include <OMX_Component.h>
9 include/private/ui/LayerState.h → include/private/surfaceflinger/LayerState.h
@@ -14,17 +14,18 @@
14 14 * limitations under the License.
15 15 */
16 16
17   -#ifndef ANDROID_COMPOSER_LAYER_STATE_H
18   -#define ANDROID_COMPOSER_LAYER_STATE_H
  17 +#ifndef ANDROID_SF_LAYER_STATE_H
  18 +#define ANDROID_SF_LAYER_STATE_H
19 19
20 20 #include <stdint.h>
21 21 #include <sys/types.h>
22 22
23 23 #include <utils/Errors.h>
24 24
25   -#include <ui/ISurfaceFlingerClient.h>
26 25 #include <ui/Region.h>
27 26
  27 +#include <surfaceflinger/ISurface.h>
  28 +
28 29 namespace android {
29 30
30 31 class Parcel;
@@ -69,5 +70,5 @@ struct layer_state_t {
69 70
70 71 }; // namespace android
71 72
72   -#endif // ANDROID_COMPOSER_LAYER_STATE_H
  73 +#endif // ANDROID_SF_LAYER_STATE_H
73 74
6 include/private/ui/SharedBufferStack.h → include/private/surfaceflinger/SharedBufferStack.h
@@ -14,8 +14,8 @@
14 14 * limitations under the License.
15 15 */
16 16
17   -#ifndef ANDROID_UI_SHARED_BUFFER_STACK_H
18   -#define ANDROID_UI_SHARED_BUFFER_STACK_H
  17 +#ifndef ANDROID_SF_SHARED_BUFFER_STACK_H
  18 +#define ANDROID_SF_SHARED_BUFFER_STACK_H
19 19
20 20 #include <stdint.h>
21 21 #include <sys/types.h>
@@ -356,4 +356,4 @@ COMPILE_TIME_ASSERT(sizeof(surface_flinger_cblk_t) <= 4096)
356 356 // ---------------------------------------------------------------------------
357 357 }; // namespace android
358 358
359   -#endif /* ANDROID_UI_SHARED_BUFFER_STACK_H */
  359 +#endif /* ANDROID_SF_SHARED_BUFFER_STACK_H */
10 include/ui/ISurface.h → include/surfaceflinger/ISurface.h
@@ -14,15 +14,17 @@
14 14 * limitations under the License.
15 15 */
16 16
17   -#ifndef ANDROID_ISURFACE_H
18   -#define ANDROID_ISURFACE_H
  17 +#ifndef ANDROID_SF_ISURFACE_H
  18 +#define ANDROID_SF_ISURFACE_H
19 19
20 20 #include <stdint.h>
21 21 #include <sys/types.h>
22 22
23 23 #include <utils/Errors.h>
24   -#include <binder/IInterface.h>
25 24 #include <utils/RefBase.h>
  25 +
  26 +#include <binder/IInterface.h>
  27 +
26 28 #include <ui/PixelFormat.h>
27 29
28 30 #include <hardware/hardware.h>
@@ -107,4 +109,4 @@ class BnSurface : public BnInterface<ISurface>
107 109
108 110 }; // namespace android
109 111
110   -#endif // ANDROID_ISURFACE_H
  112 +#endif // ANDROID_SF_ISURFACE_H
21 include/ui/ISurfaceComposer.h → include/surfaceflinger/ISurfaceComposer.h
@@ -14,25 +14,24 @@
14 14 * limitations under the License.
15 15 */
16 16
17   -#ifndef ANDROID_ISURFACE_COMPOSER_H
18   -#define ANDROID_ISURFACE_COMPOSER_H
  17 +#ifndef ANDROID_SF_ISURFACE_COMPOSER_H
  18 +#define ANDROID_SF_ISURFACE_COMPOSER_H
19 19
20 20 #include <stdint.h>
21 21 #include <sys/types.h>
22 22
23 23 #include <utils/RefBase.h>
24 24 #include <utils/Errors.h>
  25 +
25 26 #include <binder/IInterface.h>
26 27
27 28 #include <ui/PixelFormat.h>
28   -#include <ui/ISurfaceFlingerClient.h>
29 29
30   -namespace android {
  30 +#include <surfaceflinger/ISurfaceFlingerClient.h>
31 31
  32 +namespace android {
32 33 // ----------------------------------------------------------------------------
33 34
34   -class DisplayInfo;
35   -
36 35 class ISurfaceComposer : public IInterface
37 36 {
38 37 public:
@@ -92,19 +91,19 @@ class ISurfaceComposer : public IInterface
92 91 /* retrieve the control block */
93 92 virtual sp<IMemoryHeap> getCblk() const = 0;
94 93
95   - /* open/close transactions. recquires ACCESS_SURFACE_FLINGER permission */
  94 + /* open/close transactions. requires ACCESS_SURFACE_FLINGER permission */
96 95 virtual void openGlobalTransaction() = 0;
97 96 virtual void closeGlobalTransaction() = 0;
98 97
99   - /* [un]freeze display. recquires ACCESS_SURFACE_FLINGER permission */
  98 + /* [un]freeze display. requires ACCESS_SURFACE_FLINGER permission */
100 99 virtual status_t freezeDisplay(DisplayID dpy, uint32_t flags) = 0;
101 100 virtual status_t unfreezeDisplay(DisplayID dpy, uint32_t flags) = 0;
102 101
103   - /* Set display orientation. recquires ACCESS_SURFACE_FLINGER permission */
  102 + /* Set display orientation. requires ACCESS_SURFACE_FLINGER permission */
104 103 virtual int setOrientation(DisplayID dpy, int orientation, uint32_t flags) = 0;
105 104
106 105 /* signal that we're done booting.
107   - * recquires ACCESS_SURFACE_FLINGER permission
  106 + * Requires ACCESS_SURFACE_FLINGER permission
108 107 */
109 108 virtual void bootFinished() = 0;
110 109
@@ -143,4 +142,4 @@ class BnSurfaceComposer : public BnInterface<ISurfaceComposer>
143 142
144 143 }; // namespace android
145 144
146   -#endif // ANDROID_ISURFACE_COMPOSER_H
  145 +#endif // ANDROID_SF_ISURFACE_COMPOSER_H
16 include/ui/ISurfaceFlingerClient.h → include/surfaceflinger/ISurfaceFlingerClient.h
@@ -14,28 +14,26 @@
14 14 * limitations under the License.
15 15 */
16 16
17   -#ifndef ANDROID_ISURFACE_FLINGER_CLIENT_H
18   -#define ANDROID_ISURFACE_FLINGER_CLIENT_H
  17 +#ifndef ANDROID_SF_ISURFACE_FLINGER_CLIENT_H
  18 +#define ANDROID_SF_ISURFACE_FLINGER_CLIENT_H
19 19
20 20 #include <stdint.h>
21 21 #include <sys/types.h>
22 22
23 23 #include <utils/Errors.h>
24   -#include <binder/IInterface.h>
25 24 #include <utils/RefBase.h>
26 25
27   -#include <ui/ISurface.h>
  26 +#include <binder/IInterface.h>
28 27
29 28 #include <ui/PixelFormat.h>
30 29
  30 +#include <surfaceflinger/ISurface.h>
  31 +
31 32 namespace android {
32 33
33 34 // ----------------------------------------------------------------------------
34 35
35   -class Rect;
36   -class Point;
37   -class IMemory;
38   -class ISurface;
  36 +class IMemoryHeap;
39 37
40 38 typedef int32_t ClientID;
41 39 typedef int32_t DisplayID;
@@ -89,4 +87,4 @@ class BnSurfaceFlingerClient : public BnInterface<ISurfaceFlingerClient>
89 87
90 88 }; // namespace android
91 89
92   -#endif // ANDROID_ISURFACE_FLINGER_CLIENT_H
  90 +#endif // ANDROID_SF_ISURFACE_FLINGER_CLIENT_H
12 include/ui/Surface.h → include/surfaceflinger/Surface.h
@@ -14,8 +14,8 @@
14 14 * limitations under the License.
15 15 */
16 16
17   -#ifndef ANDROID_UI_SURFACE_H
18   -#define ANDROID_UI_SURFACE_H
  17 +#ifndef ANDROID_SF_SURFACE_H
  18 +#define ANDROID_SF_SURFACE_H
19 19
20 20 #include <stdint.h>
21 21 #include <sys/types.h>
@@ -23,13 +23,13 @@
23 23 #include <utils/RefBase.h>
24 24 #include <utils/threads.h>
25 25
26   -#include <ui/ISurface.h>
27 26 #include <ui/PixelFormat.h>
28 27 #include <ui/Region.h>
29   -#include <ui/ISurfaceFlingerClient.h>
30   -
31 28 #include <ui/egl/android_natives.h>
32 29
  30 +#include <surfaceflinger/ISurface.h>
  31 +#include <surfaceflinger/ISurfaceFlingerClient.h>
  32 +
33 33 namespace android {
34 34
35 35 // ---------------------------------------------------------------------------
@@ -250,5 +250,5 @@ class Surface
250 250
251 251 }; // namespace android
252 252
253   -#endif // ANDROID_UI_SURFACE_H
  253 +#endif // ANDROID_SF_SURFACE_H
254 254
13 include/ui/SurfaceComposerClient.h → include/surfaceflinger/SurfaceComposerClient.h
@@ -14,8 +14,8 @@
14 14 * limitations under the License.
15 15 */
16 16
17   -#ifndef ANDROID_SURFACE_COMPOSER_CLIENT_H
18   -#define ANDROID_SURFACE_COMPOSER_CLIENT_H
  17 +#ifndef ANDROID_SF_SURFACE_COMPOSER_CLIENT_H
  18 +#define ANDROID_SF_SURFACE_COMPOSER_CLIENT_H
19 19
20 20 #include <stdint.h>
21 21 #include <sys/types.h>
@@ -27,17 +27,18 @@
27 27 #include <utils/threads.h>
28 28
29 29 #include <ui/PixelFormat.h>
30   -#include <ui/ISurfaceComposer.h>
31 30 #include <ui/Region.h>
32   -#include <ui/Surface.h>
  31 +
  32 +#include <surfaceflinger/Surface.h>
33 33
34 34 namespace android {
35 35
36 36 // ---------------------------------------------------------------------------
37 37
38 38 class Region;
39   -class SurfaceFlingerSynchro;
40 39 class SharedClient;
  40 +class ISurfaceComposer;
  41 +class DisplayInfo;
41 42
42 43 class SurfaceComposerClient : virtual public RefBase
43 44 {
@@ -158,5 +159,5 @@ class SurfaceComposerClient : virtual public RefBase
158 159
159 160 }; // namespace android
160 161
161   -#endif // ANDROID_SURFACE_COMPOSER_CLIENT_H
  162 +#endif // ANDROID_SF_SURFACE_COMPOSER_CLIENT_H
162 163
25 libs/camera/Android.mk
... ... @@ -0,0 +1,25 @@
  1 +LOCAL_PATH:= $(call my-dir)
  2 +include $(CLEAR_VARS)
  3 +
  4 +LOCAL_SRC_FILES:= \
  5 + Camera.cpp \
  6 + CameraParameters.cpp \
  7 + ICamera.cpp \
  8 + ICameraClient.cpp \
  9 + ICameraService.cpp
  10 +
  11 +LOCAL_SHARED_LIBRARIES := \
  12 + libcutils \
  13 + libutils \
  14 + libbinder \
  15 + libhardware \
  16 + libsurfaceflinger_client \
  17 + libui
  18 +
  19 +LOCAL_MODULE:= libcamera_client
  20 +
  21 +ifeq ($(TARGET_SIMULATOR),true)
  22 + LOCAL_LDLIBS += -lpthread
  23 +endif
  24 +
  25 +include $(BUILD_SHARED_LIBRARY)
11 libs/ui/Camera.cpp → libs/camera/Camera.cpp
@@ -19,12 +19,15 @@
19 19 //#define LOG_NDEBUG 0
20 20 #define LOG_TAG "Camera"
21 21 #include <utils/Log.h>
22   -#include <binder/IServiceManager.h>
23 22 #include <utils/threads.h>
  23 +
  24 +#include <binder/IServiceManager.h>
24 25 #include <binder/IMemory.h>
25   -#include <ui/Surface.h>
26   -#include <ui/Camera.h>
27   -#include <ui/ICameraService.h>
  26 +
  27 +#include <camera/Camera.h>
  28 +#include <camera/ICameraService.h>
  29 +
  30 +#include <surfaceflinger/Surface.h>
28 31
29 32 namespace android {
30 33
2  libs/ui/CameraParameters.cpp → libs/camera/CameraParameters.cpp
@@ -20,7 +20,7 @@
20 20
21 21 #include <string.h>
22 22 #include <stdlib.h>
23   -#include <ui/CameraParameters.h>
  23 +#include <camera/CameraParameters.h>
24 24
25 25 namespace android {
26 26 // Parameter keys to communicate between camera application and driver.
2  libs/ui/ICamera.cpp → libs/camera/ICamera.cpp
@@ -21,7 +21,7 @@
21 21 #include <stdint.h>
22 22 #include <sys/types.h>
23 23 #include <binder/Parcel.h>
24   -#include <ui/ICamera.h>
  24 +#include <camera/ICamera.h>
25 25
26 26 namespace android {
27 27
2  libs/ui/ICameraClient.cpp → libs/camera/ICameraClient.cpp
@@ -20,7 +20,7 @@
20 20 #include <utils/Log.h>
21 21 #include <stdint.h>
22 22 #include <sys/types.h>
23   -#include <ui/ICameraClient.h>
  23 +#include <camera/ICameraClient.h>
24 24
25 25 namespace android {
26 26
2  libs/ui/ICameraService.cpp → libs/camera/ICameraService.cpp
@@ -22,7 +22,7 @@
22 22 #include <binder/IPCThreadState.h>
23 23 #include <binder/IServiceManager.h>
24 24
25   -#include <ui/ICameraService.h>
  25 +#include <camera/ICameraService.h>
26 26
27 27 namespace android {
28 28
1  libs/rs/rsContext.cpp
@@ -19,6 +19,7 @@
19 19 #include "rsThreadIO.h"
20 20 #include <ui/FramebufferNativeWindow.h>
21 21 #include <ui/EGLUtils.h>
  22 +#include <surfaceflinger/Surface.h>
22 23
23 24 #include <sys/types.h>
24 25 #include <sys/resource.h>
5 libs/rs/rsContext.h
@@ -19,8 +19,6 @@
19 19
20 20 #include "rsUtils.h"
21 21
22   -#include <ui/Surface.h>
23   -
24 22 #include "rsThreadIO.h"
25 23 #include "rsType.h"
26 24 #include "rsMatrix.h"
@@ -46,6 +44,9 @@
46 44
47 45 // ---------------------------------------------------------------------------
48 46 namespace android {
  47 +
  48 +class Surface;
  49 +
49 50 namespace renderscript {
50 51
51 52 class Context
3  libs/surfaceflinger/Android.mk
@@ -39,7 +39,8 @@ LOCAL_SHARED_LIBRARIES := \
39 39 libEGL \
40 40 libGLESv1_CM \
41 41 libbinder \
42   - libui
  42 + libui \
  43 + libsurfaceflinger_client
43 44
44 45 LOCAL_C_INCLUDES := \
45 46 $(call include-path-for, corecg graphics)
3  libs/surfaceflinger/Layer.cpp
@@ -27,7 +27,8 @@
27 27
28 28 #include <ui/GraphicBuffer.h>
29 29 #include <ui/PixelFormat.h>
30   -#include <ui/Surface.h>
  30 +
  31 +#include <surfaceflinger/Surface.h>
31 32
32 33 #include "clz.h"
33 34 #include "Layer.h"
7 libs/surfaceflinger/LayerBase.h
@@ -23,14 +23,15 @@
23 23 #include <EGL/egl.h>
24 24 #include <EGL/eglext.h>
25 25
26   -#include <private/ui/SharedBufferStack.h>
27   -#include <private/ui/LayerState.h>
28   -
29 26 #include <utils/RefBase.h>
30 27
31 28 #include <ui/Region.h>
32 29 #include <ui/Overlay.h>
33 30
  31 +#include <surfaceflinger/ISurfaceFlingerClient.h>
  32 +#include <private/surfaceflinger/SharedBufferStack.h>
  33 +#include <private/surfaceflinger/LayerState.h>
  34 +
34 35 #include <pixelflinger/pixelflinger.h>
35 36
36 37 #include "Transform.h"
2  libs/surfaceflinger/LayerBlur.h
@@ -20,8 +20,6 @@
20 20 #include <stdint.h>
21 21 #include <sys/types.h>
22 22
23   -#include <private/ui/LayerState.h>
24   -
25 23 #include <ui/Region.h>
26 24
27 25 #include "LayerBase.h"
7 libs/surfaceflinger/SurfaceFlinger.h
@@ -31,11 +31,8 @@
31 31 #include <binder/Permission.h>
32 32
33 33 #include <ui/PixelFormat.h>
34   -#include <ui/ISurfaceComposer.h>
35   -#include <ui/ISurfaceFlingerClient.h>
36   -
37   -#include <private/ui/SharedBufferStack.h>
38   -#include <private/ui/LayerState.h>
  34 +#include <surfaceflinger/ISurfaceComposer.h>
  35 +#include <surfaceflinger/ISurfaceFlingerClient.h>
39 36
40 37 #include "Barrier.h"
41 38 #include "Layer.h"
3  libs/surfaceflinger/tests/overlays/Android.mk
@@ -7,7 +7,8 @@ LOCAL_SRC_FILES:= \
7 7 LOCAL_SHARED_LIBRARIES := \
8 8 libcutils \
9 9 libutils \
10   - libui
  10 + libui \
  11 + libsurfaceflinger_client
11 12
12 13 LOCAL_MODULE:= test-overlays
13 14
7 libs/surfaceflinger/tests/overlays/overlays.cpp
@@ -3,10 +3,11 @@
3 3 #include <binder/IServiceManager.h>
4 4 #include <utils/Log.h>
5 5
6   -#include <ui/Surface.h>
7   -#include <ui/ISurface.h>
8 6 #include <ui/Overlay.h>
9   -#include <ui/SurfaceComposerClient.h>
  7 +
  8 +#include <surfaceflinger/Surface.h>
  9 +#include <surfaceflinger/ISurface.h>
  10 +#include <surfaceflinger/SurfaceComposerClient.h>
10 11
11 12 using namespace android;
12 13
3  libs/surfaceflinger/tests/resize/Android.mk
@@ -7,7 +7,8 @@ LOCAL_SRC_FILES:= \
7 7 LOCAL_SHARED_LIBRARIES := \
8 8 libcutils \
9 9 libutils \
10   - libui
  10 + libui \
  11 + libsurfaceflinger_client
11 12
12 13 LOCAL_MODULE:= test-resize
13 14
14 libs/surfaceflinger/tests/resize/resize.cpp
... ... @@ -1,14 +1,16 @@
1 1 #include <cutils/memory.h>
2 2
3   -#include <utils/IPCThreadState.h>
4   -#include <utils/ProcessState.h>
5   -#include <utils/IServiceManager.h>
6 3 #include <utils/Log.h>
7 4
8   -#include <ui/Surface.h>
9   -#include <ui/ISurface.h>
  5 +#include <binder/IPCThreadState.h>
  6 +#include <binder/ProcessState.h>
  7 +#include <binder/IServiceManager.h>
  8 +
  9 +#include <surfaceflinger/Surface.h>
  10 +#include <surfaceflinger/ISurface.h>
  11 +#include <surfaceflinger/SurfaceComposerClient.h>
  12 +
10 13 #include <ui/Overlay.h>
11   -#include <ui/SurfaceComposerClient.h>
12 14
13 15 using namespace android;
14 16
26 libs/surfaceflinger_client/Android.mk
... ... @@ -0,0 +1,26 @@
  1 +LOCAL_PATH:= $(call my-dir)
  2 +include $(CLEAR_VARS)
  3 +
  4 +LOCAL_SRC_FILES:= \
  5 + ISurfaceComposer.cpp \
  6 + ISurface.cpp \
  7 + ISurfaceFlingerClient.cpp \
  8 + LayerState.cpp \
  9 + SharedBufferStack.cpp \
  10 + Surface.cpp \
  11 + SurfaceComposerClient.cpp
  12 +
  13 +LOCAL_SHARED_LIBRARIES := \
  14 + libcutils \
  15 + libutils \
  16 + libbinder \
  17 + libhardware \
  18 + libui
  19 +
  20 +LOCAL_MODULE:= libsurfaceflinger_client
  21 +
  22 +ifeq ($(TARGET_SIMULATOR),true)
  23 + LOCAL_LDLIBS += -lpthread
  24 +endif
  25 +
  26 +include $(BUILD_SHARED_LIBRARY)
6 libs/ui/ISurface.cpp → libs/surfaceflinger_client/ISurface.cpp
@@ -23,12 +23,12 @@
23 23 #include <binder/Parcel.h>
24 24 #include <binder/IMemory.h>
25 25
26   -#include <ui/ISurface.h>
27 26 #include <ui/Overlay.h>
28   -#include <ui/Surface.h>
29   -
30 27 #include <ui/GraphicBuffer.h>
31 28
  29 +#include <surfaceflinger/Surface.h>
  30 +#include <surfaceflinger/ISurface.h>
  31 +
32 32 namespace android {
33 33
34 34 // ----------------------------------------------------------------------
3  libs/ui/ISurfaceComposer.cpp → libs/surfaceflinger_client/ISurfaceComposer.cpp
@@ -25,9 +25,10 @@
25 25 #include <binder/IPCThreadState.h>
26 26 #include <binder/IServiceManager.h>
27 27
28   -#include <ui/ISurfaceComposer.h>
29 28 #include <ui/DisplayInfo.h>
30 29
  30 +#include <surfaceflinger/ISurfaceComposer.h>
  31 +
31 32 // ---------------------------------------------------------------------------
32 33
33 34 #define LIKELY( exp ) (__builtin_expect( (exp) != 0, true ))
6 libs/ui/ISurfaceFlingerClient.cpp → libs/surfaceflinger_client/ISurfaceFlingerClient.cpp
@@ -26,12 +26,12 @@
26 26 #include <binder/IPCThreadState.h>
27 27 #include <binder/IServiceManager.h>
28 28
29   -#include <ui/ISurface.h>
30   -#include <ui/ISurfaceFlingerClient.h>
31 29 #include <ui/Point.h>
32 30 #include <ui/Rect.h>
33 31
34   -#include <private/ui/LayerState.h>
  32 +#include <surfaceflinger/ISurface.h>
  33 +#include <surfaceflinger/ISurfaceFlingerClient.h>
  34 +#include <private/surfaceflinger/LayerState.h>
35 35
36 36 // ---------------------------------------------------------------------------
37 37
14 libs/ui/LayerState.cpp → libs/surfaceflinger_client/LayerState.cpp
@@ -16,37 +16,25 @@
16 16
17 17 #include <utils/Errors.h>
18 18 #include <binder/Parcel.h>
19   -#include <private/ui/LayerState.h>
  19 +#include <private/surfaceflinger/LayerState.h>
20 20
21 21 namespace android {
22 22
23 23 status_t layer_state_t::write(Parcel& output) const
24 24 {
25 25 size_t size = sizeof(layer_state_t);
26   -
27   - //output.writeStrongBinder(surface->asBinder());
28   - //size -= sizeof(surface);
29   -
30 26 transparentRegion.write(output);
31 27 size -= sizeof(transparentRegion);
32   -
33 28 output.write(this, size);
34   -
35 29 return NO_ERROR;
36 30 }
37 31
38 32 status_t layer_state_t::read(const Parcel& input)
39 33 {
40 34 size_t size = sizeof(layer_state_t);
41   -
42   - //surface = interface_cast<ISurface>(input.readStrongBinder());
43   - //size -= sizeof(surface);
44   -
45 35 transparentRegion.read(input);
46 36 size -= sizeof(transparentRegion);
47   -
48 37 input.read(this, size);
49   -
50 38 return NO_ERROR;
51 39 }
52 40
2  libs/ui/SharedBufferStack.cpp → libs/surfaceflinger_client/SharedBufferStack.cpp
@@ -23,7 +23,7 @@
23 23 #include <utils/Log.h>
24 24 #include <utils/threads.h>
25 25
26   -#include <private/ui/SharedBufferStack.h>
  26 +#include <private/surfaceflinger/SharedBufferStack.h>
27 27
28 28 #include <ui/Rect.h>
29 29 #include <ui/Region.h>
17 libs/ui/Surface.cpp → libs/surfaceflinger_client/Surface.cpp
@@ -26,22 +26,25 @@
26 26 #include <utils/Errors.h>
27 27 #include <utils/threads.h>
28 28 #include <utils/CallStack.h>
  29 +#include <utils/Log.h>
  30 +
  31 +#include <pixelflinger/pixelflinger.h>
  32 +
29 33 #include <binder/IPCThreadState.h>
30 34 #include <binder/IMemory.h>
31   -#include <utils/Log.h>
32 35
33 36 #include <ui/DisplayInfo.h>
34 37 #include <ui/GraphicBuffer.h>
35 38 #include <ui/GraphicBufferMapper.h>
36   -#include <ui/ISurface.h>
37   -#include <ui/Surface.h>
38   -#include <ui/SurfaceComposerClient.h>
39 39 #include <ui/Rect.h>
40 40
41   -#include <pixelflinger/pixelflinger.h>
  41 +#include <surfaceflinger/Surface.h>
  42 +#include <surfaceflinger/ISurface.h>
  43 +#include <surfaceflinger/ISurfaceComposer.h>
  44 +#include <surfaceflinger/SurfaceComposerClient.h>
42 45
43   -#include <private/ui/SharedBufferStack.h>
44   -#include <private/ui/LayerState.h>
  46 +#include <private/surfaceflinger/SharedBufferStack.h>
  47 +#include <private/surfaceflinger/LayerState.h>
45 48
46 49 namespace android {
47 50
16 libs/ui/SurfaceComposerClient.cpp → libs/surfaceflinger_client/SurfaceComposerClient.cpp
@@ -29,19 +29,21 @@
29 29 #include <utils/Errors.h>
30 30 #include <utils/threads.h>
31 31 #include <utils/KeyedVector.h>
  32 +#include <utils/Log.h>
  33 +
32 34 #include <binder/IServiceManager.h>
33 35 #include <binder/IMemory.h>
34   -#include <utils/Log.h>
35 36
36 37 #include <ui/DisplayInfo.h>
37   -#include <ui/ISurfaceComposer.h>
38   -#include <ui/ISurfaceFlingerClient.h>
39   -#include <ui/ISurface.h>
40   -#include <ui/SurfaceComposerClient.h>
41 38 #include <ui/Rect.h>
42 39
43   -#include <private/ui/LayerState.h>
44   -#include <private/ui/SharedBufferStack.h>
  40 +#include <surfaceflinger/ISurfaceComposer.h>
  41 +#include <surfaceflinger/ISurfaceFlingerClient.h>
  42 +#include <surfaceflinger/ISurface.h>
  43 +#include <surfaceflinger/SurfaceComposerClient.h>
  44 +
  45 +#include <private/surfaceflinger/LayerState.h>
  46 +#include <private/surfaceflinger/SharedBufferStack.h>
45 47
46 48 #define VERBOSE(...) ((void)0)
47 49 //#define VERBOSE LOGD
14 libs/ui/Android.mk
@@ -2,8 +2,6 @@ LOCAL_PATH:= $(call my-dir)
2 2 include $(CLEAR_VARS)
3 3
4 4 LOCAL_SRC_FILES:= \
5   - Camera.cpp \
6   - CameraParameters.cpp \
7 5 EGLUtils.cpp \
8 6 EventHub.cpp \
9 7 EventRecurrence.cpp \
@@ -13,21 +11,11 @@ LOCAL_SRC_FILES:= \
13 11 GraphicBufferMapper.cpp \
14 12 KeyLayoutMap.cpp \
15 13 KeyCharacterMap.cpp \
16   - ICamera.cpp \
17   - ICameraClient.cpp \
18   - ICameraService.cpp \
19 14 IOverlay.cpp \
20   - ISurfaceComposer.cpp \