diff options
Diffstat (limited to 'include/surfaceflinger/SurfaceComposerClient.h')
-rw-r--r-- | include/surfaceflinger/SurfaceComposerClient.h | 38 |
1 files changed, 18 insertions, 20 deletions
diff --git a/include/surfaceflinger/SurfaceComposerClient.h b/include/surfaceflinger/SurfaceComposerClient.h index 8e28a81..8773d71 100644 --- a/include/surfaceflinger/SurfaceComposerClient.h +++ b/include/surfaceflinger/SurfaceComposerClient.h @@ -22,8 +22,9 @@ #include <binder/IBinder.h> -#include <utils/SortedVector.h> #include <utils/RefBase.h> +#include <utils/Singleton.h> +#include <utils/SortedVector.h> #include <utils/threads.h> #include <ui/PixelFormat.h> @@ -39,6 +40,22 @@ class Region; class SharedClient; class ISurfaceComposer; class DisplayInfo; +class surface_flinger_cblk_t; + +// --------------------------------------------------------------------------- + +class ComposerService : public Singleton<ComposerService> +{ + // these are constants + sp<ISurfaceComposer> mComposerService; + sp<IMemoryHeap> mServerCblkMemory; + surface_flinger_cblk_t volatile* mServerCblk; + ComposerService(); + friend class Singleton<ComposerService>; +public: + static sp<ISurfaceComposer> getComposerService(); + static surface_flinger_cblk_t const volatile * getControlBlock(); +}; // --------------------------------------------------------------------------- @@ -153,25 +170,6 @@ private: }; // --------------------------------------------------------------------------- - -class SurfaceClient : public RefBase -{ - // all these attributes are constants - status_t mStatus; - SharedClient* mControl; - sp<IMemoryHeap> mControlMemory; - sp<IBinder> mConnection; - sp<ISurfaceComposer> mComposerService; - void init(const sp<IBinder>& conn); -public: - explicit SurfaceClient(const sp<IBinder>& conn); - explicit SurfaceClient(const sp<SurfaceComposerClient>& client); - status_t initCheck() const; - SharedClient* getSharedClient() const; - void signalServer() const; -}; - -// --------------------------------------------------------------------------- }; // namespace android #endif // ANDROID_SF_SURFACE_COMPOSER_CLIENT_H |