unify SurfaceTexture and Surface
Change-Id: I49da2f5d8408e4cd7e148cfb777bb4ff68cd8f37
diff --git a/include/gui/ISurfaceTexture.h b/include/gui/ISurfaceTexture.h
index 2398e0e..99aa1ad 100644
--- a/include/gui/ISurfaceTexture.h
+++ b/include/gui/ISurfaceTexture.h
@@ -31,11 +31,16 @@
namespace android {
// ----------------------------------------------------------------------------
+class SurfaceTextureClient;
+
class ISurfaceTexture : public IInterface
{
public:
DECLARE_META_INTERFACE(SurfaceTexture);
+protected:
+ friend class SurfaceTextureClient;
+
enum { BUFFER_NEEDS_REALLOCATION = 1 };
// requestBuffer requests a new buffer for the given index. The server (i.e.
@@ -85,6 +90,10 @@
// Holding this binder reference prevents SurfaceFlinger from freeing the
// buffers before the client is done with them.
virtual sp<IBinder> getAllocator() = 0;
+
+ // query retrieves some information for this surface
+ // 'what' tokens allowed are that of android_natives.h
+ virtual int query(int what, int* value) = 0;
};
// ----------------------------------------------------------------------------
diff --git a/include/gui/SurfaceTexture.h b/include/gui/SurfaceTexture.h
index 2a13e3f..152e9bf 100644
--- a/include/gui/SurfaceTexture.h
+++ b/include/gui/SurfaceTexture.h
@@ -76,6 +76,8 @@
virtual status_t setCrop(const Rect& reg);
virtual status_t setTransform(uint32_t transform);
+ virtual int query(int what, int* value);
+
// updateTexImage sets the image contents of the target texture to that of
// the most recently queued buffer.
//