diff options
author | Mathias Agopian <mathias@google.com> | 2011-01-19 18:02:20 -0800 |
---|---|---|
committer | Mathias Agopian <mathias@google.com> | 2011-01-20 12:10:11 -0800 |
commit | 1d4549ab0312319a79fb37068a3fc63bbb0a3adc (patch) | |
tree | 32a0c3dcb3fcae1354342ad938abb6a7d9c747e4 /services | |
parent | ed58d8ed8a50cbd8c5e01c4e51bcbbe4341d1dfd (diff) | |
download | frameworks_base-1d4549ab0312319a79fb37068a3fc63bbb0a3adc.zip frameworks_base-1d4549ab0312319a79fb37068a3fc63bbb0a3adc.tar.gz frameworks_base-1d4549ab0312319a79fb37068a3fc63bbb0a3adc.tar.bz2 |
clean-up unneeded code
now that we removed the notion of a "inUse" buffer in surfaceflinger
a lot of code can be simplified / removed.
noteworthy, the whole concept of "unlockClient" wrt. "compositionComplete"
is also gone.
Change-Id: I210413d4c8c0998dae05c8620ebfc895d3e6233d
Diffstat (limited to 'services')
-rw-r--r-- | services/surfaceflinger/Layer.cpp | 16 | ||||
-rw-r--r-- | services/surfaceflinger/Layer.h | 1 | ||||
-rw-r--r-- | services/surfaceflinger/LayerBase.cpp | 4 | ||||
-rw-r--r-- | services/surfaceflinger/LayerBase.h | 5 | ||||
-rw-r--r-- | services/surfaceflinger/SurfaceFlinger.cpp | 15 | ||||
-rw-r--r-- | services/surfaceflinger/SurfaceFlinger.h | 1 |
6 files changed, 0 insertions, 42 deletions
diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp index fde68f6..3730739 100644 --- a/services/surfaceflinger/Layer.cpp +++ b/services/surfaceflinger/Layer.cpp @@ -691,22 +691,6 @@ void Layer::unlockPageFlip( } } -void Layer::finishPageFlip() -{ - ClientRef::Access sharedClient(mUserClientRef); - SharedBufferServer* lcblk(sharedClient.get()); - if (lcblk) { - int buf = mBufferManager.getActiveBufferIndex(); - if (buf >= 0) { - status_t err = lcblk->unlock( buf ); - LOGE_IF(err!=NO_ERROR, - "layer %p, buffer=%d wasn't locked!", - this, buf); - } - } -} - - void Layer::dump(String8& result, char* buffer, size_t SIZE) const { LayerBaseClient::dump(result, buffer, SIZE); diff --git a/services/surfaceflinger/Layer.h b/services/surfaceflinger/Layer.h index 5444d2f..2908119 100644 --- a/services/surfaceflinger/Layer.h +++ b/services/surfaceflinger/Layer.h @@ -75,7 +75,6 @@ public: virtual uint32_t doTransaction(uint32_t transactionFlags); virtual void lockPageFlip(bool& recomputeVisibleRegions); virtual void unlockPageFlip(const Transform& planeTransform, Region& outDirtyRegion); - virtual void finishPageFlip(); virtual bool needsBlending() const { return mNeedsBlending; } virtual bool needsDithering() const { return mNeedsDithering; } virtual bool needsFiltering() const; diff --git a/services/surfaceflinger/LayerBase.cpp b/services/surfaceflinger/LayerBase.cpp index 9ddb05f..464841b 100644 --- a/services/surfaceflinger/LayerBase.cpp +++ b/services/surfaceflinger/LayerBase.cpp @@ -273,10 +273,6 @@ void LayerBase::unlockPageFlip( } } -void LayerBase::finishPageFlip() -{ -} - void LayerBase::invalidate() { if ((android_atomic_or(1, &mInvalidate)&1) == 0) { diff --git a/services/surfaceflinger/LayerBase.h b/services/surfaceflinger/LayerBase.h index 13af223..1a34f52 100644 --- a/services/surfaceflinger/LayerBase.h +++ b/services/surfaceflinger/LayerBase.h @@ -174,11 +174,6 @@ public: virtual void unlockPageFlip(const Transform& planeTransform, Region& outDirtyRegion); /** - * finishPageFlip - called after all surfaces have drawn. - */ - virtual void finishPageFlip(); - - /** * needsBlending - true if this surface needs blending */ virtual bool needsBlending() const { return false; } diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp index 434e473..5a8888a 100644 --- a/services/surfaceflinger/SurfaceFlinger.cpp +++ b/services/surfaceflinger/SurfaceFlinger.cpp @@ -394,14 +394,10 @@ bool SurfaceFlinger::threadLoop() logger.log(GraphicLog::SF_SWAP_BUFFERS, index); postFramebuffer(); - logger.log(GraphicLog::SF_UNLOCK_CLIENTS, index); - unlockClients(); - logger.log(GraphicLog::SF_REPAINT_DONE, index); } else { // pretend we did the post hw.compositionComplete(); - unlockClients(); usleep(16667); // 60 fps period } return true; @@ -920,17 +916,6 @@ void SurfaceFlinger::composeSurfaces(const Region& dirty) } } -void SurfaceFlinger::unlockClients() -{ - const LayerVector& drawingLayers(mDrawingState.layersSortedByZ); - const size_t count = drawingLayers.size(); - sp<LayerBase> const* const layers = drawingLayers.array(); - for (size_t i=0 ; i<count ; ++i) { - const sp<LayerBase>& layer = layers[i]; - layer->finishPageFlip(); - } -} - void SurfaceFlinger::debugFlashRegions() { const DisplayHardware& hw(graphicPlane(0).displayHardware()); diff --git a/services/surfaceflinger/SurfaceFlinger.h b/services/surfaceflinger/SurfaceFlinger.h index eabdc64..6dd91ac 100644 --- a/services/surfaceflinger/SurfaceFlinger.h +++ b/services/surfaceflinger/SurfaceFlinger.h @@ -314,7 +314,6 @@ private: void handleRepaint(); void postFramebuffer(); void composeSurfaces(const Region& dirty); - void unlockClients(); ssize_t addClientLayer(const sp<Client>& client, |