summaryrefslogtreecommitdiffstats
path: root/include/gui
diff options
context:
space:
mode:
authorJamie Gennis <jgennis@google.com>2011-09-16 17:30:26 -0700
committerJamie Gennis <jgennis@google.com>2011-09-22 17:49:10 -0700
commit44a052203e6c1c5453a74ebe94607b5c71b136ec (patch)
tree73d2c4ce575e0d33bfeca4c626151d0ede0baaa5 /include/gui
parent5840639fd18c334c0df30ae03b270c452fee0a61 (diff)
downloadframeworks_base-44a052203e6c1c5453a74ebe94607b5c71b136ec.zip
frameworks_base-44a052203e6c1c5453a74ebe94607b5c71b136ec.tar.gz
frameworks_base-44a052203e6c1c5453a74ebe94607b5c71b136ec.tar.bz2
SurfaceTexture: add name support
This change adds support for setting a string that can be used to identify a SurfaceTexture object in log messages. Change-Id: Ib4ee085f36c8830dc964c05ef1654f5a55dfcd60
Diffstat (limited to 'include/gui')
-rw-r--r--include/gui/SurfaceTexture.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/include/gui/SurfaceTexture.h b/include/gui/SurfaceTexture.h
index 493993d..926eb9a 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.