From 7623da435e45c7c03ef6a00a43675deb6645f070 Mon Sep 17 00:00:00 2001 From: Mathias Agopian Date: Tue, 1 Jun 2010 15:12:58 -0700 Subject: split surface management from surface's buffers management Change-Id: If3c5655d1231f8f0c49ba68f972b1b20c93b3f87 --- libs/surfaceflinger/LayerBase.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'libs/surfaceflinger/LayerBase.cpp') diff --git a/libs/surfaceflinger/LayerBase.cpp b/libs/surfaceflinger/LayerBase.cpp index 80b001e4187d..1f66fd0296e9 100644 --- a/libs/surfaceflinger/LayerBase.cpp +++ b/libs/surfaceflinger/LayerBase.cpp @@ -151,7 +151,6 @@ bool LayerBase::setAlpha(uint8_t alpha) { return true; } bool LayerBase::setMatrix(const layer_state_t::matrix22_t& matrix) { - // TODO: check the matrix has changed mCurrentState.sequence++; mCurrentState.transform.set( matrix.dsdx, matrix.dsdy, matrix.dtdx, matrix.dtdy); @@ -159,7 +158,6 @@ bool LayerBase::setMatrix(const layer_state_t::matrix22_t& matrix) { return true; } bool LayerBase::setTransparentRegionHint(const Region& transparent) { - // TODO: check the region has changed mCurrentState.sequence++; mCurrentState.transparentRegion = transparent; requestTransaction(); @@ -489,16 +487,16 @@ int32_t LayerBaseClient::sIdentity = 1; LayerBaseClient::LayerBaseClient(SurfaceFlinger* flinger, DisplayID display, const sp& client) - : LayerBase(flinger, display), client(client), + : LayerBase(flinger, display), mClientRef(client), mIdentity(uint32_t(android_atomic_inc(&sIdentity))) { } LayerBaseClient::~LayerBaseClient() { - sp c(client.promote()); + sp c(mClientRef.promote()); if (c != 0) { - c->free(this); + c->detachLayer(this); } } @@ -524,7 +522,7 @@ void LayerBaseClient::dump(String8& result, char* buffer, size_t SIZE) const { LayerBase::dump(result, buffer, SIZE); - sp client(this->client.promote()); + sp client(mClientRef.promote()); snprintf(buffer, SIZE, " name=%s\n" " client=%p, identity=%u\n", -- cgit v1.2.3-59-g8ed1b