mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 22:04:26 +00:00
Merge "Camera: Avoid Metadata re-allocation during shrinkCaptureResult" into pi-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
62e310cbfd
@@ -1391,6 +1391,8 @@ void CameraDeviceSession::sShrinkCaptureResult(
|
||||
std::vector<const camera_metadata_t*>* physCamMdArray,
|
||||
bool handlePhysCam) {
|
||||
*dst = *src;
|
||||
// Reserve maximum number of entries to avoid metadata re-allocation.
|
||||
mds->reserve(1 + (handlePhysCam ? src->num_physcam_metadata : 0));
|
||||
if (sShouldShrink(src->result)) {
|
||||
mds->emplace_back(sCreateCompactCopy(src->result));
|
||||
dst->result = mds->back().getAndLock();
|
||||
|
||||
Reference in New Issue
Block a user