diff options
| author | 2011-09-27 14:24:09 -0700 | |
|---|---|---|
| committer | 2011-09-27 14:24:09 -0700 | |
| commit | feb158b3cbd0dada89b0437c3e09699ba3f982de (patch) | |
| tree | a610312c9d024fe83a910ea4d7964e5af74812c5 /include/gui/SurfaceTexture.h | |
| parent | ab7ed38d5fea82db64eb90bad9d4c646d61d15df (diff) | |
| parent | 5b315da4e8a3746376af480c8fe01f98cbc34b33 (diff) | |
Merge changes Ib302d79e,Ib4ee085f
* changes:
SurfaceFlinger: set layer names on SurfaceTextures
SurfaceTexture: add name support
Diffstat (limited to 'include/gui/SurfaceTexture.h')
| -rw-r--r-- | include/gui/SurfaceTexture.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/include/gui/SurfaceTexture.h b/include/gui/SurfaceTexture.h index 493993d6d983..926eb9a82c17 100644 --- a/include/gui/SurfaceTexture.h +++ b/include/gui/SurfaceTexture.h @@ -25,8 +25,9 @@ #include <ui/GraphicBuffer.h> -#include <utils/threads.h> +#include <utils/String8.h> #include <utils/Vector.h> +#include <utils/threads.h> #define ANDROID_GRAPHICS_SURFACETEXTURE_JNI_ID "mSurfaceTexture" @@ -202,6 +203,10 @@ public: // by OpenGL ES as a texture) then those buffer will remain allocated. void abandon(); + // set the name of the SurfaceTexture that will be used to identify it in + // log messages. + void setName(const String8& name); + // dump our state in a String void dump(String8& result) const; void dump(String8& result, const char* prefix, char* buffer, size_t SIZE) const; @@ -444,6 +449,10 @@ private: // all ISurfaceTexture methods capable of returning an error. bool mAbandoned; + // mName is a string used to identify the SurfaceTexture in log messages. + // It is set by the setName method. + String8 mName; + // mMutex is the mutex used to prevent concurrent access to the member // variables of SurfaceTexture objects. It must be locked whenever the // member variables are accessed. |