Added some comments
Added a quick intro section at the top of the class. Also noted
the proposed new name for the class.
Change-Id: I3f79663527544aa4e910db0e5a1374b54d16ba2f
diff --git a/include/gui/SurfaceTexture.h b/include/gui/SurfaceTexture.h
index ae5d57a..50efb73 100644
--- a/include/gui/SurfaceTexture.h
+++ b/include/gui/SurfaceTexture.h
@@ -42,6 +42,21 @@
class String8;
+/*
+ * SurfaceTexture consumes buffers of graphics data from a BufferQueue,
+ * and makes them available to OpenGL as a texture.
+ *
+ * A typical usage pattern is to set up the SurfaceTexture with the
+ * desired options, and call updateTexImage() when a new frame is desired.
+ * If a new frame is available, the texture will be updated. If not,
+ * the previous contents are retained.
+ *
+ * By default, the texture is attached to the GL_TEXTURE_EXTERNAL_OES
+ * texture target, in the EGL context of the first thread that calls
+ * updateTexImage().
+ *
+ * TODO: rename to GLConsumer (OpenGLConsumer?)
+ */
class SurfaceTexture : public ConsumerBase {
public:
typedef ConsumerBase::FrameAvailableListener FrameAvailableListener;