Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a249f2d1 authored by Jamie Gennis's avatar Jamie Gennis
Browse files

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
parent fa28c35c
Loading
Loading
Loading
Loading
+5 −0
Original line number Original line Diff line number Diff line
@@ -112,6 +112,11 @@ void Layer::onRemoved()
    mSurfaceTexture->abandon();
    mSurfaceTexture->abandon();
}
}


void Layer::setName(const String8& name) {
    LayerBase::setName(name);
    mSurfaceTexture->setName(name);
}

sp<ISurface> Layer::createSurface()
sp<ISurface> Layer::createSurface()
{
{
    class BSurface : public BnSurface, public LayerCleaner {
    class BSurface : public BnSurface, public LayerCleaner {
+1 −0
Original line number Original line Diff line number Diff line
@@ -74,6 +74,7 @@ public:
    virtual bool isProtected() const;
    virtual bool isProtected() const;
    virtual void onRemoved();
    virtual void onRemoved();
    virtual sp<Layer> getLayer() const { return const_cast<Layer*>(this); }
    virtual sp<Layer> getLayer() const { return const_cast<Layer*>(this); }
    virtual void setName(const String8& name);


    // LayerBaseClient interface
    // LayerBaseClient interface
    virtual wp<IBinder> getSurfaceTextureBinder() const;
    virtual wp<IBinder> getSurfaceTextureBinder() const;
+1 −1
Original line number Original line Diff line number Diff line
@@ -81,7 +81,7 @@ public:
                Region          transparentRegion;
                Region          transparentRegion;
            };
            };


            void setName(const String8& name);
    virtual void setName(const String8& name);
            String8 getName() const;
            String8 getName() const;


            // modify current state
            // modify current state