diff options
author | Jamie Gennis <jgennis@google.com> | 2011-09-16 17:31:54 -0700 |
---|---|---|
committer | Jamie Gennis <jgennis@google.com> | 2011-09-22 17:50:05 -0700 |
commit | 5b315da4e8a3746376af480c8fe01f98cbc34b33 (patch) | |
tree | e387b99ef7b95f257c78184d4669aa99413bbe9f /services/surfaceflinger | |
parent | 44a052203e6c1c5453a74ebe94607b5c71b136ec (diff) | |
download | frameworks_base-5b315da4e8a3746376af480c8fe01f98cbc34b33.zip frameworks_base-5b315da4e8a3746376af480c8fe01f98cbc34b33.tar.gz frameworks_base-5b315da4e8a3746376af480c8fe01f98cbc34b33.tar.bz2 |
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
Diffstat (limited to 'services/surfaceflinger')
-rw-r--r-- | services/surfaceflinger/Layer.cpp | 5 | ||||
-rw-r--r-- | services/surfaceflinger/Layer.h | 1 | ||||
-rw-r--r-- | services/surfaceflinger/LayerBase.h | 2 |
3 files changed, 7 insertions, 1 deletions
diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp index f85ce7f..aa16d23 100644 --- a/services/surfaceflinger/Layer.cpp +++ b/services/surfaceflinger/Layer.cpp @@ -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 { diff --git a/services/surfaceflinger/Layer.h b/services/surfaceflinger/Layer.h index ff389ae..82e3521 100644 --- a/services/surfaceflinger/Layer.h +++ b/services/surfaceflinger/Layer.h @@ -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; diff --git a/services/surfaceflinger/LayerBase.h b/services/surfaceflinger/LayerBase.h index a14b397..36d9539 100644 --- a/services/surfaceflinger/LayerBase.h +++ b/services/surfaceflinger/LayerBase.h @@ -81,7 +81,7 @@ public: Region transparentRegion; }; - void setName(const String8& name); + virtual void setName(const String8& name); String8 getName() const; // modify current state |