Skip to content

Commit feb158b

Browse files
Jamie GennisAndroid (Google) Code Review
authored andcommitted
Merge changes Ib302d79e,Ib4ee085f
* changes: SurfaceFlinger: set layer names on SurfaceTextures SurfaceTexture: add name support
2 parents ab7ed38 + 5b315da commit feb158b

File tree

5 files changed

+102
-62
lines changed

5 files changed

+102
-62
lines changed

include/gui/SurfaceTexture.h

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,9 @@
2525

2626
#include <ui/GraphicBuffer.h>
2727

28-
#include <utils/threads.h>
28+
#include <utils/String8.h>
2929
#include <utils/Vector.h>
30+
#include <utils/threads.h>
3031

3132
#define ANDROID_GRAPHICS_SURFACETEXTURE_JNI_ID "mSurfaceTexture"
3233

@@ -202,6 +203,10 @@ class SurfaceTexture : public BnSurfaceTexture {
202203
// by OpenGL ES as a texture) then those buffer will remain allocated.
203204
void abandon();
204205

206+
// set the name of the SurfaceTexture that will be used to identify it in
207+
// log messages.
208+
void setName(const String8& name);
209+
205210
// dump our state in a String
206211
void dump(String8& result) const;
207212
void dump(String8& result, const char* prefix, char* buffer, size_t SIZE) const;
@@ -444,6 +449,10 @@ class SurfaceTexture : public BnSurfaceTexture {
444449
// all ISurfaceTexture methods capable of returning an error.
445450
bool mAbandoned;
446451

452+
// mName is a string used to identify the SurfaceTexture in log messages.
453+
// It is set by the setName method.
454+
String8 mName;
455+
447456
// mMutex is the mutex used to prevent concurrent access to the member
448457
// variables of SurfaceTexture objects. It must be locked whenever the
449458
// member variables are accessed.

0 commit comments

Comments
 (0)