summaryrefslogtreecommitdiffstats
path: root/services/surfaceflinger/Layer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'services/surfaceflinger/Layer.cpp')
-rw-r--r--services/surfaceflinger/Layer.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp
index 4bb256f..78ca3c6 100644
--- a/services/surfaceflinger/Layer.cpp
+++ b/services/surfaceflinger/Layer.cpp
@@ -61,6 +61,7 @@ Layer::Layer(SurfaceFlinger* flinger,
mBufferManager(mTextureManager),
mWidth(0), mHeight(0), mNeedsScaling(false), mFixedSize(false)
{
+ setDestroyer(this);
}
Layer::~Layer()
@@ -77,8 +78,8 @@ Layer::~Layer()
}
}
-void Layer::destroy() const {
- mFlinger->destroyLayer(this);
+void Layer::destroy(RefBase const* base) {
+ mFlinger->destroyLayer(static_cast<LayerBase const*>(base));
}
status_t Layer::setToken(const sp<UserClient>& userClient,