SurfaceFlinger: set layer names on SurfaceTextures

This change sets the SurfaceTexture name string to match that of the
layer to which it belongs.

Change-Id: Ib302d79e916a36ab1e54cb9ff477c3b857bd957b
This commit is contained in:
Jamie Gennis
2011-09-16 17:31:54 -07:00
parent 44a052203e
commit 5b315da4e8
3 changed files with 7 additions and 1 deletions

View File

@@ -112,6 +112,11 @@ void Layer::onRemoved()
mSurfaceTexture->abandon();
}
void Layer::setName(const String8& name) {
LayerBase::setName(name);
mSurfaceTexture->setName(name);
}
sp<ISurface> Layer::createSurface()
{
class BSurface : public BnSurface, public LayerCleaner {

View File

@@ -74,6 +74,7 @@ public:
virtual bool isProtected() const;
virtual void onRemoved();
virtual sp<Layer> getLayer() const { return const_cast<Layer*>(this); }
virtual void setName(const String8& name);
// LayerBaseClient interface
virtual wp<IBinder> getSurfaceTextureBinder() const;

View File

@@ -81,7 +81,7 @@ public:
Region transparentRegion;
};
void setName(const String8& name);
virtual void setName(const String8& name);
String8 getName() const;
// modify current state