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

Issue 754872 link

Starred by 8 users

Move tab capture scaling+readback+buffer pooling to VIZ component.

Project Member Reported by m...@chromium.org, Aug 11 2017

Issue description

This is a tracking bug for the initial stage of the project to move and optimize screen capture for the new Mus/Mustache world. The immediate goal is to move the tab capture pipeline into the VIZ component (as a privileged frame sink service). This will take all of the relevant code in DelegatedFrameHost and major parts of WebContentsVideoCaptureDevice, and move them into components/viz, interfaced via a new privileged Mojo service FrameSinkVideoCapturer.

When complete, there won't actually be any significant design change to the tab capture pipeline. Meaning, the sequence of steps will be almost the same as the "old way." However, with the implementation well-centralized under the components/viz directory structure, we will be well-positioned to then rework the pipeline, simplifying and optimizing it as proposed in the team-reviewed design doc.

Completion of this bug should mean that tab capture begins to work with the --mus flag enabled, but not necessarily optimized.
 

Comment 1 by m...@chromium.org, Aug 11 2017

Blocking: 754864

Comment 2 by sky@chromium.org, Aug 11 2017

Blocking: 754899

Comment 3 by m...@chromium.org, Aug 23 2017

Blockedon: 758040

Comment 4 by m...@chromium.org, Aug 23 2017

Blockedon: 582955
The NextAction date has arrived: 2017-08-25

Comment 6 by m...@chromium.org, Aug 26 2017

Blockedon: 759310

Comment 7 by m...@chromium.org, Aug 26 2017

NextAction: 2017-08-30

Comment 8 by m...@chromium.org, Aug 26 2017

Blocking: 644851
Project Member

Comment 9 by bugdroid1@chromium.org, Aug 29 2017

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

commit 441d42e4486d08359a6ae8ffd9e92cb547a80e34
Author: Yuri Wiitala <miu@chromium.org>
Date: Tue Aug 29 02:44:13 2017

VideoFrame mojo: Pass the VideoFrameMetadata too! ☺

This change adds mojo struct traits to pass the VideoFrameMetadata along
with media::VideoFrames through Mojo. This is needed for moving tab
capture to VIZ, to support the Mus+Mustache efforts.

Bug:  754872 
Change-Id: I1f3b948000fe89322ae55c5ae84c189f56c4228b
Reviewed-on: https://chromium-review.googlesource.com/639652
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Yuri Wiitala <miu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#497995}
[modify] https://crrev.com/441d42e4486d08359a6ae8ffd9e92cb547a80e34/media/mojo/interfaces/media_types.mojom
[modify] https://crrev.com/441d42e4486d08359a6ae8ffd9e92cb547a80e34/media/mojo/interfaces/video_frame_struct_traits.cc
[modify] https://crrev.com/441d42e4486d08359a6ae8ffd9e92cb547a80e34/media/mojo/interfaces/video_frame_struct_traits.h
[modify] https://crrev.com/441d42e4486d08359a6ae8ffd9e92cb547a80e34/media/mojo/interfaces/video_frame_struct_traits_unittest.cc

Project Member

Comment 10 by bugdroid1@chromium.org, Aug 29 2017

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

commit aa3f382c73bfa8d01efb096b30d590efd5856c77
Author: Yuri Wiitala <miu@chromium.org>
Date: Tue Aug 29 21:55:46 2017

Media video_util: Add ComputeLetterboxRegionForI420()

This adds a derivative of the ComputeLetterboxRegionForI420() utility
function that returns a Rect that always lays on I420 chrome sample
boundaries. This is a follow-up, along the lines of  bug 737278  and other
discussion threads, to improve screen video capture quality.

This function will be used soon in the new VIZ-based tab capture
implementation. This will improve quality on all of: 1) tab capture on
all platforms; 2) browser window capture on Aura platforms; 3) desktop
capture on CrOS.

Bug:  737278 ,  754872 
Change-Id: Ibaeb09c0257358ba3e7f514d1e1267fa50dfe224
Reviewed-on: https://chromium-review.googlesource.com/639653
Reviewed-by: Dale Curtis <dalecurtis@chromium.org>
Commit-Queue: Yuri Wiitala <miu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#498245}
[modify] https://crrev.com/aa3f382c73bfa8d01efb096b30d590efd5856c77/media/base/video_util.cc
[modify] https://crrev.com/aa3f382c73bfa8d01efb096b30d590efd5856c77/media/base/video_util.h
[modify] https://crrev.com/aa3f382c73bfa8d01efb096b30d590efd5856c77/media/base/video_util_unittest.cc

Comment 11 by m...@chromium.org, Aug 29 2017

Blockedon: 760348

Comment 12 by m...@chromium.org, Aug 29 2017

Blockedon: 760351
The NextAction date has arrived: 2017-08-30

Comment 14 by m...@chromium.org, Sep 1 2017

Blocking: 760251
Project Member

Comment 15 by bugdroid1@chromium.org, Sep 1 2017

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

commit d70094cd62f6ad2482f66734d61845ded77d58bb
Author: Yuri Wiitala <miu@chromium.org>
Date: Fri Sep 01 23:22:29 2017

Video Capture: Support for populating frames via writable Mojo shmem.

To support the migration of tab capture into the VIZ component, it was
necessary to expand the pool's GetHandleForInterProcessTransit()
functionality to provide a writable Mojo shared memory handle (before it
was read-only).

In addition, to avoid mapping memory twice in the same process (where
the video frames are being produced), this change adds a new class,
media::SharedMemoryHandleProvider that micro-manages the mapping into
process memory only while it is really needed. Both
media::SharedMemoryBufferTracker and the code in
receiver_media_to_mojo_adapter.cc have been changed to use this to
solve the same problem in both code paths.

Bug:  754872 ,  545238 
Change-Id: Id77e9be1151d2fd6482223e9698f541afe504a73
Reviewed-on: https://chromium-review.googlesource.com/639670
Commit-Queue: Yuri Wiitala <miu@chromium.org>
Reviewed-by: Christian Fremerey <chfremer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#499336}
[modify] https://crrev.com/d70094cd62f6ad2482f66734d61845ded77d58bb/content/browser/renderer_host/media/video_capture_controller.cc
[modify] https://crrev.com/d70094cd62f6ad2482f66734d61845ded77d58bb/content/browser/renderer_host/media/video_capture_gpu_jpeg_decoder.cc
[modify] https://crrev.com/d70094cd62f6ad2482f66734d61845ded77d58bb/media/capture/BUILD.gn
[modify] https://crrev.com/d70094cd62f6ad2482f66734d61845ded77d58bb/media/capture/content/thread_safe_capture_oracle.cc
[modify] https://crrev.com/d70094cd62f6ad2482f66734d61845ded77d58bb/media/capture/content/thread_safe_capture_oracle.h
[modify] https://crrev.com/d70094cd62f6ad2482f66734d61845ded77d58bb/media/capture/video/fake_video_capture_device_unittest.cc
[delete] https://crrev.com/f961510660b4fef0508edcd18025422c3eb0a60d/media/capture/video/shared_memory_buffer_handle.cc
[delete] https://crrev.com/f961510660b4fef0508edcd18025422c3eb0a60d/media/capture/video/shared_memory_buffer_handle.h
[modify] https://crrev.com/d70094cd62f6ad2482f66734d61845ded77d58bb/media/capture/video/shared_memory_buffer_tracker.cc
[modify] https://crrev.com/d70094cd62f6ad2482f66734d61845ded77d58bb/media/capture/video/shared_memory_buffer_tracker.h
[add] https://crrev.com/d70094cd62f6ad2482f66734d61845ded77d58bb/media/capture/video/shared_memory_handle_provider.cc
[add] https://crrev.com/d70094cd62f6ad2482f66734d61845ded77d58bb/media/capture/video/shared_memory_handle_provider.h
[modify] https://crrev.com/d70094cd62f6ad2482f66734d61845ded77d58bb/media/capture/video/video_capture_buffer_handle.h
[modify] https://crrev.com/d70094cd62f6ad2482f66734d61845ded77d58bb/media/capture/video/video_capture_buffer_pool.h
[modify] https://crrev.com/d70094cd62f6ad2482f66734d61845ded77d58bb/media/capture/video/video_capture_buffer_pool_impl.cc
[modify] https://crrev.com/d70094cd62f6ad2482f66734d61845ded77d58bb/media/capture/video/video_capture_buffer_pool_impl.h
[modify] https://crrev.com/d70094cd62f6ad2482f66734d61845ded77d58bb/media/capture/video/video_capture_buffer_tracker.h
[modify] https://crrev.com/d70094cd62f6ad2482f66734d61845ded77d58bb/media/capture/video/video_capture_device.h
[modify] https://crrev.com/d70094cd62f6ad2482f66734d61845ded77d58bb/media/capture/video/video_capture_device_client.cc
[modify] https://crrev.com/d70094cd62f6ad2482f66734d61845ded77d58bb/services/video_capture/public/cpp/receiver_media_to_mojo_adapter.cc
[modify] https://crrev.com/d70094cd62f6ad2482f66734d61845ded77d58bb/services/video_capture/receiver_mojo_to_media_adapter.cc

Project Member

Comment 16 by bugdroid1@chromium.org, Sep 2 2017

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

commit 98b0accbaa07c44d414b594b0cb13067f0c17ccf
Author: Ian Clelland <iclelland@chromium.org>
Date: Sat Sep 02 12:54:34 2017

Revert "Video Capture: Support for populating frames via writable Mojo shmem."

This reverts commit d70094cd62f6ad2482f66734d61845ded77d58bb.

Reason for revert: Causes test failures on several windows 7 and 10 builders.

See https://uberchromegw.corp.google.com/i/chromium.win/builders/Win7%20%2832%29%20Tests
https://uberchromegw.corp.google.com/i/chromium.win/builders/Win%207%20Tests%20x64%20%281%29
https://uberchromegw.corp.google.com/i/chromium.win/builders/Win10%20Tests%20x64
https://uberchromegw.corp.google.com/i/chromium.win/builders/Win7%20Tests%20%28dbg%29%281%29
https://uberchromegw.corp.google.com/i/chromium.win/builders/Win7%20Tests%20%281%29


These tests started failing with this CL:
CastStreamingApiTest.Basics
TabCaptureApiTest.CaptureInSplitIncognitoMode
CastStreamingApiTest.StopNoStart
CastStreamingApiTest.Stats
CastStreamingApiTest.BadLogging
TabCaptureApiTest.Constraints
CastStreamingApiTest.DestinationNotSet
TabCaptureApiTest.ApiTests


Original change's description:
> Video Capture: Support for populating frames via writable Mojo shmem.
> 
> To support the migration of tab capture into the VIZ component, it was
> necessary to expand the pool's GetHandleForInterProcessTransit()
> functionality to provide a writable Mojo shared memory handle (before it
> was read-only).
> 
> In addition, to avoid mapping memory twice in the same process (where
> the video frames are being produced), this change adds a new class,
> media::SharedMemoryHandleProvider that micro-manages the mapping into
> process memory only while it is really needed. Both
> media::SharedMemoryBufferTracker and the code in
> receiver_media_to_mojo_adapter.cc have been changed to use this to
> solve the same problem in both code paths.
> 
> Bug:  754872 ,  545238 
> Change-Id: Id77e9be1151d2fd6482223e9698f541afe504a73
> Reviewed-on: https://chromium-review.googlesource.com/639670
> Commit-Queue: Yuri Wiitala <miu@chromium.org>
> Reviewed-by: Christian Fremerey <chfremer@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#499336}

TBR=miu@chromium.org,chfremer@chromium.org

Change-Id: I474d5a88b1ba79067aa92abc0572bca318079e39
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug:  754872 ,  545238 
Reviewed-on: https://chromium-review.googlesource.com/648614
Reviewed-by: Ian Clelland <iclelland@chromium.org>
Commit-Queue: Ian Clelland <iclelland@chromium.org>
Cr-Commit-Position: refs/heads/master@{#499395}
[modify] https://crrev.com/98b0accbaa07c44d414b594b0cb13067f0c17ccf/content/browser/renderer_host/media/video_capture_controller.cc
[modify] https://crrev.com/98b0accbaa07c44d414b594b0cb13067f0c17ccf/content/browser/renderer_host/media/video_capture_gpu_jpeg_decoder.cc
[modify] https://crrev.com/98b0accbaa07c44d414b594b0cb13067f0c17ccf/media/capture/BUILD.gn
[modify] https://crrev.com/98b0accbaa07c44d414b594b0cb13067f0c17ccf/media/capture/content/thread_safe_capture_oracle.cc
[modify] https://crrev.com/98b0accbaa07c44d414b594b0cb13067f0c17ccf/media/capture/content/thread_safe_capture_oracle.h
[modify] https://crrev.com/98b0accbaa07c44d414b594b0cb13067f0c17ccf/media/capture/video/fake_video_capture_device_unittest.cc
[add] https://crrev.com/98b0accbaa07c44d414b594b0cb13067f0c17ccf/media/capture/video/shared_memory_buffer_handle.cc
[add] https://crrev.com/98b0accbaa07c44d414b594b0cb13067f0c17ccf/media/capture/video/shared_memory_buffer_handle.h
[modify] https://crrev.com/98b0accbaa07c44d414b594b0cb13067f0c17ccf/media/capture/video/shared_memory_buffer_tracker.cc
[modify] https://crrev.com/98b0accbaa07c44d414b594b0cb13067f0c17ccf/media/capture/video/shared_memory_buffer_tracker.h
[delete] https://crrev.com/d30c88700794f170cfb85cc7205cde01cd27caf5/media/capture/video/shared_memory_handle_provider.cc
[delete] https://crrev.com/d30c88700794f170cfb85cc7205cde01cd27caf5/media/capture/video/shared_memory_handle_provider.h
[modify] https://crrev.com/98b0accbaa07c44d414b594b0cb13067f0c17ccf/media/capture/video/video_capture_buffer_handle.h
[modify] https://crrev.com/98b0accbaa07c44d414b594b0cb13067f0c17ccf/media/capture/video/video_capture_buffer_pool.h
[modify] https://crrev.com/98b0accbaa07c44d414b594b0cb13067f0c17ccf/media/capture/video/video_capture_buffer_pool_impl.cc
[modify] https://crrev.com/98b0accbaa07c44d414b594b0cb13067f0c17ccf/media/capture/video/video_capture_buffer_pool_impl.h
[modify] https://crrev.com/98b0accbaa07c44d414b594b0cb13067f0c17ccf/media/capture/video/video_capture_buffer_tracker.h
[modify] https://crrev.com/98b0accbaa07c44d414b594b0cb13067f0c17ccf/media/capture/video/video_capture_device.h
[modify] https://crrev.com/98b0accbaa07c44d414b594b0cb13067f0c17ccf/media/capture/video/video_capture_device_client.cc
[modify] https://crrev.com/98b0accbaa07c44d414b594b0cb13067f0c17ccf/services/video_capture/public/cpp/receiver_media_to_mojo_adapter.cc
[modify] https://crrev.com/98b0accbaa07c44d414b594b0cb13067f0c17ccf/services/video_capture/receiver_mojo_to_media_adapter.cc

Project Member

Comment 17 by bugdroid1@chromium.org, Sep 3 2017

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

commit f08627c6c435e0bb3369325563465933955bc71e
Author: Yuri Wiitala <miu@chromium.org>
Date: Sun Sep 03 02:00:22 2017

[Reland] Video Capture: Support for populating frames via writable Mojo shmem.

Reland notes: For some odd reason, when callbacks are destroyed on
Windows builds before having been run, the destructors of the bound
objects are being called in left-to-right order. This is the opposite of
all other platforms, which calls destructors in right-to-left order.
Since our implementation is sensitive to the ordering, this reland adds
a wrapping of the arguments in a helper struct, whose destructor ensures
that everything executes in the required order.

-----------------------

To support the migration of tab capture into the VIZ component, it was
necessary to expand the pool's GetHandleForInterProcessTransit()
functionality to provide a writable Mojo shared memory handle (before it
was read-only).

In addition, to avoid mapping memory twice in the same process (where
the video frames are being produced), this change adds a new class,
media::SharedMemoryHandleProvider that micro-manages the mapping into
process memory only while it is really needed. Both
media::SharedMemoryBufferTracker and the code in
receiver_media_to_mojo_adapter.cc have been changed to use this to
solve the same problem in both code paths.

TBR=chfremer@chromium.org

Bug:  754872 ,  545238 
Change-Id: Ib86247b0444ec7c7d105da160d8c3f381f167735
Reviewed-on: https://chromium-review.googlesource.com/647411
Commit-Queue: Yuri Wiitala <miu@chromium.org>
Reviewed-by: Yuri Wiitala <miu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#499407}
[modify] https://crrev.com/f08627c6c435e0bb3369325563465933955bc71e/content/browser/renderer_host/media/video_capture_controller.cc
[modify] https://crrev.com/f08627c6c435e0bb3369325563465933955bc71e/content/browser/renderer_host/media/video_capture_gpu_jpeg_decoder.cc
[modify] https://crrev.com/f08627c6c435e0bb3369325563465933955bc71e/media/capture/BUILD.gn
[modify] https://crrev.com/f08627c6c435e0bb3369325563465933955bc71e/media/capture/content/thread_safe_capture_oracle.cc
[modify] https://crrev.com/f08627c6c435e0bb3369325563465933955bc71e/media/capture/content/thread_safe_capture_oracle.h
[modify] https://crrev.com/f08627c6c435e0bb3369325563465933955bc71e/media/capture/video/fake_video_capture_device_unittest.cc
[delete] https://crrev.com/e3cd3b6343a0282ea33bbf9b911060e39d2625d9/media/capture/video/shared_memory_buffer_handle.cc
[delete] https://crrev.com/e3cd3b6343a0282ea33bbf9b911060e39d2625d9/media/capture/video/shared_memory_buffer_handle.h
[modify] https://crrev.com/f08627c6c435e0bb3369325563465933955bc71e/media/capture/video/shared_memory_buffer_tracker.cc
[modify] https://crrev.com/f08627c6c435e0bb3369325563465933955bc71e/media/capture/video/shared_memory_buffer_tracker.h
[add] https://crrev.com/f08627c6c435e0bb3369325563465933955bc71e/media/capture/video/shared_memory_handle_provider.cc
[add] https://crrev.com/f08627c6c435e0bb3369325563465933955bc71e/media/capture/video/shared_memory_handle_provider.h
[modify] https://crrev.com/f08627c6c435e0bb3369325563465933955bc71e/media/capture/video/video_capture_buffer_handle.h
[modify] https://crrev.com/f08627c6c435e0bb3369325563465933955bc71e/media/capture/video/video_capture_buffer_pool.h
[modify] https://crrev.com/f08627c6c435e0bb3369325563465933955bc71e/media/capture/video/video_capture_buffer_pool_impl.cc
[modify] https://crrev.com/f08627c6c435e0bb3369325563465933955bc71e/media/capture/video/video_capture_buffer_pool_impl.h
[modify] https://crrev.com/f08627c6c435e0bb3369325563465933955bc71e/media/capture/video/video_capture_buffer_tracker.h
[modify] https://crrev.com/f08627c6c435e0bb3369325563465933955bc71e/media/capture/video/video_capture_device.h
[modify] https://crrev.com/f08627c6c435e0bb3369325563465933955bc71e/media/capture/video/video_capture_device_client.cc
[modify] https://crrev.com/f08627c6c435e0bb3369325563465933955bc71e/services/video_capture/public/cpp/receiver_media_to_mojo_adapter.cc
[modify] https://crrev.com/f08627c6c435e0bb3369325563465933955bc71e/services/video_capture/receiver_mojo_to_media_adapter.cc

Project Member

Comment 18 by bugdroid1@chromium.org, Sep 6 2017

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

commit b9ad27a485e6c86c9a953686821492c6d8549e1e
Author: Yuri Wiitala <miu@chromium.org>
Date: Wed Sep 06 19:13:50 2017

Tab Capture in VIZ: CopyOutputRequest/Result API changes.

Simplified creation of requests and sending of results to support the
effort to move tab/desktop capture into the VIZ component. The high-
level philosophy here is for clients to get exactly the result type they
ask for, matched to their use case. For example, one-off snapshots need
scaled SkBitmaps that are immediately ready for use, while layer
animations only need a texture reference to assign to an animated layer.
Furthermore, clients should not be burdened with having to deal with ALL
of the possible separate storage/access or ownership semantics that are
specific to whichever DirectRenderer happened to generate the results.

Summary of changes:

CopyOutputRequest: 1) Removed pre-C++11-style CreateXYZ() methods in
favor of a simple ctor. 2) Removed SendXYZ() methods in favor of a
single SendResult() method that works with the new polymorphic
CopyOutputResults. 3) Replaced CreateEmptyRequest() with
CreateStubForTesting(), since non-test code should never create empty
requests. 4) Add ResultFormat enum to allow clients to request exactly
what they should get, rather than be burdened with coding for all
possible result formats.

CopyOutputResult: Common accessor API, but each DirectRenderer impl that
executes copy requests can use their own subclass impl(s) to manage
their own special result storage/access and ownership semantics and
provide auto-format conversions where it makes sense.

Updated mojo IDL, struct traits, client code, and unit tests to match
the API changes.

Bug:  754872 , 758057, 644851,  759310 
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel
Change-Id: Ia309e261a92e05a475a35732ba6df3497366478d
Reviewed-on: https://chromium-review.googlesource.com/637003
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: David Reveman <reveman@chromium.org>
Reviewed-by: ccameron chromium <ccameron@chromium.org>
Reviewed-by: Alexandre Elias <aelias@chromium.org>
Reviewed-by: Fady Samuel <fsamuel@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Sergey Ulanov <sergeyu@chromium.org>
Reviewed-by: enne <enne@chromium.org>
Commit-Queue: Yuri Wiitala <miu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#500033}
[modify] https://crrev.com/b9ad27a485e6c86c9a953686821492c6d8549e1e/ash/rotator/screen_rotation_animator.cc
[modify] https://crrev.com/b9ad27a485e6c86c9a953686821492c6d8549e1e/cc/ipc/copy_output_result.mojom
[modify] https://crrev.com/b9ad27a485e6c86c9a953686821492c6d8549e1e/cc/ipc/copy_output_result_struct_traits.cc
[modify] https://crrev.com/b9ad27a485e6c86c9a953686821492c6d8549e1e/cc/ipc/copy_output_result_struct_traits.h
[modify] https://crrev.com/b9ad27a485e6c86c9a953686821492c6d8549e1e/cc/ipc/struct_traits_unittest.cc
[modify] https://crrev.com/b9ad27a485e6c86c9a953686821492c6d8549e1e/cc/layers/layer.cc
[modify] https://crrev.com/b9ad27a485e6c86c9a953686821492c6d8549e1e/cc/layers/layer_unittest.cc
[modify] https://crrev.com/b9ad27a485e6c86c9a953686821492c6d8549e1e/cc/output/direct_renderer.cc
[modify] https://crrev.com/b9ad27a485e6c86c9a953686821492c6d8549e1e/cc/output/direct_renderer.h
[modify] https://crrev.com/b9ad27a485e6c86c9a953686821492c6d8549e1e/cc/output/software_renderer.cc
[modify] https://crrev.com/b9ad27a485e6c86c9a953686821492c6d8549e1e/cc/output/software_renderer.h
[modify] https://crrev.com/b9ad27a485e6c86c9a953686821492c6d8549e1e/cc/output/software_renderer_unittest.cc
[modify] https://crrev.com/b9ad27a485e6c86c9a953686821492c6d8549e1e/cc/output/vulkan_renderer.cc
[modify] https://crrev.com/b9ad27a485e6c86c9a953686821492c6d8549e1e/cc/output/vulkan_renderer.h
[modify] https://crrev.com/b9ad27a485e6c86c9a953686821492c6d8549e1e/cc/quads/render_pass_unittest.cc
[modify] https://crrev.com/b9ad27a485e6c86c9a953686821492c6d8549e1e/cc/test/layer_test_common.cc
[modify] https://crrev.com/b9ad27a485e6c86c9a953686821492c6d8549e1e/cc/test/layer_tree_pixel_test.cc
[modify] https://crrev.com/b9ad27a485e6c86c9a953686821492c6d8549e1e/cc/test/layer_tree_pixel_test.h
[modify] https://crrev.com/b9ad27a485e6c86c9a953686821492c6d8549e1e/cc/test/pixel_test.cc
[modify] https://crrev.com/b9ad27a485e6c86c9a953686821492c6d8549e1e/cc/trees/layer_tree_host_common_unittest.cc
[modify] https://crrev.com/b9ad27a485e6c86c9a953686821492c6d8549e1e/cc/trees/layer_tree_host_impl_unittest.cc
[modify] https://crrev.com/b9ad27a485e6c86c9a953686821492c6d8549e1e/cc/trees/layer_tree_host_pixeltest_readback.cc
[modify] https://crrev.com/b9ad27a485e6c86c9a953686821492c6d8549e1e/cc/trees/layer_tree_host_unittest.cc
[modify] https://crrev.com/b9ad27a485e6c86c9a953686821492c6d8549e1e/cc/trees/layer_tree_host_unittest_copyrequest.cc
[modify] https://crrev.com/b9ad27a485e6c86c9a953686821492c6d8549e1e/cc/trees/occlusion_tracker_unittest.cc
[modify] https://crrev.com/b9ad27a485e6c86c9a953686821492c6d8549e1e/components/exo/pointer.cc
[modify] https://crrev.com/b9ad27a485e6c86c9a953686821492c6d8549e1e/components/viz/OWNERS
[modify] https://crrev.com/b9ad27a485e6c86c9a953686821492c6d8549e1e/components/viz/common/quads/copy_output_request.cc
[modify] https://crrev.com/b9ad27a485e6c86c9a953686821492c6d8549e1e/components/viz/common/quads/copy_output_request.h
[modify] https://crrev.com/b9ad27a485e6c86c9a953686821492c6d8549e1e/components/viz/common/quads/copy_output_result.cc
[modify] https://crrev.com/b9ad27a485e6c86c9a953686821492c6d8549e1e/components/viz/common/quads/copy_output_result.h
[modify] https://crrev.com/b9ad27a485e6c86c9a953686821492c6d8549e1e/components/viz/service/display/display_unittest.cc
[modify] https://crrev.com/b9ad27a485e6c86c9a953686821492c6d8549e1e/components/viz/service/display/gl_renderer.cc
[modify] https://crrev.com/b9ad27a485e6c86c9a953686821492c6d8549e1e/components/viz/service/display/gl_renderer.h
[modify] https://crrev.com/b9ad27a485e6c86c9a953686821492c6d8549e1e/components/viz/service/display/gl_renderer_unittest.cc
[modify] https://crrev.com/b9ad27a485e6c86c9a953686821492c6d8549e1e/components/viz/service/display/skia_renderer.cc
[modify] https://crrev.com/b9ad27a485e6c86c9a953686821492c6d8549e1e/components/viz/service/display/skia_renderer.h
[modify] https://crrev.com/b9ad27a485e6c86c9a953686821492c6d8549e1e/components/viz/service/display/surface_aggregator.cc
[modify] https://crrev.com/b9ad27a485e6c86c9a953686821492c6d8549e1e/components/viz/service/display/surface_aggregator_unittest.cc
[modify] https://crrev.com/b9ad27a485e6c86c9a953686821492c6d8549e1e/components/viz/service/frame_sinks/compositor_frame_sink_support_unittest.cc
[modify] https://crrev.com/b9ad27a485e6c86c9a953686821492c6d8549e1e/components/viz/service/surfaces/surface.cc
[modify] https://crrev.com/b9ad27a485e6c86c9a953686821492c6d8549e1e/components/viz/service/surfaces/surface_unittest.cc
[modify] https://crrev.com/b9ad27a485e6c86c9a953686821492c6d8549e1e/content/browser/compositor/surface_utils.cc
[modify] https://crrev.com/b9ad27a485e6c86c9a953686821492c6d8549e1e/content/browser/media/capture/aura_window_capture_machine.cc
[modify] https://crrev.com/b9ad27a485e6c86c9a953686821492c6d8549e1e/content/browser/renderer_host/delegated_frame_host.cc
[modify] https://crrev.com/b9ad27a485e6c86c9a953686821492c6d8549e1e/content/browser/renderer_host/render_widget_host_view_android.cc
[modify] https://crrev.com/b9ad27a485e6c86c9a953686821492c6d8549e1e/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc
[modify] https://crrev.com/b9ad27a485e6c86c9a953686821492c6d8549e1e/content/browser/renderer_host/render_widget_host_view_child_frame.cc
[modify] https://crrev.com/b9ad27a485e6c86c9a953686821492c6d8549e1e/content/renderer/gpu/render_widget_compositor.cc
[modify] https://crrev.com/b9ad27a485e6c86c9a953686821492c6d8549e1e/remoting/host/chromeos/aura_desktop_capturer.cc
[modify] https://crrev.com/b9ad27a485e6c86c9a953686821492c6d8549e1e/remoting/host/chromeos/aura_desktop_capturer_unittest.cc
[modify] https://crrev.com/b9ad27a485e6c86c9a953686821492c6d8549e1e/services/viz/public/cpp/compositing/copy_output_request_struct_traits.cc
[modify] https://crrev.com/b9ad27a485e6c86c9a953686821492c6d8549e1e/services/viz/public/cpp/compositing/copy_output_request_struct_traits.h
[modify] https://crrev.com/b9ad27a485e6c86c9a953686821492c6d8549e1e/services/viz/public/cpp/compositing/struct_traits_unittest.cc
[modify] https://crrev.com/b9ad27a485e6c86c9a953686821492c6d8549e1e/services/viz/public/interfaces/compositing/copy_output_request.mojom
[modify] https://crrev.com/b9ad27a485e6c86c9a953686821492c6d8549e1e/ui/android/delegated_frame_host_android.cc
[modify] https://crrev.com/b9ad27a485e6c86c9a953686821492c6d8549e1e/ui/android/delegated_frame_host_android.h
[modify] https://crrev.com/b9ad27a485e6c86c9a953686821492c6d8549e1e/ui/compositor/layer_unittest.cc
[modify] https://crrev.com/b9ad27a485e6c86c9a953686821492c6d8549e1e/ui/snapshot/snapshot_android.cc
[modify] https://crrev.com/b9ad27a485e6c86c9a953686821492c6d8549e1e/ui/snapshot/snapshot_async.cc
[modify] https://crrev.com/b9ad27a485e6c86c9a953686821492c6d8549e1e/ui/snapshot/snapshot_aura.cc

Project Member

Comment 19 by bugdroid1@chromium.org, Sep 6 2017

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

commit af16f8a94830dbbab27a6b285fe9867b7b0d0ef9
Author: Yuri Wiitala <miu@chromium.org>
Date: Wed Sep 06 23:54:08 2017

VCOracle/ResolutionChooser: Mutable constraints (after construction).

Breaks the assumption of fixed constraints (min/max resolution, frame
rate, etc.) in order to support the future impl of tab capture in VIZ.
Instead of fixed constraints being passed in the ctors, they are instead
set (and changeable) via some new setter methods.

At construction time, CaptureResolutionChooser will provide a fixed
"default capture size" that will not change until SetConstraints() and
SetSourceSize() have been called. All clients should be calling these
two methods before querying the CaptureResolutionChooser anyway
(I've confirmed this by checking all call points). Thus, no existing
uses of CaptureResolutionChooser should see any behavior change.

As part of this, the constraints computation for determining min/max
resolution and aspect ratio setting was moved to a new
media::VideoCaptureParams::SuggestConstraints() method. This allows the
logic to be shared from two places (desktop_capture_device.cc and
thread_safe_capture_oracle.cc). Added missing unit testing for this
logic.

Bug:  754872 
Change-Id: I1caef74cdf35d46ec4dc70ad4e6dad8303d55a7e
Reviewed-on: https://chromium-review.googlesource.com/644586
Commit-Queue: Yuri Wiitala <miu@chromium.org>
Reviewed-by: Xiangjun Zhang <xjz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#500141}
[modify] https://crrev.com/af16f8a94830dbbab27a6b285fe9867b7b0d0ef9/content/browser/media/capture/desktop_capture_device.cc
[modify] https://crrev.com/af16f8a94830dbbab27a6b285fe9867b7b0d0ef9/media/capture/BUILD.gn
[modify] https://crrev.com/af16f8a94830dbbab27a6b285fe9867b7b0d0ef9/media/capture/content/animated_content_sampler.cc
[modify] https://crrev.com/af16f8a94830dbbab27a6b285fe9867b7b0d0ef9/media/capture/content/animated_content_sampler.h
[modify] https://crrev.com/af16f8a94830dbbab27a6b285fe9867b7b0d0ef9/media/capture/content/capture_resolution_chooser.cc
[modify] https://crrev.com/af16f8a94830dbbab27a6b285fe9867b7b0d0ef9/media/capture/content/capture_resolution_chooser.h
[modify] https://crrev.com/af16f8a94830dbbab27a6b285fe9867b7b0d0ef9/media/capture/content/capture_resolution_chooser_unittest.cc
[modify] https://crrev.com/af16f8a94830dbbab27a6b285fe9867b7b0d0ef9/media/capture/content/thread_safe_capture_oracle.cc
[modify] https://crrev.com/af16f8a94830dbbab27a6b285fe9867b7b0d0ef9/media/capture/content/video_capture_oracle.cc
[modify] https://crrev.com/af16f8a94830dbbab27a6b285fe9867b7b0d0ef9/media/capture/content/video_capture_oracle.h
[modify] https://crrev.com/af16f8a94830dbbab27a6b285fe9867b7b0d0ef9/media/capture/content/video_capture_oracle_unittest.cc
[modify] https://crrev.com/af16f8a94830dbbab27a6b285fe9867b7b0d0ef9/media/capture/video_capture_types.cc
[modify] https://crrev.com/af16f8a94830dbbab27a6b285fe9867b7b0d0ef9/media/capture/video_capture_types.h
[add] https://crrev.com/af16f8a94830dbbab27a6b285fe9867b7b0d0ef9/media/capture/video_capture_types_unittest.cc

Comment 20 by m...@chromium.org, Sep 11 2017

Blocking: 517714

Comment 21 by kbr@chromium.org, Sep 16 2017

Blockedon: 753640

Comment 22 by kbr@chromium.org, Sep 16 2017

Cc: kbr@chromium.org
Note: while writing new tests for RenderWidgetHostImpl::GetSnapshotFromBrowser a new crash was seen, presumably related to https://chromium-review.googlesource.com/644586 , which is detailed in https://bugs.chromium.org/p/chromium/issues/detail?id=753640#c9 .

Project Member

Comment 23 by bugdroid1@chromium.org, Sep 21 2017

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

commit a757f6ec69794ab39a3d7f3e18d718bc861252f9
Author: Yuri Wiitala <miu@chromium.org>
Date: Thu Sep 21 23:22:44 2017

GLHelper: Reusable fixed-ratio scaling and YUV-readback pipelines.

Re-wires the API and internals of GLHelperScaling (and
GLHelper::ScalerInterface and GLHelper::YUVReadbackInterface) to allow
client code to create fixed-ratio scaling pipelines. Callers can then
request scaling of any subset of the output space. This is just like the
skia::ImageOperations::Resize() API.

This is a prerequisite need for the referenced crbugs (below).

Rationale: In the old API, callers had to specify exact source and
destination sizes upfront; and fully reconstruct pipelines whenever
either changed. In addition, the old API required whole-number source
rect coordinates; but this prevented using many scaling ratios (e.g.,
3:1) that require sampling from non-whole-numbered source rect
coordinates.

Much of this change is simply plumbing-throught the API changes
everywhere. However, the following were mostly rewritten:

1. [gl_helper_scaling.cc] ScalerImpl now back-computes the source
sampling rect based on the requested result rect. It also works
backwards through the "ScalerImpl chain" to ensure minimaly-sized
intermediate textures are produced.

2. [gl_helper.cc ] YUVReadbackImpl and YUVReadback_MRT were simplified
and able to be merged into one class.

Bug:  760348 ,  754872 
Change-Id: Iba3ed5cf504eeed69eb115b4c38d031db47bebcc
Reviewed-on: https://chromium-review.googlesource.com/669918
Commit-Queue: Yuri Wiitala <miu@chromium.org>
Reviewed-by: Xiangjun Zhang <xjz@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Reviewed-by: Fady Samuel <fsamuel@chromium.org>
Cr-Commit-Position: refs/heads/master@{#503608}
[modify] https://crrev.com/a757f6ec69794ab39a3d7f3e18d718bc861252f9/components/viz/common/gl_helper.cc
[modify] https://crrev.com/a757f6ec69794ab39a3d7f3e18d718bc861252f9/components/viz/common/gl_helper.h
[modify] https://crrev.com/a757f6ec69794ab39a3d7f3e18d718bc861252f9/components/viz/common/gl_helper_benchmark.cc
[modify] https://crrev.com/a757f6ec69794ab39a3d7f3e18d718bc861252f9/components/viz/common/gl_helper_scaling.cc
[modify] https://crrev.com/a757f6ec69794ab39a3d7f3e18d718bc861252f9/components/viz/common/gl_helper_scaling.h
[modify] https://crrev.com/a757f6ec69794ab39a3d7f3e18d718bc861252f9/components/viz/common/gl_helper_unittest.cc
[modify] https://crrev.com/a757f6ec69794ab39a3d7f3e18d718bc861252f9/components/viz/common/yuv_readback_unittest.cc
[modify] https://crrev.com/a757f6ec69794ab39a3d7f3e18d718bc861252f9/content/browser/compositor/surface_utils.cc
[modify] https://crrev.com/a757f6ec69794ab39a3d7f3e18d718bc861252f9/content/browser/media/capture/aura_window_capture_machine.cc
[modify] https://crrev.com/a757f6ec69794ab39a3d7f3e18d718bc861252f9/content/browser/renderer_host/delegated_frame_host.cc
[modify] https://crrev.com/a757f6ec69794ab39a3d7f3e18d718bc861252f9/content/browser/renderer_host/render_widget_host_view_android.cc

Comment 24 by m...@chromium.org, Sep 25 2017

Blocking: 768335

Comment 25 by m...@chromium.org, Sep 30 2017

Blocking: 770422

Comment 26 by m...@chromium.org, Oct 5 2017

Blocking: 771767

Comment 27 by m...@chromium.org, Oct 12 2017

Blocking: 773020

Comment 28 by m...@chromium.org, Oct 16 2017

Blocking: 766184

Comment 29 by m...@chromium.org, Nov 6 2017

Blocking: 781986
Project Member

Comment 30 by bugdroid1@chromium.org, Nov 8 2017

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

commit 1ddcb7575e7ab86a791cd84357944302762b467c
Author: Yuri Wiitala <miu@chromium.org>
Date: Wed Nov 08 23:46:21 2017

Add CapturableFrameSink interface to support tab capture in VIZ.

This is one of several patches that will introduce a new tab/desktop
video capture implementation that runs in the VIZ component.

CapturableFrameSink and CapturableFrameSink::Client interfaces are added
so that the new capture pipeline can "hook into" events of interest:
BeginFrame events, to get display timing data; and aggregated damage
events spawned from the surface aggregation process. From these events,
the rest of the implementation will make decisions as to whether to
issue a CopyOutputRequest on a Surface.

Bug:  754872 
Change-Id: Iec9e7f38b994664efb29d1bc49ceb46247aacc52
Reviewed-on: https://chromium-review.googlesource.com/757793
Reviewed-by: Fady Samuel <fsamuel@chromium.org>
Commit-Queue: Yuri Wiitala <miu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#515008}
[modify] https://crrev.com/1ddcb7575e7ab86a791cd84357944302762b467c/components/viz/service/BUILD.gn
[modify] https://crrev.com/1ddcb7575e7ab86a791cd84357944302762b467c/components/viz/service/display/surface_aggregator.cc
[modify] https://crrev.com/1ddcb7575e7ab86a791cd84357944302762b467c/components/viz/service/frame_sinks/compositor_frame_sink_impl.h
[modify] https://crrev.com/1ddcb7575e7ab86a791cd84357944302762b467c/components/viz/service/frame_sinks/compositor_frame_sink_support.cc
[modify] https://crrev.com/1ddcb7575e7ab86a791cd84357944302762b467c/components/viz/service/frame_sinks/compositor_frame_sink_support.h
[modify] https://crrev.com/1ddcb7575e7ab86a791cd84357944302762b467c/components/viz/service/frame_sinks/frame_sink_manager_impl.cc
[modify] https://crrev.com/1ddcb7575e7ab86a791cd84357944302762b467c/components/viz/service/frame_sinks/frame_sink_manager_impl.h
[modify] https://crrev.com/1ddcb7575e7ab86a791cd84357944302762b467c/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.h
[add] https://crrev.com/1ddcb7575e7ab86a791cd84357944302762b467c/components/viz/service/frame_sinks/video_capture/OWNERS
[add] https://crrev.com/1ddcb7575e7ab86a791cd84357944302762b467c/components/viz/service/frame_sinks/video_capture/capturable_frame_sink.h
[modify] https://crrev.com/1ddcb7575e7ab86a791cd84357944302762b467c/components/viz/service/surfaces/surface.cc
[modify] https://crrev.com/1ddcb7575e7ab86a791cd84357944302762b467c/components/viz/service/surfaces/surface.h

Project Member

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

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

commit 367029c7c584e9794e6952034eaec55353b2e675
Author: Yuri Wiitala <miu@chromium.org>
Date: Thu Nov 09 23:21:41 2017

InterprocessFramePool for tab/desktop capture in VIZ.

This is one of several patches that will introduce a new tab/desktop
video capture implementation that runs in the VIZ component.

This change provides a specialized VideoFrame pool that uses
media::VideoCaptureBufferPoolImpl to allocate/manage shared memory, and
then wraps the shared memory with a media::MojoSharedBufferVideoFrame so
that the video frames can be efficiently transported across processes
via mojo.

Bug:  754872 
Change-Id: Iea887fcf356bdec2d4e73e459f297ab8acb6081c
Reviewed-on: https://chromium-review.googlesource.com/759676
Commit-Queue: Yuri Wiitala <miu@chromium.org>
Reviewed-by: Xiangjun Zhang <xjz@chromium.org>
Reviewed-by: Dale Curtis <dalecurtis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#515340}
[modify] https://crrev.com/367029c7c584e9794e6952034eaec55353b2e675/components/viz/service/BUILD.gn
[add] https://crrev.com/367029c7c584e9794e6952034eaec55353b2e675/components/viz/service/frame_sinks/video_capture/DEPS
[add] https://crrev.com/367029c7c584e9794e6952034eaec55353b2e675/components/viz/service/frame_sinks/video_capture/interprocess_frame_pool.cc
[add] https://crrev.com/367029c7c584e9794e6952034eaec55353b2e675/components/viz/service/frame_sinks/video_capture/interprocess_frame_pool.h
[add] https://crrev.com/367029c7c584e9794e6952034eaec55353b2e675/components/viz/service/frame_sinks/video_capture/interprocess_frame_pool_unittest.cc

Blocking: 770833
Cc: kylec...@chromium.org

Comment 34 by m...@chromium.org, Nov 15 2017

Blocking: 785072
Project Member

Comment 35 by bugdroid1@chromium.org, Nov 16 2017

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

commit 8e90f7589544d900b867a519de76012dd697bc17
Author: Yuri Wiitala <miu@chromium.org>
Date: Thu Nov 16 21:49:07 2017

FrameSinkVideoCapturerImpl for video capture of compositor frame sinks.

Introduces the capture pipeline implementation. This is the glue between
all of the various components and actors in the system.

In an upcoming change, mojo IDL will be introduced to allow VIZ clients
to create and control FrameSinkVideoCapturers and receive a stream of
video frames.

Bug:  754872 
Change-Id: I6074f2556f49d18ed4f031f7d3a5d667d13ce49a
Reviewed-on: https://chromium-review.googlesource.com/765689
Commit-Queue: Yuri Wiitala <miu@chromium.org>
Reviewed-by: Xiangjun Zhang <xjz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#517199}
[modify] https://crrev.com/8e90f7589544d900b867a519de76012dd697bc17/components/viz/service/BUILD.gn
[modify] https://crrev.com/8e90f7589544d900b867a519de76012dd697bc17/components/viz/service/frame_sinks/compositor_frame_sink_support.cc
[modify] https://crrev.com/8e90f7589544d900b867a519de76012dd697bc17/components/viz/service/frame_sinks/compositor_frame_sink_support.h
[modify] https://crrev.com/8e90f7589544d900b867a519de76012dd697bc17/components/viz/service/frame_sinks/video_capture/capturable_frame_sink.h
[add] https://crrev.com/8e90f7589544d900b867a519de76012dd697bc17/components/viz/service/frame_sinks/video_capture/frame_sink_video_capturer_impl.cc
[add] https://crrev.com/8e90f7589544d900b867a519de76012dd697bc17/components/viz/service/frame_sinks/video_capture/frame_sink_video_capturer_impl.h
[add] https://crrev.com/8e90f7589544d900b867a519de76012dd697bc17/components/viz/service/frame_sinks/video_capture/frame_sink_video_capturer_impl_unittest.cc
[add] https://crrev.com/8e90f7589544d900b867a519de76012dd697bc17/components/viz/service/frame_sinks/video_capture/frame_sink_video_capturer_manager.h
[add] https://crrev.com/8e90f7589544d900b867a519de76012dd697bc17/components/viz/service/frame_sinks/video_capture/frame_sink_video_consumer.h
[add] https://crrev.com/8e90f7589544d900b867a519de76012dd697bc17/components/viz/service/frame_sinks/video_capture/in_flight_frame_delivery.cc
[add] https://crrev.com/8e90f7589544d900b867a519de76012dd697bc17/components/viz/service/frame_sinks/video_capture/in_flight_frame_delivery.h
[modify] https://crrev.com/8e90f7589544d900b867a519de76012dd697bc17/media/capture/content/video_capture_oracle.cc
[modify] https://crrev.com/8e90f7589544d900b867a519de76012dd697bc17/media/capture/content/video_capture_oracle.h

Comment 36 by m...@chromium.org, Nov 18 2017

Blocking: 604575

Comment 37 by m...@chromium.org, Dec 7 2017

Blockedon: 792734
Project Member

Comment 38 by bugdroid1@chromium.org, Dec 14 2017

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

commit a05fe420bafc33eab59c212de4c19a1a2c17a963
Author: Yuri Wiitala <miu@chromium.org>
Date: Thu Dec 14 23:20:41 2017

Refactor CursorRenderer for new VIZ tab/window capture impl.

In preparation for the newer capture impl, content::CursorRenderer and
content::WindowActivityTracker have been merged into a single
CursorRenderer class that monitors platform views for mouse activity.
The client interface for CursorRenderer has been simplified, with added
support for: a) Changing the view being monitored without having to re-
instantiate a new CursorRenderer; b) Rendering the mouse cursor on the
VideoFrame from any thread (to avoid unnecessary hops to the UI thread);
and c) A callback to notify when the mouse cursor in the video needs to
be updated.

As a result of this refactoring, a few minor behavioral bugs were fixed.
Now, for tab capture, the mouse cursor should hide after 2 seconds of no
movement; as was intended.

TBR=nick@chromium.org

Bug:  754872 
Change-Id: Iaab12fbd397d9034d9044e39c19a45f0cc88e9cf
Reviewed-on: https://chromium-review.googlesource.com/818730
Commit-Queue: Yuri Wiitala <miu@chromium.org>
Reviewed-by: Xiangjun Zhang <xjz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#524225}
[modify] https://crrev.com/a05fe420bafc33eab59c212de4c19a1a2c17a963/content/browser/BUILD.gn
[modify] https://crrev.com/a05fe420bafc33eab59c212de4c19a1a2c17a963/content/browser/media/capture/aura_window_capture_machine.cc
[modify] https://crrev.com/a05fe420bafc33eab59c212de4c19a1a2c17a963/content/browser/media/capture/aura_window_capture_machine.h
[modify] https://crrev.com/a05fe420bafc33eab59c212de4c19a1a2c17a963/content/browser/media/capture/cursor_renderer.cc
[modify] https://crrev.com/a05fe420bafc33eab59c212de4c19a1a2c17a963/content/browser/media/capture/cursor_renderer.h
[modify] https://crrev.com/a05fe420bafc33eab59c212de4c19a1a2c17a963/content/browser/media/capture/cursor_renderer_aura.cc
[modify] https://crrev.com/a05fe420bafc33eab59c212de4c19a1a2c17a963/content/browser/media/capture/cursor_renderer_aura.h
[modify] https://crrev.com/a05fe420bafc33eab59c212de4c19a1a2c17a963/content/browser/media/capture/cursor_renderer_aura_unittest.cc
[modify] https://crrev.com/a05fe420bafc33eab59c212de4c19a1a2c17a963/content/browser/media/capture/cursor_renderer_mac.h
[modify] https://crrev.com/a05fe420bafc33eab59c212de4c19a1a2c17a963/content/browser/media/capture/cursor_renderer_mac.mm
[modify] https://crrev.com/a05fe420bafc33eab59c212de4c19a1a2c17a963/content/browser/media/capture/cursor_renderer_mac_unittest.mm
[modify] https://crrev.com/a05fe420bafc33eab59c212de4c19a1a2c17a963/content/browser/media/capture/web_contents_video_capture_device.cc
[delete] https://crrev.com/baa8c41ce1764df4bd4fb9a02d13d0cdfdfeb963/content/browser/media/capture/window_activity_tracker.cc
[delete] https://crrev.com/baa8c41ce1764df4bd4fb9a02d13d0cdfdfeb963/content/browser/media/capture/window_activity_tracker_aura.h
[delete] https://crrev.com/baa8c41ce1764df4bd4fb9a02d13d0cdfdfeb963/content/browser/media/capture/window_activity_tracker_mac.h

Project Member

Comment 39 by bugdroid1@chromium.org, Dec 20 2017

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

commit 8d0abb09fad4ad10cde947ad31a38c8b2f9d331c
Author: Yuri Wiitala <miu@chromium.org>
Date: Wed Dec 20 01:32:39 2017

FrameSinkVideoCapturer: Ensure sizes are I420-friendly.

Two fixes that ensure the captured video sizes are I420-format-friendly:

1. The oracle can propose odd-numbered width or height, since it is not
aware of the pixel format restriction. This was causing a DCHECK()
failure in media::ComputeLetterboxRegionForI420(). Thus, simply truncate
the capture resolution to the next-lower even number.

2. CopyOutputResults can be truncated upstream, causing a result size
that might be smaller than expected. Thus, ensure the frame content is
letterboxed around the actual result, and done so at even-numbered pixel
coordinates to avoid "blurred edging" effects.

Bug:  754872 
Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel
Change-Id: Ia5fb2a54cd87febc0be2f71c2878b24616b99e25
Reviewed-on: https://chromium-review.googlesource.com/833753
Reviewed-by: Xiangjun Zhang <xjz@chromium.org>
Commit-Queue: Yuri Wiitala <miu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#525217}
[modify] https://crrev.com/8d0abb09fad4ad10cde947ad31a38c8b2f9d331c/components/viz/service/frame_sinks/video_capture/frame_sink_video_capturer_impl.cc

Project Member

Comment 40 by bugdroid1@chromium.org, Dec 21 2017

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

commit 7e72a60e7ba63c735973ab734f7904683305152d
Author: Yuri Wiitala <miu@chromium.org>
Date: Thu Dec 21 00:52:46 2017

Make CursorRenderer::IsUserInteractingWithView() thread-safe.

For the upcoming tab capture implementation replacement, the query for
user interaction status needs to be thread-safe. However, strict
synchronization is not needed. This change provides a simple lockless
solution for exposing the current "mouse move behavior" value, set by
the event handlers on the UI thread, to be readable from any thread, and
not locking on any thread.

Also, filled in missing unit testing of IsUserInteractingWithView().

Bug:  754872 
Change-Id: I3ed7d1ef4f5f7fc30bbc1361bb2e45a5c5f7f741
Reviewed-on: https://chromium-review.googlesource.com/835534
Reviewed-by: Xiangjun Zhang <xjz@chromium.org>
Commit-Queue: Yuri Wiitala <miu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#525542}
[modify] https://crrev.com/7e72a60e7ba63c735973ab734f7904683305152d/content/browser/media/capture/cursor_renderer.cc
[modify] https://crrev.com/7e72a60e7ba63c735973ab734f7904683305152d/content/browser/media/capture/cursor_renderer.h
[modify] https://crrev.com/7e72a60e7ba63c735973ab734f7904683305152d/content/browser/media/capture/cursor_renderer_aura_unittest.cc
[modify] https://crrev.com/7e72a60e7ba63c735973ab734f7904683305152d/content/browser/media/capture/cursor_renderer_mac_unittest.mm

Project Member

Comment 41 by bugdroid1@chromium.org, Dec 21 2017

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

commit 24e984d0a2cbde929a849c958b3eed66b0f28d28
Author: Yuri Wiitala <miu@chromium.org>
Date: Thu Dec 21 04:46:03 2017

Add undo capability to CursorRenderer.

For the upcoming tab capture implementation replacement, it is necessary
to be able to undo the changes being made to VideoFrames before
"returning" the frame to its source. This change adds and tests that new
functionality.

Bug:  754872 
Change-Id: I30aef805644820d2a01de1b8f6e9d1b9da341b80
Reviewed-on: https://chromium-review.googlesource.com/836147
Commit-Queue: Yuri Wiitala <miu@chromium.org>
Reviewed-by: Xiangjun Zhang <xjz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#525613}
[modify] https://crrev.com/24e984d0a2cbde929a849c958b3eed66b0f28d28/content/browser/media/capture/aura_window_capture_machine.cc
[modify] https://crrev.com/24e984d0a2cbde929a849c958b3eed66b0f28d28/content/browser/media/capture/cursor_renderer.cc
[modify] https://crrev.com/24e984d0a2cbde929a849c958b3eed66b0f28d28/content/browser/media/capture/cursor_renderer.h
[modify] https://crrev.com/24e984d0a2cbde929a849c958b3eed66b0f28d28/content/browser/media/capture/cursor_renderer_aura_unittest.cc
[modify] https://crrev.com/24e984d0a2cbde929a849c958b3eed66b0f28d28/content/browser/media/capture/cursor_renderer_mac_unittest.mm
[modify] https://crrev.com/24e984d0a2cbde929a849c958b3eed66b0f28d28/content/browser/media/capture/web_contents_video_capture_device.cc

Project Member

Comment 42 by bugdroid1@chromium.org, Jan 3 2018

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

commit ea0d94215f0b27e3e367024991251d50375379dc
Author: Sadrul Habib Chowdhury <sadrul@chromium.org>
Date: Wed Jan 03 18:03:46 2018

aura: Root-windows should have valid FrameSinkId.

The root windows should use the FrameSinkId of the compositor. In regular
aura, compositors get valid FrameSinkId from context_factory_private().
If window server is hosting viz, then use the id from that.

BUG= 754872 

Change-Id: I7b1de89f9575ebd532042ffcd0b3a8058d85f251
Reviewed-on: https://chromium-review.googlesource.com/847333
Commit-Queue: Sadrul Chowdhury <sadrul@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Yuri Wiitala <miu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#526735}
[modify] https://crrev.com/ea0d94215f0b27e3e367024991251d50375379dc/ui/aura/mus/window_tree_host_mus.cc
[modify] https://crrev.com/ea0d94215f0b27e3e367024991251d50375379dc/ui/aura/window.cc
[modify] https://crrev.com/ea0d94215f0b27e3e367024991251d50375379dc/ui/aura/window_unittest.cc

Project Member

Comment 43 by bugdroid1@chromium.org, Jan 6 2018

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

commit bb214a0ca7f64dd7b8d043280d3032f4b707c2cc
Author: Yuri Wiitala <miu@chromium.org>
Date: Sat Jan 06 04:21:18 2018

FrameSinkVideoCapturer: Mojo IDL and glue w/ FrameSinkManagerImpl.

Introduces the Mojo IDL for the new VIZ FrameSinkVideoCapturer, and
modifies viz::FrameSinkVideoCapturerImpl to implement the mojo-generated
interface.

Notable integration-related changes:

1. An interface change was made to the consumer's OnFrameCaptured()
method, to pass the elements of the captured video frame in a form that
is much more convenient for client-side use.

2. FrameSinkManager: Added a CreateVideoCapturer() method to
FrameSinkManager so that privileged clients can create instances. Added
glue for resolving compositor frame sinks, just-registered frame sinks,
and auto-terminating capture when frame sinks are unregistered.

3. Updated unit tests, adding "RunLoop.Run()" as needed to allow Mojo
method calls to propagate.

TBR=dcheng@chromium.org

Bug:  754872 
Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel
Change-Id: Ie5ad1ecbce624bd8e373bcaa212ed50a13f2a420
Reviewed-on: https://chromium-review.googlesource.com/833035
Commit-Queue: Yuri Wiitala <miu@chromium.org>
Reviewed-by: kylechar <kylechar@chromium.org>
Reviewed-by: Xiangjun Zhang <xjz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#527504}
[modify] https://crrev.com/bb214a0ca7f64dd7b8d043280d3032f4b707c2cc/components/viz/host/host_frame_sink_manager.cc
[modify] https://crrev.com/bb214a0ca7f64dd7b8d043280d3032f4b707c2cc/components/viz/host/host_frame_sink_manager.h
[modify] https://crrev.com/bb214a0ca7f64dd7b8d043280d3032f4b707c2cc/components/viz/service/BUILD.gn
[modify] https://crrev.com/bb214a0ca7f64dd7b8d043280d3032f4b707c2cc/components/viz/service/frame_sinks/frame_sink_manager_impl.cc
[modify] https://crrev.com/bb214a0ca7f64dd7b8d043280d3032f4b707c2cc/components/viz/service/frame_sinks/frame_sink_manager_impl.h
[modify] https://crrev.com/bb214a0ca7f64dd7b8d043280d3032f4b707c2cc/components/viz/service/frame_sinks/video_capture/frame_sink_video_capturer_impl.cc
[modify] https://crrev.com/bb214a0ca7f64dd7b8d043280d3032f4b707c2cc/components/viz/service/frame_sinks/video_capture/frame_sink_video_capturer_impl.h
[modify] https://crrev.com/bb214a0ca7f64dd7b8d043280d3032f4b707c2cc/components/viz/service/frame_sinks/video_capture/frame_sink_video_capturer_impl_unittest.cc
[delete] https://crrev.com/64c66d0857248bcdb35888127e9ff94b8f11a1bc/components/viz/service/frame_sinks/video_capture/frame_sink_video_consumer.h
[modify] https://crrev.com/bb214a0ca7f64dd7b8d043280d3032f4b707c2cc/components/viz/service/frame_sinks/video_capture/in_flight_frame_delivery.h
[modify] https://crrev.com/bb214a0ca7f64dd7b8d043280d3032f4b707c2cc/components/viz/test/test_frame_sink_manager.h
[modify] https://crrev.com/bb214a0ca7f64dd7b8d043280d3032f4b707c2cc/services/viz/privileged/interfaces/compositing/BUILD.gn
[modify] https://crrev.com/bb214a0ca7f64dd7b8d043280d3032f4b707c2cc/services/viz/privileged/interfaces/compositing/frame_sink_manager.mojom
[add] https://crrev.com/bb214a0ca7f64dd7b8d043280d3032f4b707c2cc/services/viz/privileged/interfaces/compositing/frame_sink_video_capture.mojom

Comment 44 by m...@chromium.org, Jan 11 2018

Blockedon: 801007
Project Member

Comment 45 by bugdroid1@chromium.org, Jan 17 2018

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

commit 55acc7988fd1aeee1904b3b914cd33787d26bc68
Author: Yuri Wiitala <miu@chromium.org>
Date: Wed Jan 17 04:38:05 2018

FSVideoCapturer: Cache display times across multiple BeginFrameSources.

Fixes occasional missing timestamp issues in OnFrameDamaged() that were
being caused by OnBeginFrame() being called for different sources. The
new scheme simply organizes the cache into a separate ring buffer per
source.

Bug:  754872 
Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel
Change-Id: I75ff9deb8dc3164f91719d358c3ca25b86043d67
Reviewed-on: https://chromium-review.googlesource.com/865828
Reviewed-by: Xiangjun Zhang <xjz@chromium.org>
Commit-Queue: Yuri Wiitala <miu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#529609}
[modify] https://crrev.com/55acc7988fd1aeee1904b3b914cd33787d26bc68/components/viz/service/frame_sinks/video_capture/frame_sink_video_capturer_impl.cc
[modify] https://crrev.com/55acc7988fd1aeee1904b3b914cd33787d26bc68/components/viz/service/frame_sinks/video_capture/frame_sink_video_capturer_impl.h
[modify] https://crrev.com/55acc7988fd1aeee1904b3b914cd33787d26bc68/components/viz/service/frame_sinks/video_capture/frame_sink_video_capturer_impl_unittest.cc

Comment 46 by m...@chromium.org, Jan 17 2018

Blocking: 695429
Project Member

Comment 47 by bugdroid1@chromium.org, Jan 18 2018

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

commit e4c92d5145d965de313adbcaffc2c1315c6ccff6
Author: Yuri Wiitala <miu@chromium.org>
Date: Thu Jan 18 01:15:58 2018

Clean-up conditional compiles and misc in InProcessVCDLauncher.

In preparation for changes to support the new VIZ-based tab capture
implementation, this patch performs a few pre-requisite clean-up tasks:

1a. Simplifies conditionally-compiled code in in_process_vcd_launcher.cc.

1b. Excludes more code from compiling (more code guarded by the
ENABLE_SCREEN_CAPTURE build flag).

2. Convert some Bind→BindOnce and Callback→OnceCallback.

3. Removed unnecessary includes from nearby files.

Bug:  754872 
Change-Id: I4bb6e6365705231fd47f67781ad70eb942c2418a
Reviewed-on: https://chromium-review.googlesource.com/861158
Reviewed-by: Christian Fremerey <chfremer@chromium.org>
Commit-Queue: Yuri Wiitala <miu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#529994}
[modify] https://crrev.com/e4c92d5145d965de313adbcaffc2c1315c6ccff6/content/browser/renderer_host/media/in_process_launched_video_capture_device.cc
[modify] https://crrev.com/e4c92d5145d965de313adbcaffc2c1315c6ccff6/content/browser/renderer_host/media/in_process_video_capture_device_launcher.cc
[modify] https://crrev.com/e4c92d5145d965de313adbcaffc2c1315c6ccff6/content/browser/renderer_host/media/in_process_video_capture_device_launcher.h
[modify] https://crrev.com/e4c92d5145d965de313adbcaffc2c1315c6ccff6/content/browser/renderer_host/media/video_capture_manager.cc

Project Member

Comment 48 by bugdroid1@chromium.org, Jan 18 2018

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

commit 5d58adb1c8abeab953ec4ac43c7858b691a7fe57
Author: Yuri Wiitala <miu@chromium.org>
Date: Thu Jan 18 23:44:05 2018

Tab/Desktop capture for VIZ: Introduce FrameSinkVideoCaptureDevice.

FrameSinkVideoCaptureDevice is the glue between VIZ screen video capture
and the video capture stack. Later changes will use this as the common
base implementation to provide VIZ-based tab, desktop, and browser
window capture.

This change only introduces new implementation, but it is not activated/
connected to anything yet (other than content_unittests).

Bug:  754872 
Change-Id: Ib1648d61ec87adea042b29178eb3b0c7652008b2
Reviewed-on: https://chromium-review.googlesource.com/872390
Commit-Queue: Yuri Wiitala <miu@chromium.org>
Reviewed-by: Antoine Labour <piman@chromium.org>
Reviewed-by: Xiangjun Zhang <xjz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#530343}
[modify] https://crrev.com/5d58adb1c8abeab953ec4ac43c7858b691a7fe57/content/browser/BUILD.gn
[modify] https://crrev.com/5d58adb1c8abeab953ec4ac43c7858b691a7fe57/content/browser/media/capture/cursor_renderer.cc
[modify] https://crrev.com/5d58adb1c8abeab953ec4ac43c7858b691a7fe57/content/browser/media/capture/cursor_renderer.h
[add] https://crrev.com/5d58adb1c8abeab953ec4ac43c7858b691a7fe57/content/browser/media/capture/frame_sink_video_capture_device.cc
[add] https://crrev.com/5d58adb1c8abeab953ec4ac43c7858b691a7fe57/content/browser/media/capture/frame_sink_video_capture_device.h
[add] https://crrev.com/5d58adb1c8abeab953ec4ac43c7858b691a7fe57/content/browser/media/capture/frame_sink_video_capture_device_unittest.cc
[modify] https://crrev.com/5d58adb1c8abeab953ec4ac43c7858b691a7fe57/content/test/BUILD.gn

Project Member

Comment 49 by bugdroid1@chromium.org, Jan 22 2018

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

commit 9d36abaf9855b5a018a52ba861fb2638750d937c
Author: Yuri Wiitala <miu@chromium.org>
Date: Mon Jan 22 20:07:09 2018

FrameSinkVideoCapturer: Fix initial refresh frame behavior.

During testing in the new tab capture impl, a behavior regression was
found, which was previously resolved in  crbug.com/704277 . This change
fixes the problem by postponing the first frame capture until the source
target is resolved AND its Surface has composited at least once.

Much of this change is around some refactoring of the existing refresh
frame requests/timer implementation to account for all refresh frame
scenarios. Also, unit tests were modified to test the modified and new
behaviors.

Bug:  785072 ,  754872 
Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel
Change-Id: Ic1cf4c49b66b6541fe7c8401545643c82cebc818
Reviewed-on: https://chromium-review.googlesource.com/877787
Reviewed-by: Xiangjun Zhang <xjz@chromium.org>
Commit-Queue: Yuri Wiitala <miu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#530963}
[modify] https://crrev.com/9d36abaf9855b5a018a52ba861fb2638750d937c/components/viz/service/frame_sinks/video_capture/frame_sink_video_capturer_impl.cc
[modify] https://crrev.com/9d36abaf9855b5a018a52ba861fb2638750d937c/components/viz/service/frame_sinks/video_capture/frame_sink_video_capturer_impl.h
[modify] https://crrev.com/9d36abaf9855b5a018a52ba861fb2638750d937c/components/viz/service/frame_sinks/video_capture/frame_sink_video_capturer_impl_unittest.cc

Project Member

Comment 50 by bugdroid1@chromium.org, Jan 25 2018

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

commit 77e19b91361effda2f4eb9f278d9e038aca58d7c
Author: Yuri Wiitala <miu@chromium.org>
Date: Thu Jan 25 02:23:58 2018

Rewrite WebContentsVideoCaptureDevice, to use new VIZ-based capture impl

Virtually all of the implementation of content::WebContentsVCD is
replaced with a minimal subclass-of-FrameSinkVCD implementation.

All existing testing that was a part of content_unittests has been
deleted. However, most of the functionality is being tested in other
subcomponents of the system now (in the VIZ world); and so the same (and
more!) functional test coverage should exist.

In addition, a suite of tests has been added to content_browsertests to
test the behavior of this capture device when running in a full browser.
Note that the --enable-features=VizDisplayCompositor flag can be added
to the command line to confirm working behavior whether the display
compositor is running in the browser process or GPU/VIZ process.

Bug:  754872 
Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel
Change-Id: I8ad741aa19387f0f27bf437ebcaa71ca3730457f
Reviewed-on: https://chromium-review.googlesource.com/879270
Commit-Queue: Yuri Wiitala <miu@chromium.org>
Reviewed-by: Christian Fremerey <chfremer@chromium.org>
Reviewed-by: Antoine Labour <piman@chromium.org>
Reviewed-by: Xiangjun Zhang <xjz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#531794}
[modify] https://crrev.com/77e19b91361effda2f4eb9f278d9e038aca58d7c/chrome/browser/extensions/api/tab_capture/tab_capture_apitest.cc
[modify] https://crrev.com/77e19b91361effda2f4eb9f278d9e038aca58d7c/chrome/test/data/extensions/api_test/tab_capture/offscreen_end_to_end.js
[modify] https://crrev.com/77e19b91361effda2f4eb9f278d9e038aca58d7c/components/viz/service/display/gl_renderer_copier.cc
[modify] https://crrev.com/77e19b91361effda2f4eb9f278d9e038aca58d7c/components/viz/service/frame_sinks/video_capture/frame_sink_video_capturer_impl.cc
[modify] https://crrev.com/77e19b91361effda2f4eb9f278d9e038aca58d7c/content/browser/media/capture/cursor_renderer.cc
[modify] https://crrev.com/77e19b91361effda2f4eb9f278d9e038aca58d7c/content/browser/media/capture/frame_sink_video_capture_device.cc
[modify] https://crrev.com/77e19b91361effda2f4eb9f278d9e038aca58d7c/content/browser/media/capture/frame_sink_video_capture_device.h
[modify] https://crrev.com/77e19b91361effda2f4eb9f278d9e038aca58d7c/content/browser/media/capture/web_contents_video_capture_device.cc
[modify] https://crrev.com/77e19b91361effda2f4eb9f278d9e038aca58d7c/content/browser/media/capture/web_contents_video_capture_device.h
[add] https://crrev.com/77e19b91361effda2f4eb9f278d9e038aca58d7c/content/browser/media/capture/web_contents_video_capture_device_browsertest.cc
[delete] https://crrev.com/4ddbad7f38c2b690f6bf2d7de250cc9deb812ced/content/browser/media/capture/web_contents_video_capture_device_unittest.cc
[modify] https://crrev.com/77e19b91361effda2f4eb9f278d9e038aca58d7c/content/browser/renderer_host/media/in_process_video_capture_device_launcher.cc
[modify] https://crrev.com/77e19b91361effda2f4eb9f278d9e038aca58d7c/content/browser/renderer_host/media/in_process_video_capture_device_launcher.h
[modify] https://crrev.com/77e19b91361effda2f4eb9f278d9e038aca58d7c/content/test/BUILD.gn

Project Member

Comment 51 by bugdroid1@chromium.org, Jan 25 2018

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

commit 5be8e1357f6169ee0b57a9c6847a82d9dd320855
Author: Yuri Wiitala <miu@chromium.org>
Date: Thu Jan 25 04:48:08 2018

Temporarily disable new content_browsertests that are flaky.

A recent change added new content_browsertests, and the tests are flaky.
Root cause analysis shows it to be caused by initial instability in the
content shell window size; and so the tests will have to account for
that before being re-enabled.

NOTRY=true
TBR=xjz@chromium.org

Bug:  754872 
Change-Id: I8017d5d6b451eaedd7c8d9803780ffa7d67327a4
Reviewed-on: https://chromium-review.googlesource.com/885821
Reviewed-by: Yuri Wiitala <miu@chromium.org>
Commit-Queue: Yuri Wiitala <miu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#531813}
[modify] https://crrev.com/5be8e1357f6169ee0b57a9c6847a82d9dd320855/content/browser/media/capture/web_contents_video_capture_device_browsertest.cc

Comment 52 by m...@chromium.org, Jan 25 2018

Blocking: 778855
Project Member

Comment 53 by bugdroid1@chromium.org, Jan 27 2018

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

commit 93f7aa878977c00c2bfebb70b7c6f2ff73dcdee0
Author: Yuri Wiitala <miu@chromium.org>
Date: Sat Jan 27 05:27:07 2018

FrameSinkVideoCapturer: Fix refresh logic for damaged sources.

Fixes a couple of issues where frame capture becomes frozen or choppy,
with the following changes:

1. Move the "source dirty" logic out of VideoCaptureOracle and into
FrameSinkVideoCapturerImpl.

2. More-agressive response to frame refresh requests (needed for
improved mouse cursor update response).

3. Remove the distinction between passive and active refreshes from
VideoCaptureOracle. FrameSinkVideoCapturer now tracks source damage, and
can execute any refresh passively when there is no damage.

4. Add logic to ensure that FrameSinkVideoCapturerImpl provides
consumers with a refresh frame whenever key events occur; such as params
changes, capture target changes, etc.; that are known to require a full
update.

5. Re-enable the content_browsertests that were disabled due to
flakiness.

Bug:  785072 ,  754872 
Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel
Change-Id: I402f3f928de61e6754e04014327421e4f6917d5f
Reviewed-on: https://chromium-review.googlesource.com/884996
Reviewed-by: Yuri Wiitala <miu@chromium.org>
Reviewed-by: Xiangjun Zhang <xjz@chromium.org>
Reviewed-by: kylechar <kylechar@chromium.org>
Cr-Commit-Position: refs/heads/master@{#532161}
[modify] https://crrev.com/93f7aa878977c00c2bfebb70b7c6f2ff73dcdee0/components/viz/service/frame_sinks/compositor_frame_sink_support.cc
[modify] https://crrev.com/93f7aa878977c00c2bfebb70b7c6f2ff73dcdee0/components/viz/service/frame_sinks/compositor_frame_sink_support.h
[modify] https://crrev.com/93f7aa878977c00c2bfebb70b7c6f2ff73dcdee0/components/viz/service/frame_sinks/video_capture/capturable_frame_sink.h
[modify] https://crrev.com/93f7aa878977c00c2bfebb70b7c6f2ff73dcdee0/components/viz/service/frame_sinks/video_capture/frame_sink_video_capturer_impl.cc
[modify] https://crrev.com/93f7aa878977c00c2bfebb70b7c6f2ff73dcdee0/components/viz/service/frame_sinks/video_capture/frame_sink_video_capturer_impl.h
[modify] https://crrev.com/93f7aa878977c00c2bfebb70b7c6f2ff73dcdee0/components/viz/service/frame_sinks/video_capture/frame_sink_video_capturer_impl_unittest.cc
[modify] https://crrev.com/93f7aa878977c00c2bfebb70b7c6f2ff73dcdee0/content/browser/media/capture/aura_window_capture_machine.cc
[modify] https://crrev.com/93f7aa878977c00c2bfebb70b7c6f2ff73dcdee0/content/browser/media/capture/web_contents_video_capture_device_browsertest.cc
[modify] https://crrev.com/93f7aa878977c00c2bfebb70b7c6f2ff73dcdee0/media/capture/content/android/screen_capture_machine_android.cc
[modify] https://crrev.com/93f7aa878977c00c2bfebb70b7c6f2ff73dcdee0/media/capture/content/screen_capture_device_core.cc
[modify] https://crrev.com/93f7aa878977c00c2bfebb70b7c6f2ff73dcdee0/media/capture/content/screen_capture_device_core.h
[modify] https://crrev.com/93f7aa878977c00c2bfebb70b7c6f2ff73dcdee0/media/capture/content/thread_safe_capture_oracle.cc
[modify] https://crrev.com/93f7aa878977c00c2bfebb70b7c6f2ff73dcdee0/media/capture/content/thread_safe_capture_oracle.h
[modify] https://crrev.com/93f7aa878977c00c2bfebb70b7c6f2ff73dcdee0/media/capture/content/video_capture_oracle.cc
[modify] https://crrev.com/93f7aa878977c00c2bfebb70b7c6f2ff73dcdee0/media/capture/content/video_capture_oracle.h
[modify] https://crrev.com/93f7aa878977c00c2bfebb70b7c6f2ff73dcdee0/media/capture/content/video_capture_oracle_unittest.cc

Project Member

Comment 54 by bugdroid1@chromium.org, Jan 27 2018

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

commit 52c31b740b1d124a4a9fa521e65ee0c0dc20b724
Author: Thomas Anderson <thomasanderson@chromium.org>
Date: Sat Jan 27 19:54:48 2018

Revert "FrameSinkVideoCapturer: Fix refresh logic for damaged sources."

This reverts commit 93f7aa878977c00c2bfebb70b7c6f2ff73dcdee0.

Reason for revert: Causes failure in WebContentsVideoCaptureDeviceBrowserTest on Linux Tests (dbg)(1)(32):
https://ci.chromium.org/buildbot/chromium.linux/Linux%20Tests%20%28dbg%29%281%29%2832%29/47651

Original change's description:
> FrameSinkVideoCapturer: Fix refresh logic for damaged sources.
> 
> Fixes a couple of issues where frame capture becomes frozen or choppy,
> with the following changes:
> 
> 1. Move the "source dirty" logic out of VideoCaptureOracle and into
> FrameSinkVideoCapturerImpl.
> 
> 2. More-agressive response to frame refresh requests (needed for
> improved mouse cursor update response).
> 
> 3. Remove the distinction between passive and active refreshes from
> VideoCaptureOracle. FrameSinkVideoCapturer now tracks source damage, and
> can execute any refresh passively when there is no damage.
> 
> 4. Add logic to ensure that FrameSinkVideoCapturerImpl provides
> consumers with a refresh frame whenever key events occur; such as params
> changes, capture target changes, etc.; that are known to require a full
> update.
> 
> 5. Re-enable the content_browsertests that were disabled due to
> flakiness.
> 
> Bug:  785072 ,  754872 
> Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel
> Change-Id: I402f3f928de61e6754e04014327421e4f6917d5f
> Reviewed-on: https://chromium-review.googlesource.com/884996
> Reviewed-by: Yuri Wiitala <miu@chromium.org>
> Reviewed-by: Xiangjun Zhang <xjz@chromium.org>
> Reviewed-by: kylechar <kylechar@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#532161}

TBR=miu@chromium.org,kylechar@chromium.org,xjz@chromium.org

Change-Id: I32fd2fb0bf1e1dc32c026198809d12ff2ecc69f1
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug:  785072 ,  754872 
Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel
Reviewed-on: https://chromium-review.googlesource.com/890380
Reviewed-by: Thomas Anderson <thomasanderson@chromium.org>
Commit-Queue: Thomas Anderson <thomasanderson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#532247}
[modify] https://crrev.com/52c31b740b1d124a4a9fa521e65ee0c0dc20b724/components/viz/service/frame_sinks/compositor_frame_sink_support.cc
[modify] https://crrev.com/52c31b740b1d124a4a9fa521e65ee0c0dc20b724/components/viz/service/frame_sinks/compositor_frame_sink_support.h
[modify] https://crrev.com/52c31b740b1d124a4a9fa521e65ee0c0dc20b724/components/viz/service/frame_sinks/video_capture/capturable_frame_sink.h
[modify] https://crrev.com/52c31b740b1d124a4a9fa521e65ee0c0dc20b724/components/viz/service/frame_sinks/video_capture/frame_sink_video_capturer_impl.cc
[modify] https://crrev.com/52c31b740b1d124a4a9fa521e65ee0c0dc20b724/components/viz/service/frame_sinks/video_capture/frame_sink_video_capturer_impl.h
[modify] https://crrev.com/52c31b740b1d124a4a9fa521e65ee0c0dc20b724/components/viz/service/frame_sinks/video_capture/frame_sink_video_capturer_impl_unittest.cc
[modify] https://crrev.com/52c31b740b1d124a4a9fa521e65ee0c0dc20b724/content/browser/media/capture/aura_window_capture_machine.cc
[modify] https://crrev.com/52c31b740b1d124a4a9fa521e65ee0c0dc20b724/content/browser/media/capture/web_contents_video_capture_device_browsertest.cc
[modify] https://crrev.com/52c31b740b1d124a4a9fa521e65ee0c0dc20b724/media/capture/content/android/screen_capture_machine_android.cc
[modify] https://crrev.com/52c31b740b1d124a4a9fa521e65ee0c0dc20b724/media/capture/content/screen_capture_device_core.cc
[modify] https://crrev.com/52c31b740b1d124a4a9fa521e65ee0c0dc20b724/media/capture/content/screen_capture_device_core.h
[modify] https://crrev.com/52c31b740b1d124a4a9fa521e65ee0c0dc20b724/media/capture/content/thread_safe_capture_oracle.cc
[modify] https://crrev.com/52c31b740b1d124a4a9fa521e65ee0c0dc20b724/media/capture/content/thread_safe_capture_oracle.h
[modify] https://crrev.com/52c31b740b1d124a4a9fa521e65ee0c0dc20b724/media/capture/content/video_capture_oracle.cc
[modify] https://crrev.com/52c31b740b1d124a4a9fa521e65ee0c0dc20b724/media/capture/content/video_capture_oracle.h
[modify] https://crrev.com/52c31b740b1d124a4a9fa521e65ee0c0dc20b724/media/capture/content/video_capture_oracle_unittest.cc

Project Member

Comment 55 by bugdroid1@chromium.org, Jan 29 2018

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

commit d26dcac0a6390fb039dee8eaec0906411164c7a9
Author: Yuri Wiitala <miu@chromium.org>
Date: Mon Jan 29 04:37:30 2018

Re-land "FrameSinkVideoCapturer: Fix refresh logic for damaged sources."

This reverts commit 52c31b740b1d124a4a9fa521e65ee0c0dc20b724, to re-land
the original CL (https://chromium-review.googlesource.com/884996). The
viz_content_browsertests were failing because of a bug in the posix
shmem impl (in base/memory/shared_memory_helper.cc) when the pool is
being run in the VIZ process. For now, the tests have been added to the
viz_content_browsertests filter file; and once the root-cause issue has
been resolved, they can be re-enabled.

TBR=xjz@chromium.org,kylechar@chromium.org

Bug:  806635 ,  785072 ,  754872 
Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel
Change-Id: I0f419ce2aee170a0fbd966ff8e10bb99c3b7067f
Reviewed-on: https://chromium-review.googlesource.com/889934
Commit-Queue: Yuri Wiitala <miu@chromium.org>
Reviewed-by: Yuri Wiitala <miu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#532322}
[modify] https://crrev.com/d26dcac0a6390fb039dee8eaec0906411164c7a9/components/viz/service/frame_sinks/compositor_frame_sink_support.cc
[modify] https://crrev.com/d26dcac0a6390fb039dee8eaec0906411164c7a9/components/viz/service/frame_sinks/compositor_frame_sink_support.h
[modify] https://crrev.com/d26dcac0a6390fb039dee8eaec0906411164c7a9/components/viz/service/frame_sinks/video_capture/capturable_frame_sink.h
[modify] https://crrev.com/d26dcac0a6390fb039dee8eaec0906411164c7a9/components/viz/service/frame_sinks/video_capture/frame_sink_video_capturer_impl.cc
[modify] https://crrev.com/d26dcac0a6390fb039dee8eaec0906411164c7a9/components/viz/service/frame_sinks/video_capture/frame_sink_video_capturer_impl.h
[modify] https://crrev.com/d26dcac0a6390fb039dee8eaec0906411164c7a9/components/viz/service/frame_sinks/video_capture/frame_sink_video_capturer_impl_unittest.cc
[modify] https://crrev.com/d26dcac0a6390fb039dee8eaec0906411164c7a9/content/browser/media/capture/aura_window_capture_machine.cc
[modify] https://crrev.com/d26dcac0a6390fb039dee8eaec0906411164c7a9/content/browser/media/capture/web_contents_video_capture_device_browsertest.cc
[modify] https://crrev.com/d26dcac0a6390fb039dee8eaec0906411164c7a9/media/capture/content/android/screen_capture_machine_android.cc
[modify] https://crrev.com/d26dcac0a6390fb039dee8eaec0906411164c7a9/media/capture/content/screen_capture_device_core.cc
[modify] https://crrev.com/d26dcac0a6390fb039dee8eaec0906411164c7a9/media/capture/content/screen_capture_device_core.h
[modify] https://crrev.com/d26dcac0a6390fb039dee8eaec0906411164c7a9/media/capture/content/thread_safe_capture_oracle.cc
[modify] https://crrev.com/d26dcac0a6390fb039dee8eaec0906411164c7a9/media/capture/content/thread_safe_capture_oracle.h
[modify] https://crrev.com/d26dcac0a6390fb039dee8eaec0906411164c7a9/media/capture/content/video_capture_oracle.cc
[modify] https://crrev.com/d26dcac0a6390fb039dee8eaec0906411164c7a9/media/capture/content/video_capture_oracle.h
[modify] https://crrev.com/d26dcac0a6390fb039dee8eaec0906411164c7a9/media/capture/content/video_capture_oracle_unittest.cc
[modify] https://crrev.com/d26dcac0a6390fb039dee8eaec0906411164c7a9/testing/buildbot/filters/viz.content_browsertests.filter

Project Member

Comment 56 by bugdroid1@chromium.org, Jan 29 2018

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

commit 13c588bc9a1e2855f1f6cba4664a1f3502c4b0ad
Author: vitaliii <vitaliii@chromium.org>
Date: Mon Jan 29 11:37:48 2018

Revert "Re-land "FrameSinkVideoCapturer: Fix refresh logic for damaged sources.""

This reverts commit d26dcac0a6390fb039dee8eaec0906411164c7a9.

Reason for revert: Seems to cause an exception (time out) on Linux ChromiumOS MSan Tests (see  crbug.com/806715 ). The original CL (the one relanded) caused this exception too.

Original change's description:
> Re-land "FrameSinkVideoCapturer: Fix refresh logic for damaged sources."
> 
> This reverts commit 52c31b740b1d124a4a9fa521e65ee0c0dc20b724, to re-land
> the original CL (https://chromium-review.googlesource.com/884996). The
> viz_content_browsertests were failing because of a bug in the posix
> shmem impl (in base/memory/shared_memory_helper.cc) when the pool is
> being run in the VIZ process. For now, the tests have been added to the
> viz_content_browsertests filter file; and once the root-cause issue has
> been resolved, they can be re-enabled.
> 
> TBR=xjz@chromium.org,kylechar@chromium.org
> 
> Bug:  806635 ,  785072 ,  754872 
> Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel
> Change-Id: I0f419ce2aee170a0fbd966ff8e10bb99c3b7067f
> Reviewed-on: https://chromium-review.googlesource.com/889934
> Commit-Queue: Yuri Wiitala <miu@chromium.org>
> Reviewed-by: Yuri Wiitala <miu@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#532322}

TBR=miu@chromium.org,kylechar@chromium.org,xjz@chromium.org

Change-Id: Ia3715ed63494598badbe85e2f418b792c952dadb
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug:  806635 ,  785072 ,  754872 ,  806715 
Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel
Reviewed-on: https://chromium-review.googlesource.com/890445
Reviewed-by: vitaliii <vitaliii@chromium.org>
Commit-Queue: vitaliii <vitaliii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#532395}
[modify] https://crrev.com/13c588bc9a1e2855f1f6cba4664a1f3502c4b0ad/components/viz/service/frame_sinks/compositor_frame_sink_support.cc
[modify] https://crrev.com/13c588bc9a1e2855f1f6cba4664a1f3502c4b0ad/components/viz/service/frame_sinks/compositor_frame_sink_support.h
[modify] https://crrev.com/13c588bc9a1e2855f1f6cba4664a1f3502c4b0ad/components/viz/service/frame_sinks/video_capture/capturable_frame_sink.h
[modify] https://crrev.com/13c588bc9a1e2855f1f6cba4664a1f3502c4b0ad/components/viz/service/frame_sinks/video_capture/frame_sink_video_capturer_impl.cc
[modify] https://crrev.com/13c588bc9a1e2855f1f6cba4664a1f3502c4b0ad/components/viz/service/frame_sinks/video_capture/frame_sink_video_capturer_impl.h
[modify] https://crrev.com/13c588bc9a1e2855f1f6cba4664a1f3502c4b0ad/components/viz/service/frame_sinks/video_capture/frame_sink_video_capturer_impl_unittest.cc
[modify] https://crrev.com/13c588bc9a1e2855f1f6cba4664a1f3502c4b0ad/content/browser/media/capture/aura_window_capture_machine.cc
[modify] https://crrev.com/13c588bc9a1e2855f1f6cba4664a1f3502c4b0ad/content/browser/media/capture/web_contents_video_capture_device_browsertest.cc
[modify] https://crrev.com/13c588bc9a1e2855f1f6cba4664a1f3502c4b0ad/media/capture/content/android/screen_capture_machine_android.cc
[modify] https://crrev.com/13c588bc9a1e2855f1f6cba4664a1f3502c4b0ad/media/capture/content/screen_capture_device_core.cc
[modify] https://crrev.com/13c588bc9a1e2855f1f6cba4664a1f3502c4b0ad/media/capture/content/screen_capture_device_core.h
[modify] https://crrev.com/13c588bc9a1e2855f1f6cba4664a1f3502c4b0ad/media/capture/content/thread_safe_capture_oracle.cc
[modify] https://crrev.com/13c588bc9a1e2855f1f6cba4664a1f3502c4b0ad/media/capture/content/thread_safe_capture_oracle.h
[modify] https://crrev.com/13c588bc9a1e2855f1f6cba4664a1f3502c4b0ad/media/capture/content/video_capture_oracle.cc
[modify] https://crrev.com/13c588bc9a1e2855f1f6cba4664a1f3502c4b0ad/media/capture/content/video_capture_oracle.h
[modify] https://crrev.com/13c588bc9a1e2855f1f6cba4664a1f3502c4b0ad/media/capture/content/video_capture_oracle_unittest.cc
[modify] https://crrev.com/13c588bc9a1e2855f1f6cba4664a1f3502c4b0ad/testing/buildbot/filters/viz.content_browsertests.filter

mash_browser_tests on the Mojo FYI bot are failing with this message:

[25480:25480:0129/091440.182029:FATAL:frame_sink_video_capture_device.cc(42)] Check failed: manager.
#0 0x000003e911ac base::debug::StackTrace::StackTrace()
#1 0x000003eab3bc logging::LogMessage::~LogMessage()
#2 0x000002bd6681 content::(anonymous namespace)::CreateCapturer()
#3 0x0000009d7a1c _ZN4base8internal7InvokerINS0_9BindStateIPFNSt3__110unique_ptrIN3arc10ArcSessionENS3_14default_deleteIS6_EEEEvEJEEESA_E3RunEPNS0_13BindStateBaseE
#4 0x000002bd8e2b _ZN4base8internal13FunctorTraitsINS_17RepeatingCallbackIFN4mojo16InterfacePtrInfoIN3viz5mojom22FrameSinkVideoCapturerEEEvEEEvE6InvokeISA_JEEES8_OT_DpOT0_
#5 0x000002bd8d62 _ZN4base8internal7InvokerINS0_9BindStateINS_17RepeatingCallbackIFN4mojo16InterfacePtrInfoIN3viz5mojom22FrameSinkVideoCapturerEEEvEEEJEEESA_E7RunOnceEPNS0_13BindStateBaseE
#6 0x000002bd923a base::internal::ReturnAsParamAdapter<>()
#7 0x0000018c3a4b _ZN4base8internal7InvokerINS0_9BindStateIPFvNS_12OnceCallbackIFNSt3__110unique_ptrIN10extensions3api23braille_display_private12DisplayStateENS4_14default_deleteIS9_EEEEvEEEPSC_EJSE_SF_EEEFvvEE7RunOnceEPNS0_13BindStateBaseE
#8 0x000003f04392 base::(anonymous namespace)::PostTaskAndReplyRelay::RunTaskAndPostReply()
#9 0x000003e91965 base::debug::TaskAnnotator::RunTask()

https://ci.chromium.org/buildbot/chromium.fyi/Mojo%20ChromiumOS/26429

https://ci.chromium.org/buildbot/chromium.fyi/Mojo%20ChromiumOS/

Same issue? I would expect them to already have the second revert, so maybe this is a different problem?

Project Member

Comment 58 by bugdroid1@chromium.org, Jan 29 2018

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

commit 910087dc8404fb0df27a9fc27e236777a86954c1
Author: Yuri Wiitala <miu@chromium.org>
Date: Mon Jan 29 21:39:07 2018

Re-Re-land "FrameSinkVideoCapturer: Fix refresh logic for damaged sources."

This reverts commit 13c588bc9a1e2855f1f6cba4664a1f3502c4b0ad, to re-land
the original patch (https://chromium-review.googlesource.com/884996)
again. This patch contains fixes needed to restore tab capture
functionality and clear up failing perf waterfall bots.

This time, I'm landing with the "sensitive to random bots not in the CQ"
content_browsertests disabled. I will re-enable them in a separate
change so that people stop reverting this very important fix, the act of
which keeps making things worse elsewhere.

TBR=xjz@chromium.org,kylechar@chromium.org

Bug:  806635 ,  785072 ,  754872 
Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel
Change-Id: I15ac4faaa168eb57f1775b70148382c3933de82f
Reviewed-on: https://chromium-review.googlesource.com/891541
Commit-Queue: Yuri Wiitala <miu@chromium.org>
Reviewed-by: Yuri Wiitala <miu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#532598}
[modify] https://crrev.com/910087dc8404fb0df27a9fc27e236777a86954c1/components/viz/service/frame_sinks/compositor_frame_sink_support.cc
[modify] https://crrev.com/910087dc8404fb0df27a9fc27e236777a86954c1/components/viz/service/frame_sinks/compositor_frame_sink_support.h
[modify] https://crrev.com/910087dc8404fb0df27a9fc27e236777a86954c1/components/viz/service/frame_sinks/video_capture/capturable_frame_sink.h
[modify] https://crrev.com/910087dc8404fb0df27a9fc27e236777a86954c1/components/viz/service/frame_sinks/video_capture/frame_sink_video_capturer_impl.cc
[modify] https://crrev.com/910087dc8404fb0df27a9fc27e236777a86954c1/components/viz/service/frame_sinks/video_capture/frame_sink_video_capturer_impl.h
[modify] https://crrev.com/910087dc8404fb0df27a9fc27e236777a86954c1/components/viz/service/frame_sinks/video_capture/frame_sink_video_capturer_impl_unittest.cc
[modify] https://crrev.com/910087dc8404fb0df27a9fc27e236777a86954c1/content/browser/media/capture/aura_window_capture_machine.cc
[modify] https://crrev.com/910087dc8404fb0df27a9fc27e236777a86954c1/content/browser/media/capture/web_contents_video_capture_device_browsertest.cc
[modify] https://crrev.com/910087dc8404fb0df27a9fc27e236777a86954c1/media/capture/content/android/screen_capture_machine_android.cc
[modify] https://crrev.com/910087dc8404fb0df27a9fc27e236777a86954c1/media/capture/content/screen_capture_device_core.cc
[modify] https://crrev.com/910087dc8404fb0df27a9fc27e236777a86954c1/media/capture/content/screen_capture_device_core.h
[modify] https://crrev.com/910087dc8404fb0df27a9fc27e236777a86954c1/media/capture/content/thread_safe_capture_oracle.cc
[modify] https://crrev.com/910087dc8404fb0df27a9fc27e236777a86954c1/media/capture/content/thread_safe_capture_oracle.h
[modify] https://crrev.com/910087dc8404fb0df27a9fc27e236777a86954c1/media/capture/content/video_capture_oracle.cc
[modify] https://crrev.com/910087dc8404fb0df27a9fc27e236777a86954c1/media/capture/content/video_capture_oracle.h
[modify] https://crrev.com/910087dc8404fb0df27a9fc27e236777a86954c1/media/capture/content/video_capture_oracle_unittest.cc
[modify] https://crrev.com/910087dc8404fb0df27a9fc27e236777a86954c1/testing/buildbot/filters/viz.content_browsertests.filter

Project Member

Comment 59 by bugdroid1@chromium.org, Jan 30 2018

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

commit da1deebdab4e3538b0c78432a00413ac075ce556
Author: Yuri Wiitala <miu@chromium.org>
Date: Tue Jan 30 00:25:45 2018

Re-enable WebContentsVideoCaptureDeviceBrowserTests, sans CrOS+MSAN.

TBR=xjz@chromium.org

Bug:  754872 ,  806715 
Change-Id: Iea4cdc3fd17315ad688b48312a0185c114cc8908
Reviewed-on: https://chromium-review.googlesource.com/892053
Reviewed-by: Yuri Wiitala <miu@chromium.org>
Commit-Queue: Yuri Wiitala <miu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#532691}
[modify] https://crrev.com/da1deebdab4e3538b0c78432a00413ac075ce556/content/browser/media/capture/web_contents_video_capture_device_browsertest.cc

Comment 60 by m...@chromium.org, Feb 1 2018

Components: Internals>Media>Capture

Comment 61 by m...@chromium.org, Feb 1 2018

Components: -Blink>GetUserMedia>Tab
Project Member

Comment 62 by bugdroid1@chromium.org, Feb 7 2018

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

commit 7a08be580eb458170d11b34a8de66fe08db41bc5
Author: Yuri Wiitala <miu@chromium.org>
Date: Wed Feb 07 02:33:25 2018

Delete RenderWidgetHostView APIs related to tab video capture.

Remove RenderWidgetHostView::CopyFromSurfaceToVideoFrame() and all
FrameSubscriber interfaces. They served us well for the past 5 years,
but it's time to retire them in favor of the new frame sink-based tab
capture implementation.

Almost all of this change is code deletion. Only minor, trivial
clean-ups were performed in files touched.

Bug:  754872 
Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel
Change-Id: Iec3b5754fccf800d6cbf70c15fcc0f6779da960f
Reviewed-on: https://chromium-review.googlesource.com/896588
Commit-Queue: Yuri Wiitala <miu@chromium.org>
Reviewed-by: ccameron <ccameron@chromium.org>
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Reviewed-by: kylechar <kylechar@chromium.org>
Reviewed-by: Yi Xu <yiyix@chromium.org>
Cr-Commit-Position: refs/heads/master@{#534887}
[modify] https://crrev.com/7a08be580eb458170d11b34a8de66fe08db41bc5/components/viz/service/display/surface_aggregator_unittest.cc
[modify] https://crrev.com/7a08be580eb458170d11b34a8de66fe08db41bc5/components/viz/service/frame_sinks/compositor_frame_sink_support.cc
[modify] https://crrev.com/7a08be580eb458170d11b34a8de66fe08db41bc5/components/viz/service/frame_sinks/compositor_frame_sink_support.h
[modify] https://crrev.com/7a08be580eb458170d11b34a8de66fe08db41bc5/content/browser/BUILD.gn
[modify] https://crrev.com/7a08be580eb458170d11b34a8de66fe08db41bc5/content/browser/renderer_host/browser_compositor_view_mac.h
[modify] https://crrev.com/7a08be580eb458170d11b34a8de66fe08db41bc5/content/browser/renderer_host/browser_compositor_view_mac.mm
[modify] https://crrev.com/7a08be580eb458170d11b34a8de66fe08db41bc5/content/browser/renderer_host/delegated_frame_host.cc
[modify] https://crrev.com/7a08be580eb458170d11b34a8de66fe08db41bc5/content/browser/renderer_host/delegated_frame_host.h
[modify] https://crrev.com/7a08be580eb458170d11b34a8de66fe08db41bc5/content/browser/renderer_host/render_process_host_impl.cc
[modify] https://crrev.com/7a08be580eb458170d11b34a8de66fe08db41bc5/content/browser/renderer_host/render_widget_host_view_aura.cc
[modify] https://crrev.com/7a08be580eb458170d11b34a8de66fe08db41bc5/content/browser/renderer_host/render_widget_host_view_aura.h
[modify] https://crrev.com/7a08be580eb458170d11b34a8de66fe08db41bc5/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc
[modify] https://crrev.com/7a08be580eb458170d11b34a8de66fe08db41bc5/content/browser/renderer_host/render_widget_host_view_base.cc
[modify] https://crrev.com/7a08be580eb458170d11b34a8de66fe08db41bc5/content/browser/renderer_host/render_widget_host_view_base.h
[modify] https://crrev.com/7a08be580eb458170d11b34a8de66fe08db41bc5/content/browser/renderer_host/render_widget_host_view_browsertest.cc
[delete] https://crrev.com/6264a8e359685b6c4689addfabf7e74585fbb105/content/browser/renderer_host/render_widget_host_view_frame_subscriber.h
[modify] https://crrev.com/7a08be580eb458170d11b34a8de66fe08db41bc5/content/browser/renderer_host/render_widget_host_view_mac.h
[modify] https://crrev.com/7a08be580eb458170d11b34a8de66fe08db41bc5/content/browser/renderer_host/render_widget_host_view_mac.mm
[modify] https://crrev.com/7a08be580eb458170d11b34a8de66fe08db41bc5/content/public/browser/render_widget_host_view.h
[modify] https://crrev.com/7a08be580eb458170d11b34a8de66fe08db41bc5/testing/buildbot/filters/fuchsia.content_unittests.filter
[modify] https://crrev.com/7a08be580eb458170d11b34a8de66fe08db41bc5/testing/buildbot/filters/viz.content_unittests.filter

Comment 63 by m...@chromium.org, Feb 7 2018

Components: Internals>Media>ScreenCapture

Comment 64 by m...@chromium.org, Feb 7 2018

Components: -Internals>Media>Capture
Blocking: -770833 787097
Project Member

Comment 66 by bugdroid1@chromium.org, Feb 7 2018

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

commit af090394776c078c103727c7eb547f1c4b65fa1a
Author: Yuri Wiitala <miu@chromium.org>
Date: Wed Feb 07 20:28:42 2018

WebContentsVideoCaptureDevice: Use another WeakPtr for safety.

This is a follow-up to an issue addressed in Patchset 19 in
https://chromium-review.googlesource.com/c/chromium/src/+/879270: There
is an extremely unlikely, but possible, browser-shutdown scenario where
a posted task may execute after the FrameTracker has been deleted. I
already use WeakPtrs elsewhere to address this, but I missed one. This
change fixes the last one.

Bug:  754872 
Change-Id: I8092278f4e9842696c175acd369603f18e29fd3d
Reviewed-on: https://chromium-review.googlesource.com/905693
Reviewed-by: Xiangjun Zhang <xjz@chromium.org>
Commit-Queue: Yuri Wiitala <miu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#535130}
[modify] https://crrev.com/af090394776c078c103727c7eb547f1c4b65fa1a/content/browser/media/capture/web_contents_video_capture_device.cc

Blocking: 810389

Comment 68 by m...@chromium.org, Feb 8 2018

Blocking: -810389

Comment 69 by m...@chromium.org, Feb 14 2018

Blockedon: -582955 -759310
Status: Fixed (was: Started)
Components: -Internals>MUS Internals>Services>WindowService
Project Member

Comment 71 by bugdroid1@chromium.org, May 10 2018

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

commit 5406037437556eac7c164f6df41837d54feba3b8
Author: Antoine Labour <piman@chromium.org>
Date: Thu May 10 17:57:40 2018

Remove client-provided mailbox in CopyOutputRequest

This is not used in production anymore.

Bug:  754872 
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I8b68715ccfdf7805cd2d6024148690638c7c9f98
Reviewed-on: https://chromium-review.googlesource.com/1053304
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Commit-Queue: Antoine Labour <piman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#557580}
[modify] https://crrev.com/5406037437556eac7c164f6df41837d54feba3b8/cc/trees/layer_tree_host_unittest_copyrequest.cc
[modify] https://crrev.com/5406037437556eac7c164f6df41837d54feba3b8/components/viz/common/frame_sinks/copy_output_request.cc
[modify] https://crrev.com/5406037437556eac7c164f6df41837d54feba3b8/components/viz/common/frame_sinks/copy_output_request.h
[modify] https://crrev.com/5406037437556eac7c164f6df41837d54feba3b8/components/viz/service/display/gl_renderer_copier.cc
[modify] https://crrev.com/5406037437556eac7c164f6df41837d54feba3b8/services/viz/public/cpp/compositing/copy_output_request_struct_traits.cc
[modify] https://crrev.com/5406037437556eac7c164f6df41837d54feba3b8/services/viz/public/cpp/compositing/copy_output_request_struct_traits.h
[modify] https://crrev.com/5406037437556eac7c164f6df41837d54feba3b8/services/viz/public/cpp/compositing/struct_traits_unittest.cc
[modify] https://crrev.com/5406037437556eac7c164f6df41837d54feba3b8/services/viz/public/interfaces/compositing/copy_output_request.mojom

Project Member

Comment 72 by bugdroid1@chromium.org, Jun 20 2018

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

commit fc5fe70812cace37e3c3452577dbfa66d960c8e8
Author: Yuri Wiitala <miu@chromium.org>
Date: Wed Jun 20 06:14:00 2018

FrameSinkVideoCapture clean-up: Remove unused APIs, style fixes.

1. Remove the unused viz.mojom.FrameSinkVideoConsumer.OnTargetLost()
API.

2. Fix the viz.mojom.FrameSinkVideoCapturer.ChangeTarget() to accept an
optional FrameSinkId (original intended behavior of the API before new
struct traits restrictions on "null" FrameSinkIds).

3. C++ Style: Fixed argument ordering in a few methods of viz::FSVCImpl
so that the output argument would come last.

4. Ran lint on all files changed, and made fixes (mostly
include-what-you-use).

Bug:  754872 
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel
Change-Id: Idbceb49089811dd6f8494f8ee17d578239108866
Reviewed-on: https://chromium-review.googlesource.com/1090220
Commit-Queue: Yuri Wiitala <miu@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Andrey Kosyakov <caseq@chromium.org>
Reviewed-by: Xiangjun Zhang <xjz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#568748}
[modify] https://crrev.com/fc5fe70812cace37e3c3452577dbfa66d960c8e8/chrome/browser/devtools/devtools_eye_dropper.cc
[modify] https://crrev.com/fc5fe70812cace37e3c3452577dbfa66d960c8e8/chrome/browser/devtools/devtools_eye_dropper.h
[modify] https://crrev.com/fc5fe70812cace37e3c3452577dbfa66d960c8e8/components/viz/OWNERS
[modify] https://crrev.com/fc5fe70812cace37e3c3452577dbfa66d960c8e8/components/viz/host/client_frame_sink_video_capturer.cc
[modify] https://crrev.com/fc5fe70812cace37e3c3452577dbfa66d960c8e8/components/viz/host/client_frame_sink_video_capturer.h
[modify] https://crrev.com/fc5fe70812cace37e3c3452577dbfa66d960c8e8/components/viz/service/frame_sinks/video_capture/frame_sink_video_capturer_impl.cc
[modify] https://crrev.com/fc5fe70812cace37e3c3452577dbfa66d960c8e8/components/viz/service/frame_sinks/video_capture/frame_sink_video_capturer_impl.h
[modify] https://crrev.com/fc5fe70812cace37e3c3452577dbfa66d960c8e8/components/viz/service/frame_sinks/video_capture/frame_sink_video_capturer_impl_unittest.cc
[modify] https://crrev.com/fc5fe70812cace37e3c3452577dbfa66d960c8e8/content/browser/devtools/devtools_video_consumer.cc
[modify] https://crrev.com/fc5fe70812cace37e3c3452577dbfa66d960c8e8/content/browser/devtools/devtools_video_consumer.h
[modify] https://crrev.com/fc5fe70812cace37e3c3452577dbfa66d960c8e8/content/browser/devtools/devtools_video_consumer_unittest.cc
[modify] https://crrev.com/fc5fe70812cace37e3c3452577dbfa66d960c8e8/content/browser/media/capture/frame_sink_video_capture_device.cc
[modify] https://crrev.com/fc5fe70812cace37e3c3452577dbfa66d960c8e8/content/browser/media/capture/frame_sink_video_capture_device.h
[modify] https://crrev.com/fc5fe70812cace37e3c3452577dbfa66d960c8e8/content/browser/media/capture/frame_sink_video_capture_device_unittest.cc
[modify] https://crrev.com/fc5fe70812cace37e3c3452577dbfa66d960c8e8/content/browser/media/capture/lame_window_capturer_chromeos.cc
[modify] https://crrev.com/fc5fe70812cace37e3c3452577dbfa66d960c8e8/content/browser/media/capture/lame_window_capturer_chromeos.h
[modify] https://crrev.com/fc5fe70812cace37e3c3452577dbfa66d960c8e8/services/viz/privileged/interfaces/compositing/frame_sink_video_capture.mojom

Project Member

Comment 73 by bugdroid1@chromium.org, Jun 20 2018

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

commit a7d6d9872e267e3e970707e394e84092177b357d
Author: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
Date: Wed Jun 20 21:33:02 2018

media capture, mojo: Sprinkle noexcept in a few more classes

Commit fc5fe70812c ("FrameSinkVideoCapture clean-up: Remove unused APIs,
style fixes") added the noexcept marker to FrameSinkVideoCapture's
ConsumptionState inner class.

This breaks the GCC build due to the fact that its members' types do not
have noexcept themselves:

    ../../content/browser/media/capture/frame_sink_video_capture_device.cc: At global scope:
    ../../content/browser/media/capture/frame_sink_video_capture_device.cc:372:1: error: function ‘content::FrameSinkVideoCaptureDevice::ConsumptionState::ConsumptionState(content::FrameSinkVideoCaptureDevice::ConsumptionState&&)’ defaulted on its redeclaration with an exception-specification that differs from the implicit exception-specification ‘’
    FrameSinkVideoCaptureDevice::ConsumptionState::ConsumptionState(

clang is fine because we pass -fno-exceptions and it disables the same error
there, while GCC continues to raise it ( bug 843143  and its corresponding CL
have a longer discussion on this issue).

In this case, mark CursorRendererUndoer as well as mojo's ubiquitous
InterfacePtr with noexcept to fix the build.

Bug:  754872 , 819294,  843143 
Change-Id: I78714fda26d21e0979aed4fe26d543463dff9631
Reviewed-on: https://chromium-review.googlesource.com/1107918
Reviewed-by: Ken Rockot <rockot@chromium.org>
Reviewed-by: Sergey Ulanov <sergeyu@chromium.org>
Commit-Queue: Raphael Kubo da Costa (CET) <raphael.kubo.da.costa@intel.com>
Cr-Commit-Position: refs/heads/master@{#569029}
[modify] https://crrev.com/a7d6d9872e267e3e970707e394e84092177b357d/content/browser/media/capture/cursor_renderer.cc
[modify] https://crrev.com/a7d6d9872e267e3e970707e394e84092177b357d/content/browser/media/capture/cursor_renderer.h
[modify] https://crrev.com/a7d6d9872e267e3e970707e394e84092177b357d/mojo/public/cpp/bindings/interface_ptr.h

Sign in to add a comment