From 50c24a2000c785f8be2367e1fc7938a5eda5c9e8 Mon Sep 17 00:00:00 2001 From: Mathias Agopian Date: Wed, 20 Jul 2011 16:46:11 -0700 Subject: clean-up. get rid ofunused code and members in Surface[Control].cpp Change-Id: Ia7790ae28af2c2ac99eae01c2c5044ace4a490a4 --- include/gui/ISurfaceTexture.h | 4 +-- include/surfaceflinger/ISurfaceComposerClient.h | 3 --- include/surfaceflinger/Surface.h | 33 ++----------------------- 3 files changed, 4 insertions(+), 36 deletions(-) (limited to 'include') diff --git a/include/gui/ISurfaceTexture.h b/include/gui/ISurfaceTexture.h index e76442549839..bc630ae4ee57 100644 --- a/include/gui/ISurfaceTexture.h +++ b/include/gui/ISurfaceTexture.h @@ -79,8 +79,8 @@ protected: // must be monotonically increasing. Its other properties (zero point, etc) // are client-dependent, and should be documented by the client. // - // outWidth, outHeight and outTransform are filed with the default width - // default height of the window and current transform applied to buffers, + // outWidth, outHeight and outTransform are filled with the default width + // and height of the window and current transform applied to buffers, // respectively. virtual status_t queueBuffer(int slot, int64_t timestamp, uint32_t* outWidth, uint32_t* outHeight, uint32_t* outTransform) = 0; diff --git a/include/surfaceflinger/ISurfaceComposerClient.h b/include/surfaceflinger/ISurfaceComposerClient.h index 6e9a654642c5..02cabc1cdc31 100644 --- a/include/surfaceflinger/ISurfaceComposerClient.h +++ b/include/surfaceflinger/ISurfaceComposerClient.h @@ -45,9 +45,6 @@ public: struct surface_data_t { int32_t token; int32_t identity; - uint32_t width; - uint32_t height; - uint32_t format; status_t readFromParcel(const Parcel& parcel); status_t writeToParcel(Parcel* parcel) const; }; diff --git a/include/surfaceflinger/Surface.h b/include/surfaceflinger/Surface.h index c2a494de41b6..9c352ad9ab53 100644 --- a/include/surfaceflinger/Surface.h +++ b/include/surfaceflinger/Surface.h @@ -57,7 +57,6 @@ public: static bool isSameSurface( const sp& lhs, const sp& rhs); - uint32_t getFlags() const { return mFlags; } uint32_t getIdentity() const { return mIdentity; } // release surface data from java @@ -86,25 +85,13 @@ private: SurfaceControl& operator = (SurfaceControl& rhs); SurfaceControl(const SurfaceControl& rhs); - friend class SurfaceComposerClient; - - // camera and camcorder need access to the ISurface binder interface for preview - friend class CameraService; - friend class MediaRecorder; - // mediaplayer needs access to ISurface for display - friend class MediaPlayer; - // for testing - friend class Test; - // videoEditor preview classes - friend class VideoEditorPreviewController; friend class Surface; SurfaceControl( const sp& client, const sp& surface, - const ISurfaceComposerClient::surface_data_t& data, - uint32_t w, uint32_t h, PixelFormat format, uint32_t flags); + const ISurfaceComposerClient::surface_data_t& data); ~SurfaceControl(); @@ -115,10 +102,6 @@ private: sp mSurface; SurfaceID mToken; uint32_t mIdentity; - uint32_t mWidth; - uint32_t mHeight; - PixelFormat mFormat; - uint32_t mFlags; mutable Mutex mLock; mutable sp mSurfaceData; @@ -139,17 +122,13 @@ public: uint32_t reserved[2]; }; - static status_t writeToParcel( - const sp& control, Parcel* parcel); - + static status_t writeToParcel(const sp& control, Parcel* parcel); static sp readFromParcel(const Parcel& data); - static bool isValid(const sp& surface) { return (surface != 0) && surface->isValid(); } bool isValid(); - uint32_t getFlags() const { return mFlags; } uint32_t getIdentity() const { return mIdentity; } sp getSurfaceTexture(); @@ -176,22 +155,14 @@ private: * private stuff... */ void init(); - status_t validate(bool inCancelBuffer = false) const; static void cleanCachedSurfacesLocked(); virtual int query(int what, int* value) const; // constants - status_t mInitCheck; sp mSurface; uint32_t mIdentity; - PixelFormat mFormat; - uint32_t mFlags; - - // query() must be called from dequeueBuffer() thread - uint32_t mWidth; - uint32_t mHeight; // A cache of Surface objects that have been deserialized into this process. static Mutex sCachedSurfacesLock; -- cgit v1.2.3-59-g8ed1b