diff options
author | 2010-06-01 15:12:58 -0700 | |
---|---|---|
committer | 2010-06-04 18:57:41 -0700 | |
commit | b7e930db175c192464cebdeb49eb56cf6dd60114 (patch) | |
tree | 15f475afd3e4d6462587368154f84623defd2776 /libs/surfaceflinger/LayerBase.cpp | |
parent | 96f0819f81293076e652792794a961543e6750d7 (diff) |
split surface management from surface's buffers management
Change-Id: If3c5655d1231f8f0c49ba68f972b1b20c93b3f87
Diffstat (limited to 'libs/surfaceflinger/LayerBase.cpp')
-rw-r--r-- | libs/surfaceflinger/LayerBase.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/libs/surfaceflinger/LayerBase.cpp b/libs/surfaceflinger/LayerBase.cpp index 80b001e418..1f66fd0296 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>& client) - : LayerBase(flinger, display), client(client), + : LayerBase(flinger, display), mClientRef(client), mIdentity(uint32_t(android_atomic_inc(&sIdentity))) { } LayerBaseClient::~LayerBaseClient() { - sp<Client> c(client.promote()); + sp<Client> 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> client(this->client.promote()); + sp<Client> client(mClientRef.promote()); snprintf(buffer, SIZE, " name=%s\n" " client=%p, identity=%u\n", |