summaryrefslogtreecommitdiffstats
path: root/include/surfaceflinger
diff options
context:
space:
mode:
authorTed Bonkenburg <tedbo@google.com>2011-07-15 15:10:10 -0700
committerTed Bonkenburg <tedbo@google.com>2011-07-22 16:36:44 -0700
commit0de171b0d490a5928d54d2fb67c912d140aac643 (patch)
treeabba5dd93cbdc076224ea3da2a92254c553a8112 /include/surfaceflinger
parent7699c18a079d232280c2701fb20d36f75d379e03 (diff)
downloadframeworks_base-0de171b0d490a5928d54d2fb67c912d140aac643.zip
frameworks_base-0de171b0d490a5928d54d2fb67c912d140aac643.tar.gz
frameworks_base-0de171b0d490a5928d54d2fb67c912d140aac643.tar.bz2
Add support for creating a Surface from a a SurfaceTexture.
The Surface is already using SurfaceTexture internally and it is parcelable. This is intended to replace and phase out ParcelSurfaceTexture in favor of creating a new Surface.java object from an existing SurfaceTexture. Change-Id: I8e2dd86614523da6abed6403e1d705a68fa19fdf
Diffstat (limited to 'include/surfaceflinger')
-rw-r--r--include/surfaceflinger/Surface.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/include/surfaceflinger/Surface.h b/include/surfaceflinger/Surface.h
index 9c352ad..0460bbd 100644
--- a/include/surfaceflinger/Surface.h
+++ b/include/surfaceflinger/Surface.h
@@ -122,7 +122,10 @@ public:
uint32_t reserved[2];
};
+ explicit Surface(const sp<ISurfaceTexture>& st);
+
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();
@@ -147,14 +150,14 @@ private:
Surface& operator = (Surface& rhs);
Surface(const Surface& rhs);
- Surface(const sp<SurfaceControl>& control);
+ explicit Surface(const sp<SurfaceControl>& control);
Surface(const Parcel& data, const sp<IBinder>& ref);
~Surface();
/*
* private stuff...
*/
- void init();
+ void init(const sp<ISurfaceTexture>& surfaceTexture);
static void cleanCachedSurfacesLocked();