diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp index f85ce7fd09498..aa16d23dd8292 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 Layer::createSurface() { class BSurface : public BnSurface, public LayerCleaner { diff --git a/services/surfaceflinger/Layer.h b/services/surfaceflinger/Layer.h index ff389aecef70e..82e35218d279d 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 getLayer() const { return const_cast(this); } + virtual void setName(const String8& name); // LayerBaseClient interface virtual wp getSurfaceTextureBinder() const; diff --git a/services/surfaceflinger/LayerBase.h b/services/surfaceflinger/LayerBase.h index a14b397a8d42b..36d953904e3fa 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