From 96f0819f81293076e652792794a961543e6750d7 Mon Sep 17 00:00:00 2001 From: Mathias Agopian Date: Wed, 2 Jun 2010 23:28:45 -0700 Subject: clean-up client management. simplified things a lot, the biggest change is that the concept of "ClientID" is now gone, instead we simply use references. Change-Id: Icbc57f80865884aa5f35ad0d0a0db26f19f9f7ce --- libs/surfaceflinger/LayerBuffer.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'libs/surfaceflinger/LayerBuffer.cpp') diff --git a/libs/surfaceflinger/LayerBuffer.cpp b/libs/surfaceflinger/LayerBuffer.cpp index 8a582daa7c..732a4ec1dc 100644 --- a/libs/surfaceflinger/LayerBuffer.cpp +++ b/libs/surfaceflinger/LayerBuffer.cpp @@ -44,8 +44,8 @@ gralloc_module_t const* LayerBuffer::sGrallocModule = 0; // --------------------------------------------------------------------------- LayerBuffer::LayerBuffer(SurfaceFlinger* flinger, DisplayID display, - const sp& client, int32_t i) - : LayerBaseClient(flinger, display, client, i), + const sp& client) + : LayerBaseClient(flinger, display, client), mNeedsBlending(false), mBlitEngine(0) { } @@ -60,8 +60,7 @@ LayerBuffer::~LayerBuffer() void LayerBuffer::onFirstRef() { LayerBaseClient::onFirstRef(); - mSurface = new SurfaceLayerBuffer(mFlinger, clientIndex(), - const_cast(this)); + mSurface = new SurfaceLayerBuffer(mFlinger, this); hw_module_t const* module = (hw_module_t const*)sGrallocModule; if (!module) { @@ -204,9 +203,9 @@ sp LayerBuffer::clearSource() { // LayerBuffer::SurfaceLayerBuffer // ============================================================================ -LayerBuffer::SurfaceLayerBuffer::SurfaceLayerBuffer(const sp& flinger, - SurfaceID id, const sp& owner) - : LayerBaseClient::Surface(flinger, id, owner->getIdentity(), owner) +LayerBuffer::SurfaceLayerBuffer::SurfaceLayerBuffer( + const sp& flinger, const sp& owner) + : LayerBaseClient::Surface(flinger, owner->getIdentity(), owner) { } -- cgit v1.2.3-59-g8ed1b