OSDN Git Service

Camera3: Be busy as soon as work arrives.
authorEino-Ville Talvala <etalvala@google.com>
Thu, 29 Aug 2013 19:46:18 +0000 (12:46 -0700)
committerEino-Ville Talvala <etalvala@google.com>
Thu, 29 Aug 2013 19:51:00 +0000 (12:51 -0700)
commit26fe6c7c56477ef227205c68f17df07ca3501d65
tree562a44a207970f573342636a345b43e101c3d1cf
parentc063c1756cbffdc273fe50b208426f59439f1298
Camera3: Be busy as soon as work arrives.

RequestThread's internal busy flag (mPaused) was not being immediately
set when new work was submitted to it. This allowed for a race
condition where a capture() followed by an immediate
waitUntilDrained() would immediately return from the wait.

Set the mPaused flag to false immediately in capture() and
setStreamingRequest() to avoid this, instead of waiting until the end
of the next RequestThread iteration.

Bug: 10531739
Change-Id: I54a79fe5361d527ec717f41ad805e9b319a48cd8
services/camera/libcameraservice/device3/Camera3Device.cpp
services/camera/libcameraservice/device3/Camera3Device.h