New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 775035 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Nov 2017
Cc:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Blocking:
issue 775030



Sign in to add a comment

Implement a video detector in Viz

Project Member Reported by samans@chromium.org, Oct 16 2017

Issue description

On Chrome OS, we have a ash::VideoDetector running in the browser process that detects whether a renderer is likely playing a video and consequently notifies the power manager to prevent the screen from turning off, the Chromebook from suspending, etc. This is currently doable because the browser process receives renderers' CompositorFrames, but eventually they will bypass the browser process and go directly to Viz. We should implement the video detector in Viz and notify ash::VideoDetector via a mojo interface in order to make it compatible with Viz.
 

Comment 1 by fsamuel@google.com, Oct 18 2017

Cc: danakj@chromium.org rjkroege@chromium.org sadrul@chromium.org piman@chromium.org
Project Member

Comment 2 by bugdroid1@chromium.org, Oct 18 2017

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

commit 251d7a78bf163944e9bfe3a0778ddc132d4ca37e
Author: Saman Sami <samans@chromium.org>
Date: Wed Oct 18 22:59:21 2017

Rename WillDrawCallback to AggregatedDamageCallback

WillDrawCallback is called even for surfaces that will not be drawn.
This is because SurfaceAggregator::PrewalkTree iterates not just on
embedded SurfaceDrawQuads but also referenced_surfaces which don't
necessarily have a SurfaceDrawQuad and therefore won't be included in
the final display frame. As a part of video detection in Viz I'm going
to create an actual WillDraw method that will be called when a surface
is included in the display frame, so rename WillDrawCallback to
AggregatedDamageCallback to avoid any confusion. 

BUG= 775035 

Change-Id: Ia1db880f53d639e72959f8683f48f4b7e6799cc1
Reviewed-on: https://chromium-review.googlesource.com/726368
Reviewed-by: Antoine Labour <piman@chromium.org>
Reviewed-by: Fady Samuel <fsamuel@chromium.org>
Commit-Queue: Saman Sami <samans@chromium.org>
Cr-Commit-Position: refs/heads/master@{#509910}
[modify] https://crrev.com/251d7a78bf163944e9bfe3a0778ddc132d4ca37e/components/viz/service/display/display_scheduler.cc
[modify] https://crrev.com/251d7a78bf163944e9bfe3a0778ddc132d4ca37e/components/viz/service/display/display_scheduler.h
[modify] https://crrev.com/251d7a78bf163944e9bfe3a0778ddc132d4ca37e/components/viz/service/display/surface_aggregator.cc
[modify] https://crrev.com/251d7a78bf163944e9bfe3a0778ddc132d4ca37e/components/viz/service/display/surface_aggregator_unittest.cc
[modify] https://crrev.com/251d7a78bf163944e9bfe3a0778ddc132d4ca37e/components/viz/service/frame_sinks/compositor_frame_sink_support.cc
[modify] https://crrev.com/251d7a78bf163944e9bfe3a0778ddc132d4ca37e/components/viz/service/frame_sinks/compositor_frame_sink_support.h
[modify] https://crrev.com/251d7a78bf163944e9bfe3a0778ddc132d4ca37e/components/viz/service/frame_sinks/frame_sink_manager_impl.cc
[modify] https://crrev.com/251d7a78bf163944e9bfe3a0778ddc132d4ca37e/components/viz/service/frame_sinks/frame_sink_manager_impl.h
[modify] https://crrev.com/251d7a78bf163944e9bfe3a0778ddc132d4ca37e/components/viz/service/hit_test/hit_test_manager.h
[modify] https://crrev.com/251d7a78bf163944e9bfe3a0778ddc132d4ca37e/components/viz/service/surfaces/surface.cc
[modify] https://crrev.com/251d7a78bf163944e9bfe3a0778ddc132d4ca37e/components/viz/service/surfaces/surface.h
[modify] https://crrev.com/251d7a78bf163944e9bfe3a0778ddc132d4ca37e/components/viz/service/surfaces/surface_manager.cc
[modify] https://crrev.com/251d7a78bf163944e9bfe3a0778ddc132d4ca37e/components/viz/service/surfaces/surface_manager.h
[modify] https://crrev.com/251d7a78bf163944e9bfe3a0778ddc132d4ca37e/components/viz/service/surfaces/surface_observer.h
[modify] https://crrev.com/251d7a78bf163944e9bfe3a0778ddc132d4ca37e/components/viz/test/fake_surface_observer.cc
[modify] https://crrev.com/251d7a78bf163944e9bfe3a0778ddc132d4ca37e/components/viz/test/fake_surface_observer.h
[modify] https://crrev.com/251d7a78bf163944e9bfe3a0778ddc132d4ca37e/content/browser/renderer_host/delegated_frame_host.cc
[modify] https://crrev.com/251d7a78bf163944e9bfe3a0778ddc132d4ca37e/content/browser/renderer_host/delegated_frame_host.h
[modify] https://crrev.com/251d7a78bf163944e9bfe3a0778ddc132d4ca37e/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc

Comment 3 by samans@chromium.org, Oct 24 2017

Cc: apaci...@chromium.org kylec...@chromium.org sky@chromium.org fsam...@chromium.org samans@chromium.org weiliangc@chromium.org varkha@chromium.org
 Issue 716941  has been merged into this issue.
Project Member

Comment 4 by bugdroid1@chromium.org, Nov 9 2017

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

commit 3fb310da2ede0d9f890f884d8b62f34aa90546a9
Author: Saman Sami <samans@chromium.org>
Date: Thu Nov 09 16:51:54 2017

Implement a video detector in Viz

Current video detector is broken with Viz enabled. Move parts of
ash::VideoDetector that need to be run in Viz process into
viz::VideoDetector and notify ash::VideoDetector over mojo.
I don't expect any regressions in behaviour. One improvement is that
when the video activity is happening in an occluded window, the new
video detector does not report that activity, whereas the old video
detector did.

Test: There are unit tests. I also tried --mash, --mus,--enable-viz,
and no flags manually for a chromeos build on my workstation. Also
tried --mash and --mus and no flags manually on a link chromebook.

BUG= 775035 

Change-Id: I5098492edaf5cce08f9ba6c50a5d7482eb739426
Reviewed-on: https://chromium-review.googlesource.com/702044
Reviewed-by: kylechar <kylechar@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Yuzhu Shen <yzshen@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Dan Erat <derat@chromium.org>
Commit-Queue: Saman Sami <samans@chromium.org>
Cr-Commit-Position: refs/heads/master@{#515186}
[modify] https://crrev.com/3fb310da2ede0d9f890f884d8b62f34aa90546a9/ash/BUILD.gn
[modify] https://crrev.com/3fb310da2ede0d9f890f884d8b62f34aa90546a9/ash/DEPS
[modify] https://crrev.com/3fb310da2ede0d9f890f884d8b62f34aa90546a9/ash/mus/manifest.json
[modify] https://crrev.com/3fb310da2ede0d9f890f884d8b62f34aa90546a9/ash/mus/shell_port_mus.cc
[modify] https://crrev.com/3fb310da2ede0d9f890f884d8b62f34aa90546a9/ash/mus/shell_port_mus.h
[modify] https://crrev.com/3fb310da2ede0d9f890f884d8b62f34aa90546a9/ash/shell.cc
[modify] https://crrev.com/3fb310da2ede0d9f890f884d8b62f34aa90546a9/ash/shell_port.h
[modify] https://crrev.com/3fb310da2ede0d9f890f884d8b62f34aa90546a9/ash/shell_port_classic.cc
[modify] https://crrev.com/3fb310da2ede0d9f890f884d8b62f34aa90546a9/ash/shell_port_classic.h
[modify] https://crrev.com/3fb310da2ede0d9f890f884d8b62f34aa90546a9/ash/system/power/video_activity_notifier_unittest.cc
[modify] https://crrev.com/3fb310da2ede0d9f890f884d8b62f34aa90546a9/ash/wm/video_detector.cc
[modify] https://crrev.com/3fb310da2ede0d9f890f884d8b62f34aa90546a9/ash/wm/video_detector.h
[modify] https://crrev.com/3fb310da2ede0d9f890f884d8b62f34aa90546a9/ash/wm/video_detector_unittest.cc
[modify] https://crrev.com/3fb310da2ede0d9f890f884d8b62f34aa90546a9/components/viz/host/host_frame_sink_manager.cc
[modify] https://crrev.com/3fb310da2ede0d9f890f884d8b62f34aa90546a9/components/viz/host/host_frame_sink_manager.h
[modify] https://crrev.com/3fb310da2ede0d9f890f884d8b62f34aa90546a9/components/viz/service/BUILD.gn
[modify] https://crrev.com/3fb310da2ede0d9f890f884d8b62f34aa90546a9/components/viz/service/display/surface_aggregator.cc
[modify] https://crrev.com/3fb310da2ede0d9f890f884d8b62f34aa90546a9/components/viz/service/display/surface_aggregator.h
[modify] https://crrev.com/3fb310da2ede0d9f890f884d8b62f34aa90546a9/components/viz/service/frame_sinks/compositor_frame_sink_support.h
[modify] https://crrev.com/3fb310da2ede0d9f890f884d8b62f34aa90546a9/components/viz/service/frame_sinks/frame_sink_manager_impl.cc
[modify] https://crrev.com/3fb310da2ede0d9f890f884d8b62f34aa90546a9/components/viz/service/frame_sinks/frame_sink_manager_impl.h
[add] https://crrev.com/3fb310da2ede0d9f890f884d8b62f34aa90546a9/components/viz/service/frame_sinks/video_detector.cc
[add] https://crrev.com/3fb310da2ede0d9f890f884d8b62f34aa90546a9/components/viz/service/frame_sinks/video_detector.h
[add] https://crrev.com/3fb310da2ede0d9f890f884d8b62f34aa90546a9/components/viz/service/frame_sinks/video_detector_unittest.cc
[modify] https://crrev.com/3fb310da2ede0d9f890f884d8b62f34aa90546a9/components/viz/service/surfaces/surface_manager.cc
[modify] https://crrev.com/3fb310da2ede0d9f890f884d8b62f34aa90546a9/components/viz/service/surfaces/surface_manager.h
[modify] https://crrev.com/3fb310da2ede0d9f890f884d8b62f34aa90546a9/components/viz/service/surfaces/surface_observer.h
[modify] https://crrev.com/3fb310da2ede0d9f890f884d8b62f34aa90546a9/components/viz/test/compositor_frame_helpers.cc
[modify] https://crrev.com/3fb310da2ede0d9f890f884d8b62f34aa90546a9/components/viz/test/compositor_frame_helpers.h
[modify] https://crrev.com/3fb310da2ede0d9f890f884d8b62f34aa90546a9/components/viz/test/test_frame_sink_manager.h
[modify] https://crrev.com/3fb310da2ede0d9f890f884d8b62f34aa90546a9/content/public/app/mojo/content_browser_manifest.json
[modify] https://crrev.com/3fb310da2ede0d9f890f884d8b62f34aa90546a9/mojo/public/cpp/bindings/interface_ptr_set.h
[modify] https://crrev.com/3fb310da2ede0d9f890f884d8b62f34aa90546a9/services/ui/manifest.json
[modify] https://crrev.com/3fb310da2ede0d9f890f884d8b62f34aa90546a9/services/ui/public/interfaces/BUILD.gn
[add] https://crrev.com/3fb310da2ede0d9f890f884d8b62f34aa90546a9/services/ui/public/interfaces/video_detector.mojom
[modify] https://crrev.com/3fb310da2ede0d9f890f884d8b62f34aa90546a9/services/ui/service.cc
[modify] https://crrev.com/3fb310da2ede0d9f890f884d8b62f34aa90546a9/services/ui/service.h
[modify] https://crrev.com/3fb310da2ede0d9f890f884d8b62f34aa90546a9/services/ui/ws/BUILD.gn
[add] https://crrev.com/3fb310da2ede0d9f890f884d8b62f34aa90546a9/services/ui/ws/video_detector_impl.cc
[add] https://crrev.com/3fb310da2ede0d9f890f884d8b62f34aa90546a9/services/ui/ws/video_detector_impl.h
[modify] https://crrev.com/3fb310da2ede0d9f890f884d8b62f34aa90546a9/services/ui/ws/window_server.cc
[modify] https://crrev.com/3fb310da2ede0d9f890f884d8b62f34aa90546a9/services/ui/ws/window_server.h
[modify] https://crrev.com/3fb310da2ede0d9f890f884d8b62f34aa90546a9/services/viz/privileged/interfaces/compositing/frame_sink_manager.mojom
[modify] https://crrev.com/3fb310da2ede0d9f890f884d8b62f34aa90546a9/services/viz/public/interfaces/BUILD.gn
[add] https://crrev.com/3fb310da2ede0d9f890f884d8b62f34aa90546a9/services/viz/public/interfaces/compositing/video_detector_observer.mojom

Comment 5 by samans@chromium.org, Nov 14 2017

Status: Fixed (was: Started)

Sign in to add a comment