diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2020-09-08 10:00:25 +0300 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2020-09-20 15:09:53 +0300 |
commit | 54557e25f2d478623839fe17f82700bb97fff0b2 (patch) | |
tree | 2f93ba0a45e6d86cd63ef67780b3de9356dcd37d /src/android/camera_device.h | |
parent | 7720c4aefa95ee9df6e5d464c187efa7141f1302 (diff) |
libcamera: camera: Optimize camera deletion
In most cases the last reference to a Camera instance will be the one
held by the CameraManager. That reference gets released when the
CameraManager thread cleans up, just before it stops. There's no need to
delete the camera with deleteLater() in that case.
To optimize this case, use deleteLater() only when the camera gets
deleted from a different thread, and delete is synchronously otherwise.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Umang Jain <email@uajain.com>
Diffstat (limited to 'src/android/camera_device.h')
0 files changed, 0 insertions, 0 deletions