[macOS] SampleBufferTransformer: Only create buffers when needed.
If the source and destination formats are identical, a "fast path" is triggered to avoid an unnecessary copy - the source pixel buffer is returned. Thus a destination pixel buffer is never needed. This CL avoids creating a destination pixel buffer when the "fast path" is triggered by moving the condition up for an earlier return. Bug: chromium:1132299 Change-Id: Iac8fa014af8e9d5a6d0735cc222a2b178e9603c1 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2517528Reviewed-by:Ilya Nikolaevskiy <ilnik@chromium.org> Commit-Queue: Henrik Boström <hbos@chromium.org> Cr-Commit-Position: refs/heads/master@{#823961}
Showing
Please register or sign in to comment