From a0c6b761738ff98682e281571a0ff91c2230e7ee Mon Sep 17 00:00:00 2001 From: Mathias Agopian Date: Mon, 13 Dec 2010 16:47:31 -0800 Subject: [PATCH] minor clean-up. SurfaceFlinger doesn't need libpixelflinger.so. (DO NOT MERGE) Change-Id: I1ddbbbec4fa5b2521ef3787bc28efe1bc90d0060 --- include/surfaceflinger/Surface.h | 2 +- libs/surfaceflinger_client/Surface.cpp | 6 +++--- services/surfaceflinger/Android.mk | 1 - 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/include/surfaceflinger/Surface.h b/include/surfaceflinger/Surface.h index 22684db8f..7b2a7f5af 100644 --- a/include/surfaceflinger/Surface.h +++ b/include/surfaceflinger/Surface.h @@ -248,7 +248,7 @@ private: uint32_t *pWidth, uint32_t *pHeight, uint32_t *pFormat, uint32_t *pUsage) const; - static void cleanCachedSurfaces(); + static void cleanCachedSurfacesLocked(); class BufferInfo { uint32_t mWidth; diff --git a/libs/surfaceflinger_client/Surface.cpp b/libs/surfaceflinger_client/Surface.cpp index 854a3c6fd..017e94c94 100644 --- a/libs/surfaceflinger_client/Surface.cpp +++ b/libs/surfaceflinger_client/Surface.cpp @@ -377,7 +377,7 @@ status_t Surface::writeToParcel( Mutex Surface::sCachedSurfacesLock; -DefaultKeyedVector, wp > Surface::sCachedSurfaces(wp(0)); +DefaultKeyedVector, wp > Surface::sCachedSurfaces; sp Surface::readFromParcel(const Parcel& data) { Mutex::Autolock _l(sCachedSurfacesLock); @@ -390,13 +390,13 @@ sp Surface::readFromParcel(const Parcel& data) { if (surface->mSurface == 0) { surface = 0; } - cleanCachedSurfaces(); + cleanCachedSurfacesLocked(); return surface; } // Remove the stale entries from the surface cache. This should only be called // with sCachedSurfacesLock held. -void Surface::cleanCachedSurfaces() { +void Surface::cleanCachedSurfacesLocked() { for (int i = sCachedSurfaces.size()-1; i >= 0; --i) { wp s(sCachedSurfaces.valueAt(i)); if (s == 0 || s.promote() == 0) { diff --git a/services/surfaceflinger/Android.mk b/services/surfaceflinger/Android.mk index e2f8a7468..c5bdaa11f 100644 --- a/services/surfaceflinger/Android.mk +++ b/services/surfaceflinger/Android.mk @@ -37,7 +37,6 @@ endif LOCAL_SHARED_LIBRARIES := \ libcutils \ - libpixelflinger \ libhardware \ libutils \ libEGL \