clean-up. get rid ofunused code and members in Surface[Control].cpp
Change-Id: Ia7790ae28af2c2ac99eae01c2c5044ace4a490a4
diff --git a/include/gui/ISurfaceTexture.h b/include/gui/ISurfaceTexture.h
index e764425..bc630ae 100644
--- a/include/gui/ISurfaceTexture.h
+++ b/include/gui/ISurfaceTexture.h
@@ -79,8 +79,8 @@
// 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 6e9a654..02cabc1 100644
--- a/include/surfaceflinger/ISurfaceComposerClient.h
+++ b/include/surfaceflinger/ISurfaceComposerClient.h
@@ -45,9 +45,6 @@
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 c2a494d..9c352ad 100644
--- a/include/surfaceflinger/Surface.h
+++ b/include/surfaceflinger/Surface.h
@@ -57,7 +57,6 @@
static bool isSameSurface(
const sp<SurfaceControl>& lhs, const sp<SurfaceControl>& rhs);
- uint32_t getFlags() const { return mFlags; }
uint32_t getIdentity() const { return mIdentity; }
// release surface data from java
@@ -86,25 +85,13 @@
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<SurfaceComposerClient>& client,
const sp<ISurface>& 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 @@
sp<ISurface> mSurface;
SurfaceID mToken;
uint32_t mIdentity;
- uint32_t mWidth;
- uint32_t mHeight;
- PixelFormat mFormat;
- uint32_t mFlags;
mutable Mutex mLock;
mutable sp<Surface> mSurfaceData;
@@ -139,17 +122,13 @@
uint32_t reserved[2];
};
- static status_t writeToParcel(
- const sp<Surface>& control, Parcel* parcel);
-
+ static status_t writeToParcel(const sp<Surface>& control, Parcel* parcel);
static sp<Surface> readFromParcel(const Parcel& data);
-
static bool isValid(const sp<Surface>& surface) {
return (surface != 0) && surface->isValid();
}
bool isValid();
- uint32_t getFlags() const { return mFlags; }
uint32_t getIdentity() const { return mIdentity; }
sp<ISurfaceTexture> getSurfaceTexture();
@@ -176,22 +155,14 @@
* 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<ISurface> 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;