New issue
Advanced search Search tips

Issue 725317 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Closed: May 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Bug



Sign in to add a comment

Android camera2 zoom is slow

Project Member Reported by mcasas@chromium.org, May 23 2017

Issue description

Steps to repro:

1 - Navigate to https://rawgit.com/Miguelao/demos/master/imagecapture.html
2 - open one of the cameras, e.g. the back-facing one
3 - move the zoom slider, and observe a big lag (~300ms)

This happens on sailfish and/or N6 with r473770, but I'm sure it has
been around for a while.

What should happen? It should be fast.
 
Project Member

Comment 1 by bugdroid1@chromium.org, May 23 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/77e49adee886cd80cea354a6480628737ccfebd4

commit 77e49adee886cd80cea354a6480628737ccfebd4
Author: Miguel Casas-Sanchez <mcasas@chromium.org>
Date: Tue May 23 20:30:28 2017

Image Capture Android: fix slow zoom when using Camera 2

This CL addresses the problem of slow zoom changes by keeping 
most of the CaptureRequest.Builder in a new member variable 
|mPreviewRequestBuilder|.  This builder owns expensive resources,
i.e. ImageReader and its internal Surface, and is recomposed on 
ToT on every settings change (e.g. every zoom change), causing
the slowdown.  |mRestartCapture| (renamed to 
|mReconfigureCaptureTask|) becomes smarter and only reconfigures
what is needed.

A class is renamed: s/CrImageReaderListener/CrPreviewReaderListener/
to signify what it does, especially vs CrPhotoSessionListener).

Also adding use of ThreadUtils.assertOnUiThread(); I added
it during debugging but it doesn't hurt to leave it in.


Bug:  725317 
Change-Id: I857252c928b21d9b0583681fd357bd3dbcb0cef3
Reviewed-on: https://chromium-review.googlesource.com/511703
Reviewed-by: Emircan Uysaler <emircan@chromium.org>
Commit-Queue: Miguel Casas <mcasas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#474037}
[modify] https://crrev.com/77e49adee886cd80cea354a6480628737ccfebd4/media/capture/video/android/java/src/org/chromium/media/VideoCaptureCamera2.java

Comment 2 by mcasas@chromium.org, May 24 2017

Components: Blink>ImageCapture

Comment 3 by mcasas@chromium.org, May 25 2017

Status: Verified (was: Started)
#1 landed in 60.0.3109.0,
verified in 3110 on a sailfish w/ Android 7.1.2

Sign in to add a comment