New issue
Advanced search Search tips

Issue 825745 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner:
Closed: Apr 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Bug-Regression



Sign in to add a comment

Average power consumption raised from M53 to M59

Reported by jiad...@gmail.com, Mar 26 2018

Issue description

Example URL:

Steps to reproduce the problem:
1. push a mp4 file into sdcard of Android device 
2. open browser, type file:///sdcard/test.mp4
3. start play the video in browser, click fullscreen button.
4. use powser monitor to check the average current during video playing.

What is the expected behavior?
M53 and M59 

What went wrong?
when we install M53 webview on the Android device, the average current is 308mA during fullscreen playing. however when using M59, the average current is 460mA. We checked systrace, on M53 the RenderWidgetHostViewAndroid stops VSyncUpdate during fullsceeen playing video and M59 the vsync function is called all the time every 16ms.

Did this work before? Yes 53.0.2749.0

Is it a problem with Flash or HTML5? N/A

Does this work in other browsers? Yes

Chrome version: 59.0.3048  Channel: n/a
OS Version: Android 8.1
Flash Version: 

Contents of chrome://gpu: 

we tried the latest chromium M67 and the problem still exists.
 
fullScreen_systrace.zip
2.0 MB Download

Comment 1 by jiad...@gmail.com, Mar 26 2018

M53 average current is 308mA
M59 average current is 468mA
Cc: liber...@chromium.org
What device is this? When we turned on the unified pipeline we measured equivalent fullscreen power usage.
Oh right, WebView doesn't get SurfaceViews, so this is still SurfaceTexture now.
Cc: boliu@chromium.org
+boliu as FYI as we made this call a long time ago (no SurfaceView for WebView video playback). Frank was there any way to use the DialogSurfaces to make this happen in a cleaner way?

Comment 5 by boliu@chromium.org, Mar 26 2018

Cc: tobiasjs@chromium.org
that's from the extra copy webview does, even ignoring the cost of not using surfaceview I think. not sure if that's actually avoidable though.

There are too many problems with using another surface on webview. Main one being there probably will be a power *regression* if you do it naively.
adding DS for WV: not without some additional platform support and / or changing the WV api, unfortunately.

avoid texture copy of video frame: new stuff in android 26 might help us here.  AImageReader / chrome's GLImageAHardwareBuffer might let us avoid it.
Cc: ericrk@chromium.org
+ericrk: FYI, your AImageReader work might also help WebView.

Comment 8 by jiad...@gmail.com, Mar 28 2018

Is there any solutions or workaround? M53 uses ContentVideoView in fullscreen video playing. Shall we change it back?
i don't think that changing it back is an option; the M53 pipeline doesn't exist anymore.

as for adding overlay support using DS, maybe i was being pessimistic before.  a custom DS backend that doesn't rely on Dialog might work.  as long as it supports the AndroidOverlay api, the video pipeline won't care.  i'll think about it.

however as mentioned in c#5, i'm not convinced this will guarantee any sort of power improvement.  if the additional surface causes it to run out of hardware composition lanes, then it's almost a guaranteed loss.
It's not possible to remove in all cases anyway, because the texture copy change was required to enable multiprocess on Android. At best this could only have been avoided for L and M devices.

Comment 11 by boliu@chromium.org, Mar 28 2018

> however as mentioned in c#5, i'm not convinced this will guarantee any sort of power improvement.  if the additional surface causes it to run out of hardware composition lanes, then it's almost a guaranteed loss.

It's worse. My concern is that if you just do things naively like how things are hooked up in chrome, then that will cause *both* surfaces to update, which is probably going to be a net lose on power.
Cc: -boliu@chromium.org
Owner: boliu@chromium.org
Status: Assigned (was: Unconfirmed)
who would be the proper owner to take this bug? 
give to boliu@ to start, please re-assign appropriately if need.

Comment 13 by boliu@chromium.org, Apr 10 2018

I don't see any reasonable path forward here. Unless media stops using SurfaceTexture (ie probably ship our own decoders or something), then that extra copy has to stay.
Shipping our own decoders would be worse since they wouldn't be hardware decoded. If the copy has to stay this is WontFix.

Comment 15 by boliu@chromium.org, Apr 10 2018

Status: WontFix (was: Assigned)
maybe vulkan will save us, in a few years...

Sign in to add a comment