OSDN Git Service

fix the threading issue for setBuffercount()
authorMathias Agopian <mathias@google.com>
Wed, 19 May 2010 00:06:55 +0000 (17:06 -0700)
committerMathias Agopian <mathias@google.com>
Fri, 21 May 2010 01:00:42 +0000 (18:00 -0700)
commitbb641244d7d73312dc65b8e338df18b22e335107
tree4a3e6e847513ad28bedd8de68da4ef2bd6ebf5ff
parentdcf01e6644d0e9eca5aa08ee1b16a0d29d039e5e
fix the threading issue for setBuffercount()

this change introduces R/W locks in the right places.
on the server-side, it guarantees that setBufferCount()
is synchronized with "retire" and "resize".
on the client-side, it guarantees that setBufferCount()
is synchronized with "dequeue", "lockbuffer" and "queue"
15 files changed:
include/private/surfaceflinger/SharedBufferStack.h
libs/surfaceflinger/Barrier.h
libs/surfaceflinger/Layer.cpp
libs/surfaceflinger/Layer.h
libs/surfaceflinger/LayerBlur.cpp
libs/surfaceflinger/MessageQueue.cpp
libs/surfaceflinger/MessageQueue.h
libs/surfaceflinger/SurfaceFlinger.cpp
libs/surfaceflinger/SurfaceFlinger.h
libs/surfaceflinger/TextureManager.cpp
libs/surfaceflinger/TextureManager.h
libs/surfaceflinger_client/SharedBufferStack.cpp
libs/surfaceflinger_client/Surface.cpp
libs/surfaceflinger_client/SurfaceComposerClient.cpp
libs/surfaceflinger_client/tests/SharedBufferStack/SharedBufferStackTest.cpp