From 2adaf04fab35cf47c824d74d901b54094e01ccd3 Mon Sep 17 00:00:00 2001 From: Andy McFadden Date: Tue, 18 Dec 2012 09:49:45 -0800 Subject: Rename ISurfaceTexture and SurfaceTexture The C++ class names don't match what the classes do, so rename ISurfaceTexture to IGraphicBufferProducer, and SurfaceTexture to GLConsumer. Bug 7736700 Change-Id: Ia03e468888025b5cae3c0ee1995434515dbea387 --- include/gui/SurfaceTextureClient.h | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'include/gui/SurfaceTextureClient.h') diff --git a/include/gui/SurfaceTextureClient.h b/include/gui/SurfaceTextureClient.h index a582975e1c..bce2329878 100644 --- a/include/gui/SurfaceTextureClient.h +++ b/include/gui/SurfaceTextureClient.h @@ -17,8 +17,8 @@ #ifndef ANDROID_GUI_SURFACETEXTURECLIENT_H #define ANDROID_GUI_SURFACETEXTURECLIENT_H -#include -#include +#include +#include #include #include @@ -44,7 +44,7 @@ class Surface; * compositing. For example, a video decoder could render a frame and call * eglSwapBuffers(), which invokes ANativeWindow callbacks defined by * SurfaceTextureClient. STC then acts as the BufferQueue producer, - * providing the new frame to a consumer such as SurfaceTexture. + * providing the new frame to a consumer such as GLConsumer. * * TODO: rename to Surface. The existing Surface class wraps STC with * some Binder goodies, which most users of Surface class don't care about. @@ -54,14 +54,14 @@ class SurfaceTextureClient { public: - SurfaceTextureClient(const sp& surfaceTexture); + SurfaceTextureClient(const sp& bufferProducer); - sp getISurfaceTexture() const; + sp getISurfaceTexture() const; // TODO: rename protected: SurfaceTextureClient(); virtual ~SurfaceTextureClient(); - void setISurfaceTexture(const sp& surfaceTexture); + void setISurfaceTexture(const sp& bufferProducer); private: // can't be copied @@ -144,11 +144,12 @@ private: // mSurfaceTexture is the interface to the surface texture server. All // operations on the surface texture client ultimately translate into // interactions with the server using this interface. - sp mSurfaceTexture; + // TODO: rename to mBufferProducer + sp mSurfaceTexture; // mSlots stores the buffers that have been allocated for each buffer slot. // It is initialized to null pointers, and gets filled in with the result of - // ISurfaceTexture::requestBuffer when the client dequeues a buffer from a + // IGraphicBufferProducer::requestBuffer when the client dequeues a buffer from a // slot that has not yet been used. The buffer allocated to a slot will also // be replaced if the requested buffer usage or geometry differs from that // of the buffer allocated to a slot. @@ -214,7 +215,7 @@ private: mutable bool mConsumerRunningBehind; // mMutex is the mutex used to prevent concurrent access to the member - // variables of SurfaceTexture objects. It must be locked whenever the + // variables of SurfaceTextureClient objects. It must be locked whenever the // member variables are accessed. mutable Mutex mMutex; -- cgit v1.2.3-59-g8ed1b