New issue
Advanced search Search tips

Issue 646774 link

Starred by 28 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug


Sign in to add a comment

Provide animation and rendering control

Project Member Reported by skyos...@chromium.org, Sep 14 2016

Issue description

We should let headless users specify when and how often animation and rendering happens.

Strawman:

Emulation.enableBeginFrameControl()
Emulation.onSetNeedsBeginFrame(bool beginFrameNeeded)
Emulation.sendBeginFrame(frameTime, frameInterval, deadline)
 
Labels: Proj-Headless
Owner: eseckler@chromium.org
Status: Assigned (was: Untriaged)
Some more comments about this in an early draft of a design doc:
https://docs.google.com/document/d/1LVMYDkfjrrX9PNkrD8pJH5-Np_XUTQHIuJ8IEOirQH4/edit#

In particular, we probably want to control this on page (RenderView) level, too.
Project Member

Comment 3 by bugdroid1@chromium.org, Dec 22 2016

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

commit 1ce4fd58dd1e43b5e033ab4d1a35028b04ac0224
Author: eseckler <eseckler@chromium.org>
Date: Thu Dec 22 11:23:40 2016

[cc] Adds source_id and sequence_number to BeginFrameArgs.

Also uses the sequence number in external BeginFrameSources to
decide whether a missed BeginFrame should be sent.

BUG=646774,  401331 
CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel

Review-Url: https://codereview.chromium.org/2583483002
Cr-Commit-Position: refs/heads/master@{#440382}

[modify] https://crrev.com/1ce4fd58dd1e43b5e033ab4d1a35028b04ac0224/cc/blimp/layer_tree_host_remote.cc
[modify] https://crrev.com/1ce4fd58dd1e43b5e033ab4d1a35028b04ac0224/cc/blimp/layer_tree_host_remote.h
[modify] https://crrev.com/1ce4fd58dd1e43b5e033ab4d1a35028b04ac0224/cc/ipc/begin_frame_args.mojom
[modify] https://crrev.com/1ce4fd58dd1e43b5e033ab4d1a35028b04ac0224/cc/ipc/begin_frame_args_struct_traits.h
[modify] https://crrev.com/1ce4fd58dd1e43b5e033ab4d1a35028b04ac0224/cc/ipc/cc_param_traits_macros.h
[modify] https://crrev.com/1ce4fd58dd1e43b5e033ab4d1a35028b04ac0224/cc/output/begin_frame_args.cc
[modify] https://crrev.com/1ce4fd58dd1e43b5e033ab4d1a35028b04ac0224/cc/output/begin_frame_args.h
[modify] https://crrev.com/1ce4fd58dd1e43b5e033ab4d1a35028b04ac0224/cc/output/begin_frame_args_unittest.cc
[modify] https://crrev.com/1ce4fd58dd1e43b5e033ab4d1a35028b04ac0224/cc/scheduler/begin_frame_source.cc
[modify] https://crrev.com/1ce4fd58dd1e43b5e033ab4d1a35028b04ac0224/cc/scheduler/begin_frame_source.h
[modify] https://crrev.com/1ce4fd58dd1e43b5e033ab4d1a35028b04ac0224/cc/scheduler/begin_frame_source_unittest.cc
[modify] https://crrev.com/1ce4fd58dd1e43b5e033ab4d1a35028b04ac0224/cc/scheduler/scheduler_unittest.cc
[modify] https://crrev.com/1ce4fd58dd1e43b5e033ab4d1a35028b04ac0224/cc/surfaces/display_scheduler_unittest.cc
[modify] https://crrev.com/1ce4fd58dd1e43b5e033ab4d1a35028b04ac0224/cc/test/begin_frame_args_test.cc
[modify] https://crrev.com/1ce4fd58dd1e43b5e033ab4d1a35028b04ac0224/cc/test/begin_frame_args_test.h
[modify] https://crrev.com/1ce4fd58dd1e43b5e033ab4d1a35028b04ac0224/cc/test/begin_frame_source_test.cc
[modify] https://crrev.com/1ce4fd58dd1e43b5e033ab4d1a35028b04ac0224/cc/test/begin_frame_source_test.h
[modify] https://crrev.com/1ce4fd58dd1e43b5e033ab4d1a35028b04ac0224/cc/test/begin_frame_source_test_unittest.cc
[modify] https://crrev.com/1ce4fd58dd1e43b5e033ab4d1a35028b04ac0224/cc/test/fake_external_begin_frame_source.cc
[modify] https://crrev.com/1ce4fd58dd1e43b5e033ab4d1a35028b04ac0224/cc/test/fake_external_begin_frame_source.h
[modify] https://crrev.com/1ce4fd58dd1e43b5e033ab4d1a35028b04ac0224/cc/test/fake_layer_tree_host_impl.cc
[modify] https://crrev.com/1ce4fd58dd1e43b5e033ab4d1a35028b04ac0224/cc/trees/layer_tree_host_impl_unittest.cc
[modify] https://crrev.com/1ce4fd58dd1e43b5e033ab4d1a35028b04ac0224/cc/trees/single_thread_proxy.cc
[modify] https://crrev.com/1ce4fd58dd1e43b5e033ab4d1a35028b04ac0224/content/browser/renderer_host/render_widget_host_view_android.cc
[modify] https://crrev.com/1ce4fd58dd1e43b5e033ab4d1a35028b04ac0224/content/renderer/gpu/compositor_forwarding_message_filter_unittest.cc
[modify] https://crrev.com/1ce4fd58dd1e43b5e033ab4d1a35028b04ac0224/third_party/WebKit/Source/platform/scheduler/renderer/renderer_scheduler_impl_unittest.cc
[modify] https://crrev.com/1ce4fd58dd1e43b5e033ab4d1a35028b04ac0224/ui/android/window_android.cc

Project Member

Comment 4 by bugdroid1@chromium.org, Jan 6 2017

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

commit 05dc9ef49954de90fd62d5a9b7cb60af7b14ff86
Author: eseckler <eseckler@chromium.org>
Date: Fri Jan 06 17:22:47 2017

[cc] Add and use BeginFrameAck for DidFinishFrame.

Adds BeginFrameAck struct and updates the signature and callsites of
BeginFrameSource::DidFinishFrame(). This is split off from
https://codereview.chromium.org/2527283003/.

Observers will be required to use BeginFrameAcks to indicate the
result of a BeginFrame message. The acknowledgments will be used by the
DisplayScheduler to determine when all updates for a BeginFrame have
been received and trigger an early deadline.

A BeginFrame acknowledgment indicates:
1) completion of a specific BeginFrame by the observer,
2) whether or not the observer produced updates, and
3) the oldest frame that was incorporated into the last update from the
observer.

2) and 3) are in preparation for DevTool's BeginFrameControl, see
http://bit.ly/bfc-v1 and https://codereview.chromium.org/2411793008/.

Follow-up patches will add:
- correct calculation of |latest_confirmed_frame| in
  Scheduler/DisplayScheduler.
- missing DidFinishFrame() calls in observers
- integration of acks into CompositorFrame submission (to allow ack
  propagation from services / renderer compositor)
- modification of DisplayScheduler to rely on BeginFrameAcks.

BUG=646774,  401331 
CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel

Review-Url: https://codereview.chromium.org/2591013004
Cr-Commit-Position: refs/heads/master@{#441960}

[modify] https://crrev.com/05dc9ef49954de90fd62d5a9b7cb60af7b14ff86/cc/output/begin_frame_args.cc
[modify] https://crrev.com/05dc9ef49954de90fd62d5a9b7cb60af7b14ff86/cc/output/begin_frame_args.h
[modify] https://crrev.com/05dc9ef49954de90fd62d5a9b7cb60af7b14ff86/cc/scheduler/begin_frame_source.cc
[modify] https://crrev.com/05dc9ef49954de90fd62d5a9b7cb60af7b14ff86/cc/scheduler/begin_frame_source.h
[modify] https://crrev.com/05dc9ef49954de90fd62d5a9b7cb60af7b14ff86/cc/scheduler/begin_frame_source_unittest.cc
[modify] https://crrev.com/05dc9ef49954de90fd62d5a9b7cb60af7b14ff86/cc/scheduler/scheduler.cc
[modify] https://crrev.com/05dc9ef49954de90fd62d5a9b7cb60af7b14ff86/cc/scheduler/scheduler_state_machine.h
[modify] https://crrev.com/05dc9ef49954de90fd62d5a9b7cb60af7b14ff86/cc/surfaces/display_scheduler.cc
[modify] https://crrev.com/05dc9ef49954de90fd62d5a9b7cb60af7b14ff86/cc/surfaces/display_scheduler.h
[modify] https://crrev.com/05dc9ef49954de90fd62d5a9b7cb60af7b14ff86/cc/surfaces/display_scheduler_unittest.cc
[modify] https://crrev.com/05dc9ef49954de90fd62d5a9b7cb60af7b14ff86/cc/test/fake_external_begin_frame_source.cc
[modify] https://crrev.com/05dc9ef49954de90fd62d5a9b7cb60af7b14ff86/cc/test/fake_external_begin_frame_source.h
[modify] https://crrev.com/05dc9ef49954de90fd62d5a9b7cb60af7b14ff86/content/renderer/gpu/compositor_external_begin_frame_source.h
[modify] https://crrev.com/05dc9ef49954de90fd62d5a9b7cb60af7b14ff86/ui/android/window_android.cc

Project Member

Comment 5 by bugdroid1@chromium.org, Feb 15 2017

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

commit b6d98635b61003f29f9cbbb13e2ee6bcf61255ac
Author: eseckler <eseckler@chromium.org>
Date: Wed Feb 15 05:56:01 2017

[cc] facilitate use of BeginFrameAcks in tests.

BUG=646774,  401331 
CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel

Review-Url: https://codereview.chromium.org/2686193002
Cr-Commit-Position: refs/heads/master@{#450574}

[modify] https://crrev.com/b6d98635b61003f29f9cbbb13e2ee6bcf61255ac/cc/output/begin_frame_args.cc
[modify] https://crrev.com/b6d98635b61003f29f9cbbb13e2ee6bcf61255ac/cc/test/begin_frame_args_test.cc
[modify] https://crrev.com/b6d98635b61003f29f9cbbb13e2ee6bcf61255ac/cc/test/begin_frame_args_test.h

Blockedon: 694133
Project Member

Comment 7 by bugdroid1@chromium.org, Feb 22 2017

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

commit fa5fec25bef17c2b0855201a3b0e1dfa848eb50e
Author: eseckler <eseckler@chromium.org>
Date: Wed Feb 22 11:25:09 2017

[cc] Track observer status in ExternalBeginFrameSource.

This introduces a BeginFrameObserverAckTracker, which tracks which
active observers have finished the current BeginFrame, and hooks it up
to ExternalBeginFrameSource.

BUG=646774,  401331 
CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel

Review-Url: https://codereview.chromium.org/2691453002
Cr-Commit-Position: refs/heads/master@{#451997}

[modify] https://crrev.com/fa5fec25bef17c2b0855201a3b0e1dfa848eb50e/cc/scheduler/begin_frame_source.cc
[modify] https://crrev.com/fa5fec25bef17c2b0855201a3b0e1dfa848eb50e/cc/scheduler/begin_frame_source.h
[modify] https://crrev.com/fa5fec25bef17c2b0855201a3b0e1dfa848eb50e/cc/scheduler/begin_frame_source_unittest.cc
[modify] https://crrev.com/fa5fec25bef17c2b0855201a3b0e1dfa848eb50e/cc/scheduler/scheduler.cc
[modify] https://crrev.com/fa5fec25bef17c2b0855201a3b0e1dfa848eb50e/cc/surfaces/direct_compositor_frame_sink.cc
[modify] https://crrev.com/fa5fec25bef17c2b0855201a3b0e1dfa848eb50e/cc/surfaces/direct_compositor_frame_sink.h
[modify] https://crrev.com/fa5fec25bef17c2b0855201a3b0e1dfa848eb50e/cc/test/begin_frame_source_test.h
[modify] https://crrev.com/fa5fec25bef17c2b0855201a3b0e1dfa848eb50e/components/exo/compositor_frame_sink_holder.cc
[modify] https://crrev.com/fa5fec25bef17c2b0855201a3b0e1dfa848eb50e/components/exo/compositor_frame_sink_holder.h
[modify] https://crrev.com/fa5fec25bef17c2b0855201a3b0e1dfa848eb50e/content/renderer/gpu/compositor_external_begin_frame_source.cc
[modify] https://crrev.com/fa5fec25bef17c2b0855201a3b0e1dfa848eb50e/content/renderer/gpu/compositor_external_begin_frame_source.h
[modify] https://crrev.com/fa5fec25bef17c2b0855201a3b0e1dfa848eb50e/services/ui/public/cpp/window_compositor_frame_sink.cc
[modify] https://crrev.com/fa5fec25bef17c2b0855201a3b0e1dfa848eb50e/services/ui/public/cpp/window_compositor_frame_sink.h

Project Member

Comment 8 by bugdroid1@chromium.org, Feb 24 2017

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

commit 37da9b3e656ac85c42e3f375e84b55c98b397da1
Author: eseckler <eseckler@chromium.org>
Date: Fri Feb 24 23:36:56 2017

[cc] Calculate the correct latest_confirmed_sequence_number in cc::Scheduler.

We track freshness frame numbers for the different trees in
cc::SchedulerStateMachine and use them to fill the BeginFrameAck's
latest_confirmed_sequence_number in cc::Scheduler.

BUG=646774,  401331 
CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel

Review-Url: https://codereview.chromium.org/2632563003
Cr-Commit-Position: refs/heads/master@{#452997}

[modify] https://crrev.com/37da9b3e656ac85c42e3f375e84b55c98b397da1/cc/scheduler/scheduler.cc
[modify] https://crrev.com/37da9b3e656ac85c42e3f375e84b55c98b397da1/cc/scheduler/scheduler.h
[modify] https://crrev.com/37da9b3e656ac85c42e3f375e84b55c98b397da1/cc/scheduler/scheduler_state_machine.cc
[modify] https://crrev.com/37da9b3e656ac85c42e3f375e84b55c98b397da1/cc/scheduler/scheduler_state_machine.h
[modify] https://crrev.com/37da9b3e656ac85c42e3f375e84b55c98b397da1/cc/scheduler/scheduler_state_machine_unittest.cc
[modify] https://crrev.com/37da9b3e656ac85c42e3f375e84b55c98b397da1/cc/scheduler/scheduler_unittest.cc
[modify] https://crrev.com/37da9b3e656ac85c42e3f375e84b55c98b397da1/cc/surfaces/display_scheduler_unittest.cc
[modify] https://crrev.com/37da9b3e656ac85c42e3f375e84b55c98b397da1/cc/test/fake_external_begin_frame_source.cc
[modify] https://crrev.com/37da9b3e656ac85c42e3f375e84b55c98b397da1/cc/test/fake_external_begin_frame_source.h
[modify] https://crrev.com/37da9b3e656ac85c42e3f375e84b55c98b397da1/cc/test/scheduler_test_common.h

Blockedon: 697086
Project Member

Comment 10 by bugdroid1@chromium.org, Mar 2 2017

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

commit d9bbb44814c924c58e80bb0e8b64a9a634fd2198
Author: eseckler <eseckler@chromium.org>
Date: Thu Mar 02 22:12:14 2017

[cc] Forward BeginFrameAcks through DirectCFS and CFSSupport.

Also updates unit tests to check that acks are indeed forwarded.

BUG= 697086 ,646774,  696030 ,  480361 
CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel

Review-Url: https://codereview.chromium.org/2727553004
Cr-Commit-Position: refs/heads/master@{#454400}

[modify] https://crrev.com/d9bbb44814c924c58e80bb0e8b64a9a634fd2198/cc/surfaces/compositor_frame_sink_support.cc
[modify] https://crrev.com/d9bbb44814c924c58e80bb0e8b64a9a634fd2198/cc/surfaces/compositor_frame_sink_support.h
[modify] https://crrev.com/d9bbb44814c924c58e80bb0e8b64a9a634fd2198/cc/surfaces/compositor_frame_sink_support_unittest.cc
[modify] https://crrev.com/d9bbb44814c924c58e80bb0e8b64a9a634fd2198/cc/surfaces/direct_compositor_frame_sink.cc
[modify] https://crrev.com/d9bbb44814c924c58e80bb0e8b64a9a634fd2198/cc/surfaces/direct_compositor_frame_sink.h
[modify] https://crrev.com/d9bbb44814c924c58e80bb0e8b64a9a634fd2198/cc/surfaces/direct_compositor_frame_sink_unittest.cc
[modify] https://crrev.com/d9bbb44814c924c58e80bb0e8b64a9a634fd2198/cc/test/fake_compositor_frame_sink_client.cc
[modify] https://crrev.com/d9bbb44814c924c58e80bb0e8b64a9a634fd2198/cc/test/fake_compositor_frame_sink_client.h

Project Member

Comment 11 by bugdroid1@chromium.org, Mar 7 2017

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

commit dde665fa0a7577e619e819c13c9e4af95d8b19b1
Author: eseckler <eseckler@chromium.org>
Date: Tue Mar 07 20:19:27 2017

[cc] Set BeginFrame sequence numbers on CompositorFrames from Scheduler.

Other CompositorFrame creators will have to set these, too. But that'll
follow separately.

BUG=646774,  401331 ,  697086 
CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel

Review-Url: https://codereview.chromium.org/2712983003
Cr-Commit-Position: refs/heads/master@{#455194}

[modify] https://crrev.com/dde665fa0a7577e619e819c13c9e4af95d8b19b1/cc/output/begin_frame_args.h
[modify] https://crrev.com/dde665fa0a7577e619e819c13c9e4af95d8b19b1/cc/output/compositor_frame_metadata.h
[modify] https://crrev.com/dde665fa0a7577e619e819c13c9e4af95d8b19b1/cc/scheduler/scheduler.cc
[modify] https://crrev.com/dde665fa0a7577e619e819c13c9e4af95d8b19b1/cc/scheduler/scheduler.h
[modify] https://crrev.com/dde665fa0a7577e619e819c13c9e4af95d8b19b1/cc/scheduler/scheduler_state_machine.h
[modify] https://crrev.com/dde665fa0a7577e619e819c13c9e4af95d8b19b1/cc/scheduler/scheduler_state_machine_unittest.cc
[modify] https://crrev.com/dde665fa0a7577e619e819c13c9e4af95d8b19b1/cc/test/begin_frame_source_test.cc
[modify] https://crrev.com/dde665fa0a7577e619e819c13c9e4af95d8b19b1/cc/trees/layer_tree_host_impl.cc
[modify] https://crrev.com/dde665fa0a7577e619e819c13c9e4af95d8b19b1/cc/trees/layer_tree_host_impl.h
[modify] https://crrev.com/dde665fa0a7577e619e819c13c9e4af95d8b19b1/cc/trees/layer_tree_host_impl_unittest.cc
[modify] https://crrev.com/dde665fa0a7577e619e819c13c9e4af95d8b19b1/cc/trees/layer_tree_host_unittest.cc
[modify] https://crrev.com/dde665fa0a7577e619e819c13c9e4af95d8b19b1/cc/trees/proxy_impl.cc
[modify] https://crrev.com/dde665fa0a7577e619e819c13c9e4af95d8b19b1/cc/trees/single_thread_proxy.cc

Project Member

Comment 12 by bugdroid1@chromium.org, Mar 15 2017

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

commit 599d86bbcfeb41cd4d48f73d85f62a47918be0f1
Author: eseckler <eseckler@chromium.org>
Date: Wed Mar 15 09:02:55 2017

[exo] Clean up Surface BeginFrame distribution & add acks in Surface.

This refactors exo::Surface to use a BeginFrameSource again, adds a call
to DidFinishFrame(), and passes on the ack in submitted CompositorFrames.

Passing on of no-damage ack through MojoCompositorFrameSink remains TODO.

This is work towards unified BeginFrame acknowledgments, see:
Tracking bug:  https://crbug.com/697086 
Design doc: http://bit.ly/beginframeacks

BUG= 697086 , 646774

Review-Url: https://codereview.chromium.org/2724953007
Cr-Commit-Position: refs/heads/master@{#457038}

[modify] https://crrev.com/599d86bbcfeb41cd4d48f73d85f62a47918be0f1/components/exo/BUILD.gn
[modify] https://crrev.com/599d86bbcfeb41cd4d48f73d85f62a47918be0f1/components/exo/compositor_frame_sink_holder.cc
[modify] https://crrev.com/599d86bbcfeb41cd4d48f73d85f62a47918be0f1/components/exo/compositor_frame_sink_holder.h
[modify] https://crrev.com/599d86bbcfeb41cd4d48f73d85f62a47918be0f1/components/exo/surface.cc
[modify] https://crrev.com/599d86bbcfeb41cd4d48f73d85f62a47918be0f1/components/exo/surface.h
[modify] https://crrev.com/599d86bbcfeb41cd4d48f73d85f62a47918be0f1/components/exo/surface_unittest.cc

Project Member

Comment 13 by bugdroid1@chromium.org, Mar 18 2017

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

commit 31ef6f5c55de6abf3e1c7cf108411491f38632cc
Author: eseckler <eseckler@chromium.org>
Date: Sat Mar 18 06:10:16 2017

[cc] Pass on BeginFrameAcks from CompositorEBFS through RWHVAura, DFH.

This patch adds forwarding of BeginFrameAcks from the renderer through
the SwapCompositorFrame and BeginFrameDidNotSwap IPCs to the browser,
where they are received and passed on by RenderWidgetHostViewAura.

Other platforms to follow.

This is work towards unified BeginFrame acknowledgments, see:
Tracking bug:  https://crbug.com/697086 
Design doc: http://bit.ly/beginframeacks

BUG= 697086 , 646774
CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel

Review-Url: https://codereview.chromium.org/2740833005
Cr-Commit-Position: refs/heads/master@{#457962}

[modify] https://crrev.com/31ef6f5c55de6abf3e1c7cf108411491f38632cc/cc/ipc/begin_frame_args.mojom
[modify] https://crrev.com/31ef6f5c55de6abf3e1c7cf108411491f38632cc/cc/ipc/begin_frame_args.typemap
[add] https://crrev.com/31ef6f5c55de6abf3e1c7cf108411491f38632cc/cc/ipc/begin_frame_args_for_blink.typemap
[add] https://crrev.com/31ef6f5c55de6abf3e1c7cf108411491f38632cc/cc/ipc/begin_frame_args_struct_traits.cc
[modify] https://crrev.com/31ef6f5c55de6abf3e1c7cf108411491f38632cc/cc/ipc/begin_frame_args_struct_traits.h
[modify] https://crrev.com/31ef6f5c55de6abf3e1c7cf108411491f38632cc/cc/ipc/cc_param_traits_macros.h
[modify] https://crrev.com/31ef6f5c55de6abf3e1c7cf108411491f38632cc/cc/ipc/cc_serialization_perftest.cc
[modify] https://crrev.com/31ef6f5c55de6abf3e1c7cf108411491f38632cc/cc/ipc/compositor_frame_metadata.mojom
[modify] https://crrev.com/31ef6f5c55de6abf3e1c7cf108411491f38632cc/cc/ipc/compositor_frame_metadata_struct_traits.cc
[modify] https://crrev.com/31ef6f5c55de6abf3e1c7cf108411491f38632cc/cc/ipc/compositor_frame_metadata_struct_traits.h
[modify] https://crrev.com/31ef6f5c55de6abf3e1c7cf108411491f38632cc/cc/ipc/struct_traits_unittest.cc
[modify] https://crrev.com/31ef6f5c55de6abf3e1c7cf108411491f38632cc/cc/ipc/traits_test_service.mojom
[modify] https://crrev.com/31ef6f5c55de6abf3e1c7cf108411491f38632cc/cc/scheduler/begin_frame_source.h
[modify] https://crrev.com/31ef6f5c55de6abf3e1c7cf108411491f38632cc/content/browser/bad_message.h
[modify] https://crrev.com/31ef6f5c55de6abf3e1c7cf108411491f38632cc/content/browser/renderer_host/delegated_frame_host.cc
[modify] https://crrev.com/31ef6f5c55de6abf3e1c7cf108411491f38632cc/content/browser/renderer_host/delegated_frame_host.h
[modify] https://crrev.com/31ef6f5c55de6abf3e1c7cf108411491f38632cc/content/browser/renderer_host/render_widget_host_impl.cc
[modify] https://crrev.com/31ef6f5c55de6abf3e1c7cf108411491f38632cc/content/browser/renderer_host/render_widget_host_impl.h
[modify] https://crrev.com/31ef6f5c55de6abf3e1c7cf108411491f38632cc/content/browser/renderer_host/render_widget_host_unittest.cc
[modify] https://crrev.com/31ef6f5c55de6abf3e1c7cf108411491f38632cc/content/browser/renderer_host/render_widget_host_view_aura.cc
[modify] https://crrev.com/31ef6f5c55de6abf3e1c7cf108411491f38632cc/content/browser/renderer_host/render_widget_host_view_aura.h
[modify] https://crrev.com/31ef6f5c55de6abf3e1c7cf108411491f38632cc/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc
[modify] https://crrev.com/31ef6f5c55de6abf3e1c7cf108411491f38632cc/content/browser/renderer_host/render_widget_host_view_base.h
[modify] https://crrev.com/31ef6f5c55de6abf3e1c7cf108411491f38632cc/content/common/view_messages.h
[modify] https://crrev.com/31ef6f5c55de6abf3e1c7cf108411491f38632cc/content/renderer/gpu/compositor_external_begin_frame_source.cc
[modify] https://crrev.com/31ef6f5c55de6abf3e1c7cf108411491f38632cc/content/renderer/gpu/compositor_external_begin_frame_source.h
[modify] https://crrev.com/31ef6f5c55de6abf3e1c7cf108411491f38632cc/content/renderer/gpu/queue_message_swap_promise.cc
[modify] https://crrev.com/31ef6f5c55de6abf3e1c7cf108411491f38632cc/content/renderer/gpu/renderer_compositor_frame_sink.cc
[modify] https://crrev.com/31ef6f5c55de6abf3e1c7cf108411491f38632cc/third_party/WebKit/public/blink_typemaps.gni
[modify] https://crrev.com/31ef6f5c55de6abf3e1c7cf108411491f38632cc/tools/metrics/histograms/histograms.xml

Project Member

Comment 14 by bugdroid1@chromium.org, Mar 22 2017

Project Member

Comment 16 by bugdroid1@chromium.org, Mar 24 2017

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

commit 6a9efe9bb5bce08d48578cda5497045c4d33b6ec
Author: eseckler <eseckler@chromium.org>
Date: Fri Mar 24 16:29:56 2017

[cc] Fix CompositorFrameSinkSupport BeginFrameAck interface.

This replaces CFSSupport::DidFinishFrame with BeginFrameDidNotSwap and
uses SubmitCompositorFrame for BeginFrameAcks with damage instead.

This change also requires that all CompositorFrame submitters actually
set the BeginFrameAck on their CompositorFrames, so that we avoid
 crbug.com/696030  (and so that we don't hit the newly added
DLOG/DCHECKs).

This is work towards unified BeginFrame acknowledgments, see:
Tracking bug:  https://crbug.com/697086 
Design doc: http://bit.ly/beginframeacks

BUG= 697086 , 646774,  696030 
CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_site_isolation

Review-Url: https://codereview.chromium.org/2755463002
Cr-Commit-Position: refs/heads/master@{#459451}

[modify] https://crrev.com/6a9efe9bb5bce08d48578cda5497045c4d33b6ec/android_webview/browser/hardware_renderer.cc
[modify] https://crrev.com/6a9efe9bb5bce08d48578cda5497045c4d33b6ec/android_webview/browser/surfaces_instance.cc
[modify] https://crrev.com/6a9efe9bb5bce08d48578cda5497045c4d33b6ec/android_webview/browser/test/rendering_test.cc
[modify] https://crrev.com/6a9efe9bb5bce08d48578cda5497045c4d33b6ec/ash/laser/laser_pointer_view.cc
[modify] https://crrev.com/6a9efe9bb5bce08d48578cda5497045c4d33b6ec/ash/laser/laser_pointer_view.h
[modify] https://crrev.com/6a9efe9bb5bce08d48578cda5497045c4d33b6ec/cc/ipc/mojo_compositor_frame_sink.mojom
[modify] https://crrev.com/6a9efe9bb5bce08d48578cda5497045c4d33b6ec/cc/output/begin_frame_args.cc
[modify] https://crrev.com/6a9efe9bb5bce08d48578cda5497045c4d33b6ec/cc/output/begin_frame_args.h
[modify] https://crrev.com/6a9efe9bb5bce08d48578cda5497045c4d33b6ec/cc/surfaces/compositor_frame_sink_support.cc
[modify] https://crrev.com/6a9efe9bb5bce08d48578cda5497045c4d33b6ec/cc/surfaces/compositor_frame_sink_support.h
[modify] https://crrev.com/6a9efe9bb5bce08d48578cda5497045c4d33b6ec/cc/surfaces/compositor_frame_sink_support_unittest.cc
[modify] https://crrev.com/6a9efe9bb5bce08d48578cda5497045c4d33b6ec/cc/surfaces/direct_compositor_frame_sink.cc
[modify] https://crrev.com/6a9efe9bb5bce08d48578cda5497045c4d33b6ec/cc/surfaces/direct_compositor_frame_sink_unittest.cc
[modify] https://crrev.com/6a9efe9bb5bce08d48578cda5497045c4d33b6ec/cc/trees/layer_tree_host_impl_unittest.cc
[modify] https://crrev.com/6a9efe9bb5bce08d48578cda5497045c4d33b6ec/components/display_compositor/gpu_compositor_frame_sink.cc
[modify] https://crrev.com/6a9efe9bb5bce08d48578cda5497045c4d33b6ec/components/display_compositor/gpu_compositor_frame_sink.h
[modify] https://crrev.com/6a9efe9bb5bce08d48578cda5497045c4d33b6ec/components/display_compositor/gpu_root_compositor_frame_sink.cc
[modify] https://crrev.com/6a9efe9bb5bce08d48578cda5497045c4d33b6ec/components/display_compositor/gpu_root_compositor_frame_sink.h
[modify] https://crrev.com/6a9efe9bb5bce08d48578cda5497045c4d33b6ec/components/exo/compositor_frame_sink.cc
[modify] https://crrev.com/6a9efe9bb5bce08d48578cda5497045c4d33b6ec/components/exo/compositor_frame_sink.h
[modify] https://crrev.com/6a9efe9bb5bce08d48578cda5497045c4d33b6ec/components/exo/compositor_frame_sink_holder.cc
[modify] https://crrev.com/6a9efe9bb5bce08d48578cda5497045c4d33b6ec/components/exo/surface.cc
[modify] https://crrev.com/6a9efe9bb5bce08d48578cda5497045c4d33b6ec/content/browser/frame_host/render_widget_host_view_child_frame_unittest.cc
[modify] https://crrev.com/6a9efe9bb5bce08d48578cda5497045c4d33b6ec/content/browser/frame_host/render_widget_host_view_guest_unittest.cc
[modify] https://crrev.com/6a9efe9bb5bce08d48578cda5497045c4d33b6ec/content/browser/renderer_host/delegated_frame_host.cc
[modify] https://crrev.com/6a9efe9bb5bce08d48578cda5497045c4d33b6ec/content/browser/renderer_host/offscreen_canvas_compositor_frame_sink.cc
[modify] https://crrev.com/6a9efe9bb5bce08d48578cda5497045c4d33b6ec/content/browser/renderer_host/offscreen_canvas_compositor_frame_sink.h
[modify] https://crrev.com/6a9efe9bb5bce08d48578cda5497045c4d33b6ec/content/renderer/android/synchronous_compositor_frame_sink.cc
[modify] https://crrev.com/6a9efe9bb5bce08d48578cda5497045c4d33b6ec/services/ui/public/cpp/client_compositor_frame_sink.cc
[modify] https://crrev.com/6a9efe9bb5bce08d48578cda5497045c4d33b6ec/services/ui/ws/display_client_compositor_frame_sink.cc
[modify] https://crrev.com/6a9efe9bb5bce08d48578cda5497045c4d33b6ec/services/ui/ws/window_tree_client_unittest.cc
[modify] https://crrev.com/6a9efe9bb5bce08d48578cda5497045c4d33b6ec/third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.cpp
[modify] https://crrev.com/6a9efe9bb5bce08d48578cda5497045c4d33b6ec/third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcherImpl.cpp
[modify] https://crrev.com/6a9efe9bb5bce08d48578cda5497045c4d33b6ec/third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcherImpl.h

Project Member

Comment 17 by bugdroid1@chromium.org, Mar 28 2017

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

commit 5c732104d0278822b4df84d76362f60d2929b037
Author: eseckler <eseckler@chromium.org>
Date: Tue Mar 28 09:39:53 2017

[cc] Forward BeginFrameAcks through RWHVChildFrame.

Passes on BeginFrameAcks from RenderWidgetHostViewChildFrame to
CompositorFrameSinkSupport and adds a test for this.

This is work towards unified BeginFrame acknowledgments, see:
Tracking bug:  https://crbug.com/697086 
Design doc: http://bit.ly/beginframeacks

BUG= 697086 , 646774
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation

Review-Url: https://codereview.chromium.org/2779593002
Cr-Commit-Position: refs/heads/master@{#460054}

[modify] https://crrev.com/5c732104d0278822b4df84d76362f60d2929b037/content/browser/frame_host/render_widget_host_view_child_frame.cc
[modify] https://crrev.com/5c732104d0278822b4df84d76362f60d2929b037/content/browser/frame_host/render_widget_host_view_child_frame.h
[modify] https://crrev.com/5c732104d0278822b4df84d76362f60d2929b037/content/browser/frame_host/render_widget_host_view_child_frame_unittest.cc

Project Member

Comment 18 by bugdroid1@chromium.org, Mar 30 2017

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

commit e4201c2d7ffca39470fa1a69febc2e9c92f10def
Author: eseckler <eseckler@chromium.org>
Date: Thu Mar 30 14:26:53 2017

[cc] Forward BeginFrameAcks through RWHVAndroid / DFHAndroid.

Passes on BeginFrameAcks from RenderWidgetHostViewAndroid through
DelegatedFrameHostAndroid to its CompositorFrameSinkSupport.

This is work towards unified BeginFrame acknowledgments, see:
Tracking bug:  https://crbug.com/697086 
Design doc: http://bit.ly/beginframeacks

BUG= 697086 , 646774

Review-Url: https://codereview.chromium.org/2781103002
Cr-Commit-Position: refs/heads/master@{#460750}

[modify] https://crrev.com/e4201c2d7ffca39470fa1a69febc2e9c92f10def/content/browser/renderer_host/render_widget_host_view_android.cc
[modify] https://crrev.com/e4201c2d7ffca39470fa1a69febc2e9c92f10def/content/browser/renderer_host/render_widget_host_view_android.h
[modify] https://crrev.com/e4201c2d7ffca39470fa1a69febc2e9c92f10def/ui/android/delegated_frame_host_android.cc

Project Member

Comment 19 by bugdroid1@chromium.org, Mar 31 2017

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

commit 56b635d784ad0eacbd06e744e43c115e48993a04
Author: eseckler <eseckler@chromium.org>
Date: Fri Mar 31 20:10:46 2017

[headless] Use individual aura::WindowTreeHosts per WebContents.

This way, compositing concerns are handled separately per WebContents,
which is required for BeginFrameControl.

BUG=646774

Review-Url: https://codereview.chromium.org/2787373002
Cr-Commit-Position: refs/heads/master@{#461200}

[modify] https://crrev.com/56b635d784ad0eacbd06e744e43c115e48993a04/headless/BUILD.gn
[modify] https://crrev.com/56b635d784ad0eacbd06e744e43c115e48993a04/headless/lib/browser/headless_browser_impl.h
[modify] https://crrev.com/56b635d784ad0eacbd06e744e43c115e48993a04/headless/lib/browser/headless_browser_impl_aura.cc
[modify] https://crrev.com/56b635d784ad0eacbd06e744e43c115e48993a04/headless/lib/browser/headless_browser_impl_mac.mm
[modify] https://crrev.com/56b635d784ad0eacbd06e744e43c115e48993a04/headless/lib/browser/headless_web_contents_impl.cc
[modify] https://crrev.com/56b635d784ad0eacbd06e744e43c115e48993a04/headless/lib/browser/headless_web_contents_impl.h
[modify] https://crrev.com/56b635d784ad0eacbd06e744e43c115e48993a04/headless/lib/browser/headless_window_tree_host.cc
[modify] https://crrev.com/56b635d784ad0eacbd06e744e43c115e48993a04/headless/lib/browser/headless_window_tree_host.h
[modify] https://crrev.com/56b635d784ad0eacbd06e744e43c115e48993a04/headless/lib/headless_web_contents_browsertest.cc

Project Member

Comment 20 by bugdroid1@chromium.org, Apr 3 2017

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

commit 9f50c75ebf30e61ad79311c1271655c7573261c5
Author: timloh <timloh@chromium.org>
Date: Mon Apr 03 03:57:03 2017

Revert of [headless] Use individual aura::WindowTreeHosts per WebContents. (patchset #1 id:1 of https://codereview.chromium.org/2787373002/ )

Reason for revert:
Suspect this is causing failures of TargetDomainCreateTwoContexts.RunAsyncTest in browser_side_navigation_headless_browsertests.

https://build.chromium.org/p/chromium.linux/builders/Linux%20Tests%20%28dbg%29%281%29?numbuilds=200

Original issue's description:
> [headless] Use individual aura::WindowTreeHosts per WebContents.
>
> This way, compositing concerns are handled separately per WebContents,
> which is required for BeginFrameControl.
>
> BUG=646774
>
> Review-Url: https://codereview.chromium.org/2787373002
> Cr-Commit-Position: refs/heads/master@{#461200}
> Committed: https://chromium.googlesource.com/chromium/src/+/56b635d784ad0eacbd06e744e43c115e48993a04

TBR=skyostil@chromium.org,eseckler@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=646774

Review-Url: https://codereview.chromium.org/2792883002
Cr-Commit-Position: refs/heads/master@{#461367}

[modify] https://crrev.com/9f50c75ebf30e61ad79311c1271655c7573261c5/headless/BUILD.gn
[modify] https://crrev.com/9f50c75ebf30e61ad79311c1271655c7573261c5/headless/lib/browser/headless_browser_impl.h
[modify] https://crrev.com/9f50c75ebf30e61ad79311c1271655c7573261c5/headless/lib/browser/headless_browser_impl_aura.cc
[modify] https://crrev.com/9f50c75ebf30e61ad79311c1271655c7573261c5/headless/lib/browser/headless_browser_impl_mac.mm
[modify] https://crrev.com/9f50c75ebf30e61ad79311c1271655c7573261c5/headless/lib/browser/headless_web_contents_impl.cc
[modify] https://crrev.com/9f50c75ebf30e61ad79311c1271655c7573261c5/headless/lib/browser/headless_web_contents_impl.h
[modify] https://crrev.com/9f50c75ebf30e61ad79311c1271655c7573261c5/headless/lib/browser/headless_window_tree_host.cc
[modify] https://crrev.com/9f50c75ebf30e61ad79311c1271655c7573261c5/headless/lib/browser/headless_window_tree_host.h
[modify] https://crrev.com/9f50c75ebf30e61ad79311c1271655c7573261c5/headless/lib/headless_web_contents_browsertest.cc

Project Member

Comment 21 by bugdroid1@chromium.org, Apr 3 2017

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

commit c09e3997a3688d11623054205f4b25e4f8e7dba7
Author: eseckler <eseckler@chromium.org>
Date: Mon Apr 03 13:10:36 2017

[headless] Use individual aura::WindowTreeHosts per WebContents.

This way, compositing concerns are handled separately per WebContents,
which is required for BeginFrameControl.

BUG=646774

Review-Url: https://codereview.chromium.org/2787373002
Cr-Original-Commit-Position: refs/heads/master@{#461200}
Committed: https://chromium.googlesource.com/chromium/src/+/56b635d784ad0eacbd06e744e43c115e48993a04
Review-Url: https://codereview.chromium.org/2787373002
Cr-Commit-Position: refs/heads/master@{#461414}

[modify] https://crrev.com/c09e3997a3688d11623054205f4b25e4f8e7dba7/headless/BUILD.gn
[modify] https://crrev.com/c09e3997a3688d11623054205f4b25e4f8e7dba7/headless/lib/browser/headless_browser_impl.h
[modify] https://crrev.com/c09e3997a3688d11623054205f4b25e4f8e7dba7/headless/lib/browser/headless_browser_impl_aura.cc
[modify] https://crrev.com/c09e3997a3688d11623054205f4b25e4f8e7dba7/headless/lib/browser/headless_browser_impl_mac.mm
[modify] https://crrev.com/c09e3997a3688d11623054205f4b25e4f8e7dba7/headless/lib/browser/headless_web_contents_impl.cc
[modify] https://crrev.com/c09e3997a3688d11623054205f4b25e4f8e7dba7/headless/lib/browser/headless_web_contents_impl.h
[modify] https://crrev.com/c09e3997a3688d11623054205f4b25e4f8e7dba7/headless/lib/browser/headless_window_tree_host.cc
[modify] https://crrev.com/c09e3997a3688d11623054205f4b25e4f8e7dba7/headless/lib/browser/headless_window_tree_host.h
[modify] https://crrev.com/c09e3997a3688d11623054205f4b25e4f8e7dba7/headless/lib/headless_web_contents_browsertest.cc

Components: Internals>Headless
Blockedon: 726286
Project Member

Comment 24 by bugdroid1@chromium.org, May 26 2017

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

commit e356c64f253923983248656d304d8aa471aad5f0
Author: eseckler <eseckler@chromium.org>
Date: Fri May 26 12:59:36 2017

[cc] Plumb BeginFrameAcks through SurfaceManager to DisplayScheduler.

Plumbs the BeginFrameAcks from DidNotProduceFrame and
SubmitCompositorFrame through new SurfaceObserver methods from
CompositorFrameSinks to the DisplayScheduler.

Also replaces the expected surface damage heuristics previously used
by DisplayScheduler with tracking BeginFrame(Ack)s and surface damage.

This is work towards unified BeginFrame acknowledgments, see:
Tracking bug:  https://crbug.com/697086 
Design doc: http://bit.ly/beginframeacks

BUG= 697086 , 646774,  678119 ,  703079 ,  707513 
CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_site_isolation

Review-Url: https://codereview.chromium.org/2854163003
Cr-Commit-Position: refs/heads/master@{#474989}

[modify] https://crrev.com/e356c64f253923983248656d304d8aa471aad5f0/cc/BUILD.gn
[modify] https://crrev.com/e356c64f253923983248656d304d8aa471aad5f0/cc/surfaces/compositor_frame_sink_support.cc
[modify] https://crrev.com/e356c64f253923983248656d304d8aa471aad5f0/cc/surfaces/compositor_frame_sink_support_unittest.cc
[modify] https://crrev.com/e356c64f253923983248656d304d8aa471aad5f0/cc/surfaces/direct_compositor_frame_sink_unittest.cc
[modify] https://crrev.com/e356c64f253923983248656d304d8aa471aad5f0/cc/surfaces/display.cc
[modify] https://crrev.com/e356c64f253923983248656d304d8aa471aad5f0/cc/surfaces/display.h
[modify] https://crrev.com/e356c64f253923983248656d304d8aa471aad5f0/cc/surfaces/display_scheduler.cc
[modify] https://crrev.com/e356c64f253923983248656d304d8aa471aad5f0/cc/surfaces/display_scheduler.h
[modify] https://crrev.com/e356c64f253923983248656d304d8aa471aad5f0/cc/surfaces/display_scheduler_unittest.cc
[modify] https://crrev.com/e356c64f253923983248656d304d8aa471aad5f0/cc/surfaces/display_unittest.cc
[modify] https://crrev.com/e356c64f253923983248656d304d8aa471aad5f0/cc/surfaces/surface.cc
[modify] https://crrev.com/e356c64f253923983248656d304d8aa471aad5f0/cc/surfaces/surface.h
[modify] https://crrev.com/e356c64f253923983248656d304d8aa471aad5f0/cc/surfaces/surface_manager.cc
[modify] https://crrev.com/e356c64f253923983248656d304d8aa471aad5f0/cc/surfaces/surface_manager.h
[modify] https://crrev.com/e356c64f253923983248656d304d8aa471aad5f0/cc/surfaces/surface_observer.h
[modify] https://crrev.com/e356c64f253923983248656d304d8aa471aad5f0/cc/surfaces/surface_synchronization_unittest.cc
[add] https://crrev.com/e356c64f253923983248656d304d8aa471aad5f0/cc/test/fake_surface_observer.cc
[add] https://crrev.com/e356c64f253923983248656d304d8aa471aad5f0/cc/test/fake_surface_observer.h
[modify] https://crrev.com/e356c64f253923983248656d304d8aa471aad5f0/components/viz/frame_sinks/mojo_frame_sink_manager.cc
[modify] https://crrev.com/e356c64f253923983248656d304d8aa471aad5f0/components/viz/frame_sinks/mojo_frame_sink_manager.h
[modify] https://crrev.com/e356c64f253923983248656d304d8aa471aad5f0/content/browser/frame_host/render_widget_host_view_child_frame_unittest.cc
[modify] https://crrev.com/e356c64f253923983248656d304d8aa471aad5f0/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc

Project Member

Comment 25 by bugdroid1@chromium.org, Jun 30 2017

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

commit 2bfa479b45745b4c1ef2fbdbfedfc8e457f204c4
Author: Eric Seckler <eseckler@chromium.org>
Date: Fri Jun 30 14:16:12 2017

[cc] Add scheduler mode to wait for all pipeline stages.

In this mode, the scheduler waits for main frame, commit, activation and
tiles (ready to draw) before drawing - for every BeginFrame.

Bug: 646774
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I694e9a50c3593ff52523d3a6656a1ebee04677a0
Reviewed-on: https://chromium-review.googlesource.com/538832
Commit-Queue: Eric Seckler <eseckler@chromium.org>
Reviewed-by: Sunny Sachanandani <sunnyps@chromium.org>
Cr-Commit-Position: refs/heads/master@{#483693}
[modify] https://crrev.com/2bfa479b45745b4c1ef2fbdbfedfc8e457f204c4/cc/scheduler/scheduler.cc
[modify] https://crrev.com/2bfa479b45745b4c1ef2fbdbfedfc8e457f204c4/cc/scheduler/scheduler_settings.cc
[modify] https://crrev.com/2bfa479b45745b4c1ef2fbdbfedfc8e457f204c4/cc/scheduler/scheduler_settings.h
[modify] https://crrev.com/2bfa479b45745b4c1ef2fbdbfedfc8e457f204c4/cc/scheduler/scheduler_state_machine.cc
[modify] https://crrev.com/2bfa479b45745b4c1ef2fbdbfedfc8e457f204c4/cc/scheduler/scheduler_state_machine.h
[modify] https://crrev.com/2bfa479b45745b4c1ef2fbdbfedfc8e457f204c4/cc/scheduler/scheduler_state_machine_unittest.cc

Project Member

Comment 26 by bugdroid1@chromium.org, Jul 3 2017

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

commit 8810bfbae9ae4112c29003096705c362837f81ff
Author: Eric Seckler <eseckler@chromium.org>
Date: Mon Jul 03 10:26:58 2017

[cc] Add DisplayScheduler mode to wait for all surfaces.

In this mode, the DisplayScheduler waits until all surfaces are ready
to draw (have damage or have acknowledged the current BeginFrame)
before triggering the BeginFrame deadline, for every BeginFrame.

Once all surfaces are ready, the deadline is triggered immediately,
irrespective of whether a draw is required or not.

Bug: 646774
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I385caf8659e21ff91a59b2482d82247cbc35e285
Reviewed-on: https://chromium-review.googlesource.com/548380
Commit-Queue: Eric Seckler <eseckler@chromium.org>
Reviewed-by: Sunny Sachanandani <sunnyps@chromium.org>
Cr-Commit-Position: refs/heads/master@{#483980}
[modify] https://crrev.com/8810bfbae9ae4112c29003096705c362837f81ff/cc/surfaces/display_scheduler.cc
[modify] https://crrev.com/8810bfbae9ae4112c29003096705c362837f81ff/cc/surfaces/display_scheduler.h
[modify] https://crrev.com/8810bfbae9ae4112c29003096705c362837f81ff/cc/surfaces/display_scheduler_unittest.cc

Project Member

Comment 27 by bugdroid1@chromium.org, Jul 31 2017

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

commit 3372217a2ffecdf265105f9e7dbaa46ef723eb06
Author: Eric Seckler <eseckler@chromium.org>
Date: Mon Jul 31 06:28:10 2017

[cc] Add a way to control the compositor's BeginFrames externally.

Exposes a setting and an interface for enabling externally-controlled
BeginFrames in ui::Compositor and adds a command line flag for the
full-pipeline scheduling mode.

Bug: 646774
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_site_isolation
Change-Id: I923b5ab66652c65c1384b9fe5075c0a427559fc6
Reviewed-on: https://chromium-review.googlesource.com/558252
Commit-Queue: Eric Seckler <eseckler@chromium.org>
Reviewed-by: Fady Samuel <fsamuel@chromium.org>
Reviewed-by: Antoine Labour <piman@chromium.org>
Reviewed-by: Sunny Sachanandani <sunnyps@chromium.org>
Cr-Commit-Position: refs/heads/master@{#490719}
[modify] https://crrev.com/3372217a2ffecdf265105f9e7dbaa46ef723eb06/cc/base/switches.cc
[modify] https://crrev.com/3372217a2ffecdf265105f9e7dbaa46ef723eb06/cc/base/switches.h
[modify] https://crrev.com/3372217a2ffecdf265105f9e7dbaa46ef723eb06/cc/trees/layer_tree_settings.cc
[modify] https://crrev.com/3372217a2ffecdf265105f9e7dbaa46ef723eb06/cc/trees/layer_tree_settings.h
[modify] https://crrev.com/3372217a2ffecdf265105f9e7dbaa46ef723eb06/components/viz/service/display/display.cc
[modify] https://crrev.com/3372217a2ffecdf265105f9e7dbaa46ef723eb06/components/viz/service/display/display.h
[modify] https://crrev.com/3372217a2ffecdf265105f9e7dbaa46ef723eb06/components/viz/service/display/display_scheduler.cc
[modify] https://crrev.com/3372217a2ffecdf265105f9e7dbaa46ef723eb06/components/viz/service/display/display_scheduler.h
[modify] https://crrev.com/3372217a2ffecdf265105f9e7dbaa46ef723eb06/components/viz/service/display/display_scheduler_unittest.cc
[modify] https://crrev.com/3372217a2ffecdf265105f9e7dbaa46ef723eb06/content/browser/compositor/gpu_process_transport_factory.cc
[modify] https://crrev.com/3372217a2ffecdf265105f9e7dbaa46ef723eb06/content/browser/compositor/gpu_process_transport_factory.h
[modify] https://crrev.com/3372217a2ffecdf265105f9e7dbaa46ef723eb06/content/browser/renderer_host/render_process_host_impl.cc
[modify] https://crrev.com/3372217a2ffecdf265105f9e7dbaa46ef723eb06/content/renderer/gpu/render_widget_compositor.cc
[modify] https://crrev.com/3372217a2ffecdf265105f9e7dbaa46ef723eb06/ui/compositor/BUILD.gn
[modify] https://crrev.com/3372217a2ffecdf265105f9e7dbaa46ef723eb06/ui/compositor/compositor.cc
[modify] https://crrev.com/3372217a2ffecdf265105f9e7dbaa46ef723eb06/ui/compositor/compositor.h
[add] https://crrev.com/3372217a2ffecdf265105f9e7dbaa46ef723eb06/ui/compositor/external_begin_frame_client.h
[modify] https://crrev.com/3372217a2ffecdf265105f9e7dbaa46ef723eb06/ui/compositor/test/in_process_context_factory.h

Project Member

Comment 28 by bugdroid1@chromium.org, Oct 3 2017

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

commit efe42588ed590998b0992ab7796d43dfad0e6861
Author: Eric Seckler <eseckler@chromium.org>
Date: Tue Oct 03 09:55:04 2017

[cc] Fixes for cc::Scheduler's full-pipeline mode.

It was previously possible for the full-pipeline mode to get stuck while
waiting for ready to activate/draw, because tiles were only prepared
when inside the deadline.

We were also not always waiting for the main frame: While there is no
active tree, we shouldn't trigger an immediate deadline even if we
cannot currently draw (as this may be because there's no active tree).
Further, we should block while commits are deferred (e.g. during the
renderer's initialization).

See this patch for use of this compositing mode in headless:
https://chromium-review.googlesource.com/c/chromium/src/+/612061

Bug: 646774
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel
Change-Id: Ib712c89294d1c7e628fb80370ad8ba3748624438
Reviewed-on: https://chromium-review.googlesource.com/677448
Commit-Queue: Eric Seckler <eseckler@chromium.org>
Reviewed-by: Sunny Sachanandani <sunnyps@chromium.org>
Cr-Commit-Position: refs/heads/master@{#505994}
[modify] https://crrev.com/efe42588ed590998b0992ab7796d43dfad0e6861/cc/scheduler/scheduler_state_machine.cc
[modify] https://crrev.com/efe42588ed590998b0992ab7796d43dfad0e6861/cc/scheduler/scheduler_state_machine_unittest.cc

Project Member

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

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

commit 80a868a08dab4dc9e0c410afba0016bf4c04b24f
Author: Eric Seckler <eseckler@chromium.org>
Date: Tue Oct 10 22:57:44 2017

[headless/devtools] Add BeginFrameControl via DevTools.

This adds a new HeadlessExperimental domain to Devtools with commands
related to issuing BeginFrames and capturing screenshots from
BeginFrame results. Also adds view size params to
Emulation.setDeviceMetricsOverride, which are used to set up
screenshots from BeginFrames.

The general idea is to issue a BeginFrame from DevTools for a particular
WebContents and be notified once it is complete.

Optionally, the resulting frame can be copied and returned as
screenshot. However, screenshots are only possible once the the main
frame's render widget has a valid surface layer. For now, we're
dealing with that by sending BeginFrames until the renderer has
submitted its first CompositorFrame.

The commands are designed for the compositor's full-pipeline rendering
mode (--run-all-compositor-stages-before-draw).

Currently, the BeginFrameControl is only supported in headless mode
and can only be enabled at target creation time. In the future, we
plan to allow enabling/disabling BeginFrameControl (as well as the
full-pipeline mode) dynamically.

See also https://bit.ly/bfc-v1 for motivation/design.

Bug: 646774
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I3b6ff1704fc8f39ed3b5ed6e5198ac44f7794bf3
Reviewed-on: https://chromium-review.googlesource.com/612061
Commit-Queue: Eric Seckler <eseckler@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org>
Reviewed-by: Pavel Feldman <pfeldman@chromium.org>
Reviewed-by: Antoine Labour <piman@chromium.org>
Reviewed-by: Sami Kyöstilä <skyostil@chromium.org>
Cr-Commit-Position: refs/heads/master@{#507811}
[modify] https://crrev.com/80a868a08dab4dc9e0c410afba0016bf4c04b24f/components/viz/service/display/display.cc
[modify] https://crrev.com/80a868a08dab4dc9e0c410afba0016bf4c04b24f/components/viz/service/display/display.h
[modify] https://crrev.com/80a868a08dab4dc9e0c410afba0016bf4c04b24f/components/viz/service/display/display_scheduler.cc
[modify] https://crrev.com/80a868a08dab4dc9e0c410afba0016bf4c04b24f/components/viz/service/display/display_scheduler.h
[modify] https://crrev.com/80a868a08dab4dc9e0c410afba0016bf4c04b24f/components/viz/service/display/display_scheduler_unittest.cc
[modify] https://crrev.com/80a868a08dab4dc9e0c410afba0016bf4c04b24f/content/browser/compositor/gpu_process_transport_factory.cc
[modify] https://crrev.com/80a868a08dab4dc9e0c410afba0016bf4c04b24f/content/browser/devtools/protocol/emulation_handler.cc
[modify] https://crrev.com/80a868a08dab4dc9e0c410afba0016bf4c04b24f/content/browser/devtools/protocol/emulation_handler.h
[modify] https://crrev.com/80a868a08dab4dc9e0c410afba0016bf4c04b24f/content/browser/devtools/protocol/schema_handler.cc
[modify] https://crrev.com/80a868a08dab4dc9e0c410afba0016bf4c04b24f/content/browser/devtools/protocol/target_handler.cc
[modify] https://crrev.com/80a868a08dab4dc9e0c410afba0016bf4c04b24f/content/browser/devtools/protocol/target_handler.h
[modify] https://crrev.com/80a868a08dab4dc9e0c410afba0016bf4c04b24f/headless/BUILD.gn
[modify] https://crrev.com/80a868a08dab4dc9e0c410afba0016bf4c04b24f/headless/lib/DEPS
[modify] https://crrev.com/80a868a08dab4dc9e0c410afba0016bf4c04b24f/headless/lib/browser/DEPS
[modify] https://crrev.com/80a868a08dab4dc9e0c410afba0016bf4c04b24f/headless/lib/browser/headless_browser_impl.h
[modify] https://crrev.com/80a868a08dab4dc9e0c410afba0016bf4c04b24f/headless/lib/browser/headless_browser_impl_aura.cc
[modify] https://crrev.com/80a868a08dab4dc9e0c410afba0016bf4c04b24f/headless/lib/browser/headless_browser_impl_mac.mm
[modify] https://crrev.com/80a868a08dab4dc9e0c410afba0016bf4c04b24f/headless/lib/browser/headless_devtools_client_impl.cc
[modify] https://crrev.com/80a868a08dab4dc9e0c410afba0016bf4c04b24f/headless/lib/browser/headless_devtools_manager_delegate.cc
[modify] https://crrev.com/80a868a08dab4dc9e0c410afba0016bf4c04b24f/headless/lib/browser/headless_devtools_manager_delegate.h
[modify] https://crrev.com/80a868a08dab4dc9e0c410afba0016bf4c04b24f/headless/lib/browser/headless_web_contents_impl.cc
[modify] https://crrev.com/80a868a08dab4dc9e0c410afba0016bf4c04b24f/headless/lib/browser/headless_web_contents_impl.h
[modify] https://crrev.com/80a868a08dab4dc9e0c410afba0016bf4c04b24f/headless/lib/browser/headless_window_tree_host.cc
[modify] https://crrev.com/80a868a08dab4dc9e0c410afba0016bf4c04b24f/headless/lib/browser/headless_window_tree_host.h
[modify] https://crrev.com/80a868a08dab4dc9e0c410afba0016bf4c04b24f/headless/lib/headless_web_contents_browsertest.cc
[modify] https://crrev.com/80a868a08dab4dc9e0c410afba0016bf4c04b24f/headless/public/headless_devtools_client.h
[modify] https://crrev.com/80a868a08dab4dc9e0c410afba0016bf4c04b24f/headless/public/headless_web_contents.h
[modify] https://crrev.com/80a868a08dab4dc9e0c410afba0016bf4c04b24f/headless/public/internal/headless_devtools_client_impl.h
[add] https://crrev.com/80a868a08dab4dc9e0c410afba0016bf4c04b24f/headless/test/data/blue_box.html
[add] https://crrev.com/80a868a08dab4dc9e0c410afba0016bf4c04b24f/headless/test/data/blue_page.html
[modify] https://crrev.com/80a868a08dab4dc9e0c410afba0016bf4c04b24f/headless/test/headless_browser_test.cc
[modify] https://crrev.com/80a868a08dab4dc9e0c410afba0016bf4c04b24f/third_party/WebKit/LayoutTests/http/tests/devtools/agents-enable-disable.html
[modify] https://crrev.com/80a868a08dab4dc9e0c410afba0016bf4c04b24f/third_party/WebKit/Source/core/inspector/browser_protocol.json
[modify] https://crrev.com/80a868a08dab4dc9e0c410afba0016bf4c04b24f/ui/aura/window_tree_host.cc
[modify] https://crrev.com/80a868a08dab4dc9e0c410afba0016bf4c04b24f/ui/aura/window_tree_host.h
[modify] https://crrev.com/80a868a08dab4dc9e0c410afba0016bf4c04b24f/ui/compositor/compositor.cc

To those following this feature request: We've now landed a first _experimental_ version of the rendering control (aka BeginFrameControl) - for headless on Linux/Windows only -, under the HeadlessExperimental domain [1]. If you'd like to give it a try, here some first starting points. Feel free to send feedback.

BeginFrames are chromium's internal vsync signal and drive the rendering pipeline. In essence, they control when rendering happens. The new BeginFrameControl (BFC) allows you to replace chromium's default vsync signal and issue BeginFrames manually via DevTools instead.

You can enable BFC when creating a new HeadlessWebContents or DevTools target page (Target.createTarget now accepts an enableBeginFrameControl parameter). Afterwards, you can enable the HeadlessExperimental domain on the new target (HeadlessExperimental.enable) and wait for the HeadlessExperimental.needsBeginFramesChanged event.

This needsBeginFrames signal tells you whether chromium's compositor currently has pending updates that it would like to render. While needsBeginFrames is true, you can send BeginFrames via HeadlessExperimental.beginFrame.

After the target's main frame has committed its first display frame, you will receive the HeadlessExperimental.mainFrameReadyForScreenshots event, which signals you that you can now use HeadlessExperimental.beginFrame to capture a screenshot. For that purpose, you need to set the command's screenshot parameter. You can send such screenshotting BeginFrames even if needsBeginFrames is false.

Note that a BeginFrame may or may not be answered with a display update. For example, sometimes no display update is necessary afterall, or one of chromium's compositor stages may not be ready to send its updates yet. As a consequence, you might need to send multiple BeginFrames while the target's renderer process is initializing until you receive the mainFrameReadyForScreenshots event.

Furthermore, it is likely that you want to use the --run-all-compositor-stages-before-draw command line flag with BFC. This flag ensures that the compositor does not prematurely commit display frames that are missing some compositing updates. At the moment, this mode has some caveats: It doesn't work well during renderer initialization or window resizes yet. We are working on fixing these issues.

We currently only have a browser test to show all this in action [2]. It may be a useful starting point nevertheless.

Please remember that this functionality is still considered experimental and will likely change in the near future. For example, we intend to make the --run-all-compositor-stages-before-draw mode more dynamic - so that you can specify whether to run all stages for individual BeginFrames. We're also working on supporting BFC in desktop (non-headless) mode, which will result in changes to the commands.

[1] https://chromedevtools.github.io/devtools-protocol/tot/HeadlessExperimental/
[2] https://cs.chromium.org/chromium/src/headless/lib/headless_web_contents_browsertest.cc?type=cs&q=HeadlessWebContentsBeginFrameControlTest&sq=package:chromium&l=1038

Project Member

Comment 31 by bugdroid1@chromium.org, Oct 23 2017

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

commit fc6257c6c611dfccf704d70e79dda54ffc9fa81c
Author: Eric Seckler <eseckler@chromium.org>
Date: Mon Oct 23 11:14:40 2017

[headless] Add main_frame_content_updated param to BeginFrame result.

Adds a parameter to the HeadlessExperimental.beginFrame command's result
that specifies whether the renderer submitted a new CompositorFrame.

This lets us determine whether e.g. a viewport size change has
propagated through the renderer and the browser's surface hierarchy.

Bug: 646774
Change-Id: I46410e2af08507eb9572fac6e5214f43be0a6337
TBR: pfeldman@ for HeadlessExperimental domain change.
Reviewed-on: https://chromium-review.googlesource.com/732106
Commit-Queue: Eric Seckler <eseckler@chromium.org>
Reviewed-by: Sami Kyöstilä <skyostil@chromium.org>
Cr-Commit-Position: refs/heads/master@{#510765}
[modify] https://crrev.com/fc6257c6c611dfccf704d70e79dda54ffc9fa81c/headless/lib/browser/headless_devtools_manager_delegate.cc
[modify] https://crrev.com/fc6257c6c611dfccf704d70e79dda54ffc9fa81c/headless/lib/browser/headless_web_contents_impl.cc
[modify] https://crrev.com/fc6257c6c611dfccf704d70e79dda54ffc9fa81c/headless/lib/browser/headless_web_contents_impl.h
[modify] https://crrev.com/fc6257c6c611dfccf704d70e79dda54ffc9fa81c/third_party/WebKit/Source/core/inspector/browser_protocol.json

Project Member

Comment 32 by bugdroid1@chromium.org, Oct 26 2017

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

commit c01556a4013107bc6b15d0ff1d3bbc35a93c849a
Author: Eric Seckler <eseckler@chromium.org>
Date: Thu Oct 26 15:35:21 2017

[cc] Skip missed BeginFrames in cc::Scheduler in full-pipe mode

Bug: 646774
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I30e67699b28a9cd226b6a814f4d4cbf8e58faa11
Reviewed-on: https://chromium-review.googlesource.com/738143
Reviewed-by: Sami Kyöstilä <skyostil@chromium.org>
Commit-Queue: Eric Seckler <eseckler@chromium.org>
Cr-Commit-Position: refs/heads/master@{#511827}
[modify] https://crrev.com/c01556a4013107bc6b15d0ff1d3bbc35a93c849a/cc/scheduler/scheduler.cc
[modify] https://crrev.com/c01556a4013107bc6b15d0ff1d3bbc35a93c849a/cc/scheduler/scheduler.h
[modify] https://crrev.com/c01556a4013107bc6b15d0ff1d3bbc35a93c849a/cc/scheduler/scheduler_unittest.cc

Project Member

Comment 33 by bugdroid1@chromium.org, Oct 26 2017

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

commit d8e32e5f5d24935d7e78b1ddb92f5fcf792ca6aa
Author: Eric Seckler <eseckler@chromium.org>
Date: Thu Oct 26 17:13:40 2017

[headless] Add CompositorController utility class.

The CompositorController can be used to align BeginFrames with the
progression of virtual time by C++ embedders. We're looking into
supporting this in puppeteer in some way, too.

Bug: 646774
Change-Id: Ied0e8cb9836d89a72f4dc79ff7cfaa1d65d1388c
Reviewed-on: https://chromium-review.googlesource.com/735483
Reviewed-by: Alex Clarke <alexclarke@chromium.org>
Reviewed-by: Sami Kyöstilä <skyostil@chromium.org>
Commit-Queue: Eric Seckler <eseckler@chromium.org>
Cr-Commit-Position: refs/heads/master@{#511857}
[modify] https://crrev.com/d8e32e5f5d24935d7e78b1ddb92f5fcf792ca6aa/headless/BUILD.gn
[add] https://crrev.com/d8e32e5f5d24935d7e78b1ddb92f5fcf792ca6aa/headless/public/util/DEPS
[add] https://crrev.com/d8e32e5f5d24935d7e78b1ddb92f5fcf792ca6aa/headless/public/util/compositor_controller.cc
[add] https://crrev.com/d8e32e5f5d24935d7e78b1ddb92f5fcf792ca6aa/headless/public/util/compositor_controller.h
[add] https://crrev.com/d8e32e5f5d24935d7e78b1ddb92f5fcf792ca6aa/headless/public/util/compositor_controller_browsertest.cc
[add] https://crrev.com/d8e32e5f5d24935d7e78b1ddb92f5fcf792ca6aa/headless/public/util/compositor_controller_unittest.cc
[modify] https://crrev.com/d8e32e5f5d24935d7e78b1ddb92f5fcf792ca6aa/headless/public/util/virtual_time_controller.h
[modify] https://crrev.com/d8e32e5f5d24935d7e78b1ddb92f5fcf792ca6aa/headless/test/headless_browser_test.cc
[modify] https://crrev.com/d8e32e5f5d24935d7e78b1ddb92f5fcf792ca6aa/headless/test/headless_browser_test.h

Project Member

Comment 34 by bugdroid1@chromium.org, Nov 1 2017

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

commit 9d6d016a84d187d5254eaa9632944b29d0c1351e
Author: Eric Seckler <eseckler@chromium.org>
Date: Wed Nov 01 17:32:58 2017

[cc] Also disable latency recovery in full-pipe mode.

In full-pipe mode, we don't want to skip BeginFrames.

Bug: 646774
Change-Id: Ibc1ed9a7e9866d150f4f16755a824b22d4586e29
Reviewed-on: https://chromium-review.googlesource.com/749383
Reviewed-by: Antoine Labour <piman@chromium.org>
Commit-Queue: Eric Seckler <eseckler@chromium.org>
Cr-Commit-Position: refs/heads/master@{#513167}
[modify] https://crrev.com/9d6d016a84d187d5254eaa9632944b29d0c1351e/content/renderer/gpu/render_widget_compositor.cc
[modify] https://crrev.com/9d6d016a84d187d5254eaa9632944b29d0c1351e/ui/compositor/compositor.cc

Project Member

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

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

commit f631cd90ba9f2a44559e2099e7f45450d4e66373
Author: Eric Seckler <eseckler@chromium.org>
Date: Fri Nov 03 09:50:45 2017

[cc] surface sync: resize DelegatedFrameHost's frame size immediately.

If the frame size is not set immediately, any CopyOutputRequests added
before frame activation will be taken with the wrong size.

Bug: 646774
Change-Id: I4e592ed8ab0d01417d7af62463e1f80b2bfda533
Reviewed-on: https://chromium-review.googlesource.com/751662
Reviewed-by: Fady Samuel <fsamuel@chromium.org>
Commit-Queue: Eric Seckler <eseckler@chromium.org>
Cr-Commit-Position: refs/heads/master@{#513731}
[modify] https://crrev.com/f631cd90ba9f2a44559e2099e7f45450d4e66373/content/browser/renderer_host/delegated_frame_host.cc
[modify] https://crrev.com/f631cd90ba9f2a44559e2099e7f45450d4e66373/content/browser/renderer_host/delegated_frame_host.h
[modify] https://crrev.com/f631cd90ba9f2a44559e2099e7f45450d4e66373/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc

Project Member

Comment 36 by bugdroid1@chromium.org, Nov 14 2017

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

commit 7b9e9951ed01e31b21807684048bc93bab6b2246
Author: Eric Seckler <eseckler@chromium.org>
Date: Tue Nov 14 19:08:31 2017

[cc] Make Scheduler observe all BeginFrames in full-pipe mode.

The propagation of the needsBeginFrame signal to viz is inherently
racy with issuing the next BeginFrame. In full-pipe mode, it is
important we don't miss a BeginFrame because our needsBeginFrames
signal propagated to viz too slowly. To avoid the race, we simply
always request BeginFrames from viz.

Bug: 646774
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I81872859363efda516f6201ccb568e6658140305
Reviewed-on: https://chromium-review.googlesource.com/753687
Commit-Queue: Eric Seckler <eseckler@chromium.org>
Reviewed-by: Sami Kyöstilä <skyostil@chromium.org>
Cr-Commit-Position: refs/heads/master@{#516373}
[modify] https://crrev.com/7b9e9951ed01e31b21807684048bc93bab6b2246/cc/scheduler/scheduler.cc
[modify] https://crrev.com/7b9e9951ed01e31b21807684048bc93bab6b2246/cc/scheduler/scheduler_settings.cc
[modify] https://crrev.com/7b9e9951ed01e31b21807684048bc93bab6b2246/cc/scheduler/scheduler_settings.h
[modify] https://crrev.com/7b9e9951ed01e31b21807684048bc93bab6b2246/cc/scheduler/scheduler_unittest.cc
[modify] https://crrev.com/7b9e9951ed01e31b21807684048bc93bab6b2246/cc/trees/layer_tree_settings.cc
[modify] https://crrev.com/7b9e9951ed01e31b21807684048bc93bab6b2246/headless/lib/headless_web_contents_browsertest.cc

Project Member

Comment 37 by bugdroid1@chromium.org, Nov 15 2017

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

commit 1af7ef8e07906bb78bad909989e8916fbf6d82b7
Author: Eric Seckler <eseckler@chromium.org>
Date: Wed Nov 15 11:01:30 2017

[devtools] Round-trip through renderer for device emulation updates.

Headless would like to know when the device emulation overrides are
applied in the renderer, so that we know the renderer is ready for a new
frame to be composited.

Right now, we achieve this by adding an explicit round trip through
Runtime.Evaluate after any call to set/clearDeviceMetricsOverride.

It'd be much more convenient if set/clearDeviceMetricsOverride would
wait for the override to be applied in the renderer before answering to
the DevTools client. It seems the simplest solution for this is to
handle the command in both browser and renderer, and let the renderer
answer to the client after the override has been applied.

Bug: 646774
Change-Id: Ie088573c0a29eb229c91d4a0413ee0d0b0d540cb
Reviewed-on: https://chromium-review.googlesource.com/768817
Commit-Queue: Eric Seckler <eseckler@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#516664}
[modify] https://crrev.com/1af7ef8e07906bb78bad909989e8916fbf6d82b7/content/browser/devtools/protocol/emulation_handler.cc
[modify] https://crrev.com/1af7ef8e07906bb78bad909989e8916fbf6d82b7/third_party/WebKit/Source/core/inspector/InspectorEmulationAgent.cpp
[modify] https://crrev.com/1af7ef8e07906bb78bad909989e8916fbf6d82b7/third_party/WebKit/Source/core/inspector/InspectorEmulationAgent.h
[modify] https://crrev.com/1af7ef8e07906bb78bad909989e8916fbf6d82b7/third_party/WebKit/Source/core/inspector/inspector_protocol_config.json

Project Member

Comment 38 by bugdroid1@chromium.org, Nov 15 2017

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

commit dc6d5998445f09afcc7a9eaaae0a77e97f7de3ec
Author: Eric Seckler <eseckler@chromium.org>
Date: Wed Nov 15 14:50:11 2017

[headless] Remove renderer round trip from BeginFrameControlViewportTest

As of https://crrev.com/c/768817, the round trip is no longer necessary
as it is included in the response of SetDeviceMetricsOverride.

Bug: 646774
Change-Id: I9266240ddb84bdaec2a6e08299753e15a832154c
Reviewed-on: https://chromium-review.googlesource.com/771832
Commit-Queue: Alex Clarke <alexclarke@chromium.org>
Commit-Queue: Eric Seckler <eseckler@chromium.org>
Reviewed-by: Alex Clarke <alexclarke@chromium.org>
Cr-Commit-Position: refs/heads/master@{#516695}
[modify] https://crrev.com/dc6d5998445f09afcc7a9eaaae0a77e97f7de3ec/headless/lib/headless_web_contents_browsertest.cc

Project Member

Comment 39 by bugdroid1@chromium.org, Nov 17 2017

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

commit 9d233af11d07a637c300f92dd72b11bf1c4ce59c
Author: Eric Seckler <eseckler@chromium.org>
Date: Fri Nov 17 15:37:43 2017

[devtools] Support virtual time floats, report time base.

Moves virtual time offsets and durations from int to float to allow
specifying virtual time budgets with higher precision.

Also adds a return value to Emulation.setVirtualTimePolicy, to report
the absolute time when virtual time was first enabled.

Bug: 646774
Change-Id: I37fc197f2e9565bf5540fc3787a288a7ac11fa7e
Reviewed-on: https://chromium-review.googlesource.com/749948
Commit-Queue: Eric Seckler <eseckler@chromium.org>
Reviewed-by: Yuta Kitamura <yutak@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Reviewed-by: Alex Clarke <alexclarke@chromium.org>
Cr-Commit-Position: refs/heads/master@{#517400}
[modify] https://crrev.com/9d233af11d07a637c300f92dd72b11bf1c4ce59c/headless/lib/virtual_time_browsertest.cc
[modify] https://crrev.com/9d233af11d07a637c300f92dd72b11bf1c4ce59c/headless/public/util/virtual_time_controller_test.cc
[modify] https://crrev.com/9d233af11d07a637c300f92dd72b11bf1c4ce59c/third_party/WebKit/Source/core/inspector/InspectorEmulationAgent.cpp
[modify] https://crrev.com/9d233af11d07a637c300f92dd72b11bf1c4ce59c/third_party/WebKit/Source/core/inspector/InspectorEmulationAgent.h
[modify] https://crrev.com/9d233af11d07a637c300f92dd72b11bf1c4ce59c/third_party/WebKit/Source/core/inspector/browser_protocol.json
[modify] https://crrev.com/9d233af11d07a637c300f92dd72b11bf1c4ce59c/third_party/WebKit/Source/platform/scheduler/renderer/renderer_scheduler_impl.cc
[modify] https://crrev.com/9d233af11d07a637c300f92dd72b11bf1c4ce59c/third_party/WebKit/Source/platform/scheduler/renderer/renderer_scheduler_impl.h
[modify] https://crrev.com/9d233af11d07a637c300f92dd72b11bf1c4ce59c/third_party/WebKit/Source/platform/scheduler/renderer/web_view_scheduler.h
[modify] https://crrev.com/9d233af11d07a637c300f92dd72b11bf1c4ce59c/third_party/WebKit/Source/platform/scheduler/renderer/web_view_scheduler_impl.cc
[modify] https://crrev.com/9d233af11d07a637c300f92dd72b11bf1c4ce59c/third_party/WebKit/Source/platform/scheduler/renderer/web_view_scheduler_impl.h
[modify] https://crrev.com/9d233af11d07a637c300f92dd72b11bf1c4ce59c/third_party/WebKit/Source/platform/scheduler/test/fake_web_view_scheduler.h
[modify] https://crrev.com/9d233af11d07a637c300f92dd72b11bf1c4ce59c/third_party/WebKit/Source/platform/wtf/Time.h

Project Member

Comment 40 by bugdroid1@chromium.org, Nov 28 2017

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

commit 98ab6f55f176e776b698691357a7bef80b36db60
Author: Eric Seckler <eseckler@chromium.org>
Date: Tue Nov 28 17:36:00 2017

headless: Use virtual time stamps in CompositorController.

This aligns animations with virtual time progression when
the CompositorController is used to issue BeginFrames.

Also updates VirtualTimeController to use TimeDeltas instead
of millisecond ints and initializes BeginFrameArgs frame_time
to its minimum value by default to support emulated negative
base::TimeTicks values in continuity DCHECKS throughout the
compositor code.

Bug: 646774
Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel
Change-Id: Ia28ab131dd1a327907f8570a1f26ce794208d3d4
Reviewed-on: https://chromium-review.googlesource.com/790910
Commit-Queue: Eric Seckler <eseckler@chromium.org>
Reviewed-by: Alex Clarke <alexclarke@chromium.org>
Reviewed-by: Sami Kyöstilä <skyostil@chromium.org>
Cr-Commit-Position: refs/heads/master@{#519725}
[modify] https://crrev.com/98ab6f55f176e776b698691357a7bef80b36db60/components/viz/common/frame_sinks/begin_frame_args.cc
[modify] https://crrev.com/98ab6f55f176e776b698691357a7bef80b36db60/components/viz/common/frame_sinks/begin_frame_source.cc
[modify] https://crrev.com/98ab6f55f176e776b698691357a7bef80b36db60/headless/lib/browser/headless_devtools_manager_delegate.cc
[modify] https://crrev.com/98ab6f55f176e776b698691357a7bef80b36db60/headless/public/util/compositor_controller.cc
[modify] https://crrev.com/98ab6f55f176e776b698691357a7bef80b36db60/headless/public/util/compositor_controller.h
[modify] https://crrev.com/98ab6f55f176e776b698691357a7bef80b36db60/headless/public/util/compositor_controller_browsertest.cc
[modify] https://crrev.com/98ab6f55f176e776b698691357a7bef80b36db60/headless/public/util/compositor_controller_unittest.cc
[modify] https://crrev.com/98ab6f55f176e776b698691357a7bef80b36db60/headless/public/util/virtual_time_controller.cc
[modify] https://crrev.com/98ab6f55f176e776b698691357a7bef80b36db60/headless/public/util/virtual_time_controller.h
[modify] https://crrev.com/98ab6f55f176e776b698691357a7bef80b36db60/headless/public/util/virtual_time_controller_test.cc
[modify] https://crrev.com/98ab6f55f176e776b698691357a7bef80b36db60/headless/test/headless_render_test.cc

Blockedon: 791012
Blockedon: 796531
Blockedon: 796532
Project Member

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

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

commit 8af8c0e5516658a5758f32b24ff7cdd826ac23d4
Author: Eric Seckler <eseckler@chromium.org>
Date: Wed Jan 17 23:45:53 2018

headless/cc/viz: Add animate_only BeginFrame param.

See design doc here: http://bit.ly/bfc-animations.

The headless::CompositorController runs intermediate BeginFrames
while loading a page, for which we would like to avoid doing more
work than necessary.

This patch adds a new animate_only BeginFrame parameter.
When this param is set, only select surfaces / BeginFrameObservers receive
the BeginFrame. The compositor defers main frame commits for such
BeginFrames and the main frame also skips the painting lifecycle phases,
which are unnecessary since the commit will be aborted.

Bug: 646774
TBR: thakis@chromium.org
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I7b6aa6425461af572c62b75351d7812dd6fbedc6
Reviewed-on: https://chromium-review.googlesource.com/808964
Commit-Queue: Eric Seckler <eseckler@chromium.org>
Reviewed-by: Brian Salomon <bsalomon@chromium.org>
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: enne <enne@chromium.org>
Reviewed-by: Sami Kyöstilä <skyostil@chromium.org>
Cr-Commit-Position: refs/heads/master@{#529951}
[modify] https://crrev.com/8af8c0e5516658a5758f32b24ff7cdd826ac23d4/cc/scheduler/scheduler.cc
[modify] https://crrev.com/8af8c0e5516658a5758f32b24ff7cdd826ac23d4/cc/scheduler/scheduler.h
[modify] https://crrev.com/8af8c0e5516658a5758f32b24ff7cdd826ac23d4/cc/test/layer_tree_test.cc
[modify] https://crrev.com/8af8c0e5516658a5758f32b24ff7cdd826ac23d4/cc/test/layer_tree_test.h
[modify] https://crrev.com/8af8c0e5516658a5758f32b24ff7cdd826ac23d4/cc/test/stub_layer_tree_host_client.h
[modify] https://crrev.com/8af8c0e5516658a5758f32b24ff7cdd826ac23d4/cc/test/test_hooks.h
[modify] https://crrev.com/8af8c0e5516658a5758f32b24ff7cdd826ac23d4/cc/trees/layer_tree_host.cc
[modify] https://crrev.com/8af8c0e5516658a5758f32b24ff7cdd826ac23d4/cc/trees/layer_tree_host.h
[modify] https://crrev.com/8af8c0e5516658a5758f32b24ff7cdd826ac23d4/cc/trees/layer_tree_host_client.h
[modify] https://crrev.com/8af8c0e5516658a5758f32b24ff7cdd826ac23d4/cc/trees/layer_tree_host_perftest.cc
[modify] https://crrev.com/8af8c0e5516658a5758f32b24ff7cdd826ac23d4/cc/trees/layer_tree_host_unittest.cc
[modify] https://crrev.com/8af8c0e5516658a5758f32b24ff7cdd826ac23d4/cc/trees/layer_tree_host_unittest_animation.cc
[modify] https://crrev.com/8af8c0e5516658a5758f32b24ff7cdd826ac23d4/cc/trees/layer_tree_host_unittest_scroll.cc
[modify] https://crrev.com/8af8c0e5516658a5758f32b24ff7cdd826ac23d4/cc/trees/proxy_main.cc
[modify] https://crrev.com/8af8c0e5516658a5758f32b24ff7cdd826ac23d4/cc/trees/proxy_main.h
[modify] https://crrev.com/8af8c0e5516658a5758f32b24ff7cdd826ac23d4/cc/trees/single_thread_proxy.cc
[modify] https://crrev.com/8af8c0e5516658a5758f32b24ff7cdd826ac23d4/components/viz/client/client_layer_tree_frame_sink.cc
[modify] https://crrev.com/8af8c0e5516658a5758f32b24ff7cdd826ac23d4/components/viz/client/client_layer_tree_frame_sink.h
[modify] https://crrev.com/8af8c0e5516658a5758f32b24ff7cdd826ac23d4/components/viz/common/frame_sinks/begin_frame_args.cc
[modify] https://crrev.com/8af8c0e5516658a5758f32b24ff7cdd826ac23d4/components/viz/common/frame_sinks/begin_frame_args.h
[modify] https://crrev.com/8af8c0e5516658a5758f32b24ff7cdd826ac23d4/components/viz/common/frame_sinks/begin_frame_args_unittest.cc
[modify] https://crrev.com/8af8c0e5516658a5758f32b24ff7cdd826ac23d4/components/viz/common/frame_sinks/begin_frame_source.cc
[modify] https://crrev.com/8af8c0e5516658a5758f32b24ff7cdd826ac23d4/components/viz/common/frame_sinks/begin_frame_source.h
[modify] https://crrev.com/8af8c0e5516658a5758f32b24ff7cdd826ac23d4/components/viz/common/frame_sinks/begin_frame_source_unittest.cc
[modify] https://crrev.com/8af8c0e5516658a5758f32b24ff7cdd826ac23d4/components/viz/service/display/display_scheduler.cc
[modify] https://crrev.com/8af8c0e5516658a5758f32b24ff7cdd826ac23d4/components/viz/service/frame_sinks/compositor_frame_sink_impl.cc
[modify] https://crrev.com/8af8c0e5516658a5758f32b24ff7cdd826ac23d4/components/viz/service/frame_sinks/compositor_frame_sink_impl.h
[modify] https://crrev.com/8af8c0e5516658a5758f32b24ff7cdd826ac23d4/components/viz/service/frame_sinks/compositor_frame_sink_support.cc
[modify] https://crrev.com/8af8c0e5516658a5758f32b24ff7cdd826ac23d4/components/viz/service/frame_sinks/compositor_frame_sink_support.h
[modify] https://crrev.com/8af8c0e5516658a5758f32b24ff7cdd826ac23d4/components/viz/service/frame_sinks/primary_begin_frame_source.cc
[modify] https://crrev.com/8af8c0e5516658a5758f32b24ff7cdd826ac23d4/components/viz/service/frame_sinks/primary_begin_frame_source.h
[modify] https://crrev.com/8af8c0e5516658a5758f32b24ff7cdd826ac23d4/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc
[modify] https://crrev.com/8af8c0e5516658a5758f32b24ff7cdd826ac23d4/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.h
[modify] https://crrev.com/8af8c0e5516658a5758f32b24ff7cdd826ac23d4/components/viz/service/surfaces/surface_dependency_deadline.cc
[modify] https://crrev.com/8af8c0e5516658a5758f32b24ff7cdd826ac23d4/components/viz/service/surfaces/surface_dependency_deadline.h
[modify] https://crrev.com/8af8c0e5516658a5758f32b24ff7cdd826ac23d4/components/viz/test/begin_frame_source_test.cc
[modify] https://crrev.com/8af8c0e5516658a5758f32b24ff7cdd826ac23d4/components/viz/test/begin_frame_source_test.h
[modify] https://crrev.com/8af8c0e5516658a5758f32b24ff7cdd826ac23d4/components/viz/test/test_layer_tree_frame_sink.cc
[modify] https://crrev.com/8af8c0e5516658a5758f32b24ff7cdd826ac23d4/components/viz/test/test_layer_tree_frame_sink.h
[modify] https://crrev.com/8af8c0e5516658a5758f32b24ff7cdd826ac23d4/content/browser/renderer_host/browser_compositor_view_mac.h
[modify] https://crrev.com/8af8c0e5516658a5758f32b24ff7cdd826ac23d4/content/browser/renderer_host/browser_compositor_view_mac.mm
[modify] https://crrev.com/8af8c0e5516658a5758f32b24ff7cdd826ac23d4/content/browser/renderer_host/compositor_impl_android.cc
[modify] https://crrev.com/8af8c0e5516658a5758f32b24ff7cdd826ac23d4/content/browser/renderer_host/compositor_impl_android.h
[modify] https://crrev.com/8af8c0e5516658a5758f32b24ff7cdd826ac23d4/content/browser/renderer_host/delegated_frame_host.cc
[modify] https://crrev.com/8af8c0e5516658a5758f32b24ff7cdd826ac23d4/content/browser/renderer_host/delegated_frame_host.h
[modify] https://crrev.com/8af8c0e5516658a5758f32b24ff7cdd826ac23d4/content/browser/renderer_host/render_widget_host_impl.cc
[modify] https://crrev.com/8af8c0e5516658a5758f32b24ff7cdd826ac23d4/content/browser/renderer_host/render_widget_host_impl.h
[modify] https://crrev.com/8af8c0e5516658a5758f32b24ff7cdd826ac23d4/content/browser/renderer_host/render_widget_host_view_android.cc
[modify] https://crrev.com/8af8c0e5516658a5758f32b24ff7cdd826ac23d4/content/browser/renderer_host/render_widget_host_view_android.h
[modify] https://crrev.com/8af8c0e5516658a5758f32b24ff7cdd826ac23d4/content/browser/renderer_host/render_widget_host_view_aura.cc
[modify] https://crrev.com/8af8c0e5516658a5758f32b24ff7cdd826ac23d4/content/browser/renderer_host/render_widget_host_view_aura.h
[modify] https://crrev.com/8af8c0e5516658a5758f32b24ff7cdd826ac23d4/content/browser/renderer_host/render_widget_host_view_child_frame.cc
[modify] https://crrev.com/8af8c0e5516658a5758f32b24ff7cdd826ac23d4/content/browser/renderer_host/render_widget_host_view_child_frame.h
[modify] https://crrev.com/8af8c0e5516658a5758f32b24ff7cdd826ac23d4/content/browser/renderer_host/render_widget_host_view_mac.h
[modify] https://crrev.com/8af8c0e5516658a5758f32b24ff7cdd826ac23d4/content/browser/renderer_host/render_widget_host_view_mac.mm
[modify] https://crrev.com/8af8c0e5516658a5758f32b24ff7cdd826ac23d4/content/public/browser/render_widget_host_view.h
[modify] https://crrev.com/8af8c0e5516658a5758f32b24ff7cdd826ac23d4/content/renderer/gpu/render_widget_compositor.cc
[modify] https://crrev.com/8af8c0e5516658a5758f32b24ff7cdd826ac23d4/content/renderer/gpu/render_widget_compositor.h
[modify] https://crrev.com/8af8c0e5516658a5758f32b24ff7cdd826ac23d4/content/renderer/gpu/render_widget_compositor_delegate.h
[modify] https://crrev.com/8af8c0e5516658a5758f32b24ff7cdd826ac23d4/content/renderer/gpu/render_widget_compositor_unittest.cc
[modify] https://crrev.com/8af8c0e5516658a5758f32b24ff7cdd826ac23d4/content/renderer/render_thread_impl.cc
[modify] https://crrev.com/8af8c0e5516658a5758f32b24ff7cdd826ac23d4/content/renderer/render_widget.cc
[modify] https://crrev.com/8af8c0e5516658a5758f32b24ff7cdd826ac23d4/content/renderer/render_widget.h
[modify] https://crrev.com/8af8c0e5516658a5758f32b24ff7cdd826ac23d4/content/test/test_render_view_host.h
[modify] https://crrev.com/8af8c0e5516658a5758f32b24ff7cdd826ac23d4/headless/lib/browser/headless_devtools_manager_delegate.cc
[modify] https://crrev.com/8af8c0e5516658a5758f32b24ff7cdd826ac23d4/headless/lib/browser/headless_web_contents_impl.cc
[modify] https://crrev.com/8af8c0e5516658a5758f32b24ff7cdd826ac23d4/headless/lib/browser/headless_web_contents_impl.h
[modify] https://crrev.com/8af8c0e5516658a5758f32b24ff7cdd826ac23d4/headless/lib/headless_content_main_delegate.cc
[modify] https://crrev.com/8af8c0e5516658a5758f32b24ff7cdd826ac23d4/headless/public/util/DEPS
[modify] https://crrev.com/8af8c0e5516658a5758f32b24ff7cdd826ac23d4/headless/public/util/compositor_controller.cc
[modify] https://crrev.com/8af8c0e5516658a5758f32b24ff7cdd826ac23d4/headless/public/util/compositor_controller.h
[modify] https://crrev.com/8af8c0e5516658a5758f32b24ff7cdd826ac23d4/headless/public/util/compositor_controller_browsertest.cc
[modify] https://crrev.com/8af8c0e5516658a5758f32b24ff7cdd826ac23d4/headless/public/util/compositor_controller_unittest.cc
[modify] https://crrev.com/8af8c0e5516658a5758f32b24ff7cdd826ac23d4/headless/test/headless_browser_test.cc
[modify] https://crrev.com/8af8c0e5516658a5758f32b24ff7cdd826ac23d4/services/ui/ws/compositor_frame_sink_client_binding.cc
[modify] https://crrev.com/8af8c0e5516658a5758f32b24ff7cdd826ac23d4/services/ui/ws/compositor_frame_sink_client_binding.h
[modify] https://crrev.com/8af8c0e5516658a5758f32b24ff7cdd826ac23d4/services/ui/ws/frame_generator_unittest.cc
[modify] https://crrev.com/8af8c0e5516658a5758f32b24ff7cdd826ac23d4/services/viz/public/cpp/compositing/begin_frame_args_struct_traits.cc
[modify] https://crrev.com/8af8c0e5516658a5758f32b24ff7cdd826ac23d4/services/viz/public/cpp/compositing/begin_frame_args_struct_traits.h
[modify] https://crrev.com/8af8c0e5516658a5758f32b24ff7cdd826ac23d4/services/viz/public/cpp/compositing/struct_traits_unittest.cc
[modify] https://crrev.com/8af8c0e5516658a5758f32b24ff7cdd826ac23d4/services/viz/public/interfaces/compositing/begin_frame_args.mojom
[modify] https://crrev.com/8af8c0e5516658a5758f32b24ff7cdd826ac23d4/services/viz/public/interfaces/compositing/compositor_frame_sink.mojom
[modify] https://crrev.com/8af8c0e5516658a5758f32b24ff7cdd826ac23d4/third_party/WebKit/Source/core/exported/WebPagePopupImpl.cpp
[modify] https://crrev.com/8af8c0e5516658a5758f32b24ff7cdd826ac23d4/third_party/WebKit/Source/core/exported/WebPagePopupImpl.h
[modify] https://crrev.com/8af8c0e5516658a5758f32b24ff7cdd826ac23d4/third_party/WebKit/Source/core/exported/WebViewImpl.cpp
[modify] https://crrev.com/8af8c0e5516658a5758f32b24ff7cdd826ac23d4/third_party/WebKit/Source/core/exported/WebViewImpl.h
[modify] https://crrev.com/8af8c0e5516658a5758f32b24ff7cdd826ac23d4/third_party/WebKit/Source/core/frame/WebFrameWidgetImpl.cpp
[modify] https://crrev.com/8af8c0e5516658a5758f32b24ff7cdd826ac23d4/third_party/WebKit/Source/core/frame/WebFrameWidgetImpl.h
[modify] https://crrev.com/8af8c0e5516658a5758f32b24ff7cdd826ac23d4/third_party/WebKit/Source/core/frame/WebViewFrameWidget.cpp
[modify] https://crrev.com/8af8c0e5516658a5758f32b24ff7cdd826ac23d4/third_party/WebKit/Source/core/frame/WebViewFrameWidget.h
[modify] https://crrev.com/8af8c0e5516658a5758f32b24ff7cdd826ac23d4/third_party/WebKit/Source/core/inspector/browser_protocol.json
[modify] https://crrev.com/8af8c0e5516658a5758f32b24ff7cdd826ac23d4/third_party/WebKit/Source/core/inspector/browser_protocol.pdl
[modify] https://crrev.com/8af8c0e5516658a5758f32b24ff7cdd826ac23d4/third_party/WebKit/Source/core/page/PageAnimator.cpp
[modify] https://crrev.com/8af8c0e5516658a5758f32b24ff7cdd826ac23d4/third_party/WebKit/Source/core/page/PageAnimator.h
[modify] https://crrev.com/8af8c0e5516658a5758f32b24ff7cdd826ac23d4/third_party/WebKit/Source/core/page/PageWidgetDelegate.cpp
[modify] https://crrev.com/8af8c0e5516658a5758f32b24ff7cdd826ac23d4/third_party/WebKit/Source/core/page/PageWidgetDelegate.h
[modify] https://crrev.com/8af8c0e5516658a5758f32b24ff7cdd826ac23d4/third_party/WebKit/Source/platform/graphics/VideoFrameSubmitterTest.cpp
[modify] https://crrev.com/8af8c0e5516658a5758f32b24ff7cdd826ac23d4/third_party/WebKit/Source/platform/testing/WebLayerTreeViewImplForTesting.cpp
[modify] https://crrev.com/8af8c0e5516658a5758f32b24ff7cdd826ac23d4/third_party/WebKit/Source/platform/testing/WebLayerTreeViewImplForTesting.h
[modify] https://crrev.com/8af8c0e5516658a5758f32b24ff7cdd826ac23d4/third_party/WebKit/public/web/WebWidget.h
[modify] https://crrev.com/8af8c0e5516658a5758f32b24ff7cdd826ac23d4/ui/compositor/compositor.cc
[modify] https://crrev.com/8af8c0e5516658a5758f32b24ff7cdd826ac23d4/ui/compositor/compositor.h

Project Member

Comment 45 by bugdroid1@chromium.org, Feb 23 2018

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

commit 1e411dbab719343673955fe20e7ae0aedbf23605
Author: Eric Seckler <eseckler@chromium.org>
Date: Fri Feb 23 13:21:45 2018

cc: SchedulerStateMachine to always need BeginFrames in full-pipe mode.

In full-pipe mode, it was previously possible that the very first
BeginFrame sent to the renderer was dropped by SchedulerStateMachine
if commits were (still) deferred during cc's initialization. With this
change, SchedulerStateMachine will run each BeginFrame to its deadline,
including BeginFrames that it doesn't otherwise need. When commits are
deferred, the BeginFrame deadline for the first BeginFrame will thus
block until commits are no longer deferred.

Bug: 646774
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.android:android_optional_gpu_tests_rel
Change-Id: I8f3508a32c27d78de59558e4d1b8131f8f9eee6f
Reviewed-on: https://chromium-review.googlesource.com/931721
Commit-Queue: Eric Seckler <eseckler@chromium.org>
Reviewed-by: Sami Kyöstilä <skyostil@chromium.org>
Cr-Commit-Position: refs/heads/master@{#538771}
[modify] https://crrev.com/1e411dbab719343673955fe20e7ae0aedbf23605/cc/scheduler/scheduler.cc
[modify] https://crrev.com/1e411dbab719343673955fe20e7ae0aedbf23605/cc/scheduler/scheduler_state_machine.cc
[modify] https://crrev.com/1e411dbab719343673955fe20e7ae0aedbf23605/cc/scheduler/scheduler_unittest.cc

Project Member

Comment 46 by bugdroid1@chromium.org, Mar 1 2018

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

commit 9781fb9306793f956ad1e9c15b68e27642bdc480
Author: Eric Seckler <eseckler@chromium.org>
Date: Thu Mar 01 15:27:33 2018

headless: Add browser test for animated GIFs.

The new test verifies that animated GIFs don't produce CompositorFrames
for animate_only BeginFrames and that their animation is aligned with
virtual time progression.

Also replaces use of --enable-surface-synchronization flag with Feature
and adds a trace event for impl-side invalidations to cc::Scheduler.

Bug: 646774
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.android:android_optional_gpu_tests_rel
Change-Id: I24f5a3ab14588f787b3dd571223b4737574929d8
Reviewed-on: https://chromium-review.googlesource.com/941562
Reviewed-by: Fady Samuel <fsamuel@chromium.org>
Reviewed-by: Khushal <khushalsagar@chromium.org>
Reviewed-by: Alex Clarke <alexclarke@chromium.org>
Commit-Queue: Eric Seckler <eseckler@chromium.org>
Cr-Commit-Position: refs/heads/master@{#540160}
[modify] https://crrev.com/9781fb9306793f956ad1e9c15b68e27642bdc480/cc/scheduler/scheduler.cc
[modify] https://crrev.com/9781fb9306793f956ad1e9c15b68e27642bdc480/headless/lib/DEPS
[modify] https://crrev.com/9781fb9306793f956ad1e9c15b68e27642bdc480/headless/lib/headless_web_contents_browsertest.cc
[modify] https://crrev.com/9781fb9306793f956ad1e9c15b68e27642bdc480/headless/public/util/DEPS
[modify] https://crrev.com/9781fb9306793f956ad1e9c15b68e27642bdc480/headless/public/util/compositor_controller_browsertest.cc
[add] https://crrev.com/9781fb9306793f956ad1e9c15b68e27642bdc480/headless/test/data/animated_gif.html
[add] https://crrev.com/9781fb9306793f956ad1e9c15b68e27642bdc480/headless/test/data/animated_square.gif
[add] https://crrev.com/9781fb9306793f956ad1e9c15b68e27642bdc480/headless/test/data/blank.html

Project Member

Comment 47 by bugdroid1@chromium.org, Mar 2 2018

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

commit 62877094b51e2237c76c5f004b02632f69859ee5
Author: Eric Seckler <eseckler@chromium.org>
Date: Fri Mar 02 23:20:21 2018

headless/cc: Add flag to disable image animation resync.

Adds a command line flag that disables resetting image animations to
their beginning to avoid skipping frames. This is needed to make image
animations work correctly with virtual time progression for headless's
deterministic rendering mode.

Bug: 646774
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.android:android_optional_gpu_tests_rel
Change-Id: I3f39352950ca7608f6cb6dd20267fac0e57ee774
Reviewed-on: https://chromium-review.googlesource.com/946372
Reviewed-by: Khushal <khushalsagar@chromium.org>
Reviewed-by: Antoine Labour <piman@chromium.org>
Commit-Queue: Eric Seckler <eseckler@chromium.org>
Cr-Commit-Position: refs/heads/master@{#540676}
[modify] https://crrev.com/62877094b51e2237c76c5f004b02632f69859ee5/cc/trees/image_animation_controller.cc
[modify] https://crrev.com/62877094b51e2237c76c5f004b02632f69859ee5/cc/trees/image_animation_controller.h
[modify] https://crrev.com/62877094b51e2237c76c5f004b02632f69859ee5/cc/trees/image_animation_controller_unittest.cc
[modify] https://crrev.com/62877094b51e2237c76c5f004b02632f69859ee5/cc/trees/layer_tree_host_impl.cc
[modify] https://crrev.com/62877094b51e2237c76c5f004b02632f69859ee5/cc/trees/layer_tree_settings.h
[modify] https://crrev.com/62877094b51e2237c76c5f004b02632f69859ee5/content/browser/renderer_host/render_process_host_impl.cc
[modify] https://crrev.com/62877094b51e2237c76c5f004b02632f69859ee5/content/public/common/content_switches.cc
[modify] https://crrev.com/62877094b51e2237c76c5f004b02632f69859ee5/content/public/common/content_switches.h
[modify] https://crrev.com/62877094b51e2237c76c5f004b02632f69859ee5/content/renderer/gpu/render_widget_compositor.cc
[modify] https://crrev.com/62877094b51e2237c76c5f004b02632f69859ee5/headless/public/util/compositor_controller_browsertest.cc

Project Member

Comment 48 by bugdroid1@chromium.org, Mar 5 2018

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

commit 31046631118dbb65a0b128437a5875200409d382
Author: Eric Seckler <eseckler@chromium.org>
Date: Mon Mar 05 16:26:12 2018

headless: Add a CompositorController test for CSS animations

Adds a browsertest that verifies CSS animation properties.

Bug: 646774
Change-Id: I12eeb74ce5a97a1c6b0d09e82bb8cf062faacc93
Reviewed-on: https://chromium-review.googlesource.com/948853
Reviewed-by: Alex Clarke <alexclarke@chromium.org>
Commit-Queue: Eric Seckler <eseckler@chromium.org>
Cr-Commit-Position: refs/heads/master@{#540835}
[modify] https://crrev.com/31046631118dbb65a0b128437a5875200409d382/headless/public/util/compositor_controller_browsertest.cc
[add] https://crrev.com/31046631118dbb65a0b128437a5875200409d382/headless/test/data/css_animation.html

Owner: ----
Status: Available (was: Assigned)
This is mostly done now, the only thing missing is making this a non-experimental devtools feature and supporting it in headfull mode, too. See https://docs.google.com/document/d/1PppegrpXhOzKKAuNlP6XOEnviXFGUiX2hop00Cxcv4o/edit#bookmark=id.onk6slknd690 for details on the latter.
Owner: pfeldman@chromium.org
Status: Assigned (was: Available)
Off to pfeldman@ to reassign further.
Hi!

I'm trying to use HeadlessExperimental API to achieve rendering control. My goal is to capture screenshots in a fast way using experimental API.
But, after creating Target with "enableBeginFrameControl: true" page is not rendering at all.
I found this issue by debugging Chrome. Content is present and valid, however, the page is just blank. Any suggestions?

My code:

//other stuff...

client = await CDP('ws://localhost:9222/devtools/browser');

 const {Target} = client;
        const {browserContextId} = await Target.createBrowserContext();

        const {targetId} = await Target.createTarget({
            url: url,
            width: viewportWidth,
            height: viewportHeight,
            enableBeginFrameControl: true
        });

  client = await CDP({target: targetId});

const {DOM, Emulation, Network, Page, Runtime, Security, HeadlessExperimental} = client;

   await Page.enable();
        await DOM.enable();
        await Network.enable();
await HeadlessExperimental.enable();

await Page.navigate({url});
await Page.loadEventFired();

// this event is not fired (blank screen issue I guess)
await HeadlessExperimental.needsBeginFramesChanged();

//other stuff

Thanks in advance.
valid_content_not_rendered.png
157 KB View Download
I'd encourage you to have a look at these tests for a working example:
https://cs.chromium.org/chromium/src/headless/lib/headless_web_contents_browsertest.cc?l=447

See also bit.ly/headless-rendering for documentation. In particular, there are some additional command line flags neccessary for the use of BeginFrameControl.
I've tried both from the example command line flags "--run-all-compositor-stages-before-draw --disable-new-content-rendering-timeout --disable-checker-imaging --disable-threaded-animation --disable-threaded-scrolling --enable-surface-synchronization" and with flags from the documentation 
"  --enable-surface-synchronization
    --run-all-compositor-stages-before-draw
    --disable-threaded-animation
    --disable-threaded-scrolling
    --disable-checker-imaging"

It produces the same result, rendering is not started, blank screen. Event "HeadlessExperimental.needsBeginFramesChanged()" is not fired.
#53: Maybe you're somehow missing the initial HeadlessExperimental.needsBeginFramesChanged event. It may be sent before the Headless.enable command completes. Try setting an async event handler for it before sending Headless.enable?
Thank you for the fast response, eseckler. That helped :)
What I am surprised about, it the fact, that with opening gif with a target
Target.createTarget({
            url: 'about:blank',
            width: 600,
            height: 350,
            enableBeginFrameControl: true
        });

I could have 70 fps with capturing PNG screenshots. Opening Youtube (as an animated example) with the same resolution produces 7 fps. Why does it fall so dramatically?

let screenshot = await HeadlessExperimental.beginFrame({
                                            screenshot: {
                                                format: 'png'
                                            }
                                        });

Of course, fps could be increased by reducing screenshot quality, but in general, I don't see fps increase comparing to default Page.captureScreenshot. Is that expected?
It's not expected that taking a single screenshot of an animation is more efficient with BeginFrameControl as compared to Page.captureScreenshot.

You can however combine sending BeginFrames with virtual time (see bit.ly/headless-rendering and the CompositorController tests here [1]) to capture frames at specific timestamps of an animation. This wouldn't be a real-time capture anymore though.

[1] https://cs.chromium.org/chromium/src/headless/public/util/compositor_controller_browsertest.cc
Owner: caseq@chromium.org
Hello,

First of all thanks for the wonderful project guys, I've been a follower of this issue for a long time now. I've managed to get everything working though, the base64 from all of the images are the same, from the tests and the documentation, I was expecting that using the frameTime parameters, I'd be able to render frames at times I specified:

      let framesChanged;

      HeadlessExperimental.needsBeginFramesChanged().then(function(result) {
        framesChanged = result.needsBeginFrames;
      }).catch(error => console.log(error));

      await HeadlessExperimental.enable();

      await Network.setCacheDisabled({cacheDisabled: true});

      await Page.navigate({url: 'https://media.giphy.com/media/3o85xt08p2Y0hanhwQ/giphy.gif'});
      await Page.loadEventFired();

      let currentTime = new Date().getTime();

      if (framesChanged) {
        let initalResult = await HeadlessExperimental.beginFrame();

        console.log(initalResult);
      } else {
        HeadlessExperimental.needsBeginFramesChanged().then(function(result) {
          framesChanged = result.needsBeginFrames;
        }).catch(error => console.log(error));
      }

      let screenshot = await HeadlessExperimental.beginFrame({
          frameTime: currentTime + 2000,
          screenshot: {
              format: 'png'
          }
      });

      console.log(screenshot);

      let screenshot2 = await HeadlessExperimental.beginFrame({
          frameTime: currentTime + 3000,
          screenshot: {
              format: 'png'
          }
      });

      console.log(screenshot2);
To set specific times for animated gifs etc reliably, you'll want to use virtual time, see #57.
Thanks for the fast reply Eric, besides reliability, isn't the frametime parameter supposed to render the frame in the specified timestamp?
The reason I'm asking is because the base64 outputs I receive after calling the beginframes is exactly the same although I specify different frameTime parameters.
Providing the frame timestamp only works reliably when using virtual time. Otherwise certain aspects of the page may use the frame timestamp you've provided, but others might not and use real time instead.
Hello Eric,

Thanks very much now I'm able to render screenshots at given times but not always. I've tried implementing it like this to no avail, would you be kind enough to help me on this? It sometimes works on some animations and sometimes it doesn't and skips a lot of frames (non deterministic). It's for a 25 fps / 10 seconds animation.

Here is my code:

            totalFrameCount = 250;
            delay = 500;

            let epoch = await Emulation.setVirtualTimePolicy({policy: 'pauseIfNetworkFetchesPending', budget: totalFrameCount * 40});
            epoch = epoch.virtualTimeBase;

            console.log(epoch);

            var frameCount = 0;

            async function reallocateBudget() {
                if (frameCount < totalFrameCount) {
                    epoch = await Emulation.setVirtualTimePolicy({policy: 'pauseIfNetworkFetchesPending', budget: totalFrameCount * 40)});
                    epoch = epoch.virtualTimeBase;
                }
            }

            client.on('Emulation.virtualTimeBudgetExpired', reallocateBudget);

            if (framesChanged) {
                let initalResult = await HeadlessExperimental.beginFrame({
                    frameTime: epoch,
                    interval: 40
                });

                console.log(initalResult);
            } else {
                HeadlessExperimental.needsBeginFramesChanged().then(function(result) {
                    framesChanged = result.needsBeginFrames;
                }).catch(error => console.log(error));
            }

            let screenshotBuffer;

            var folderName = Math.random().toString(36).substring(7);

            for (var i = 0; i < parseInt(totalFrameCount); i++) {
                screenshotBuffer = await HeadlessExperimental.beginFrame({
                    frameTime: epoch + parseInt(delay) + (i * 40),
                    screenshot: {
                        format: 'jpeg',
                        quality: 88
                    }
                });

                frameCount++;
            }
In the current situation it generates the first 50 frames correctly but the 51th frame is the screenshot that is supposed to be at the end of the animation. All the frames between are lost.
Try to make sure that you issue the beginFrame commands only while virtual time is paused, i.e. after the budget has elapsed and before you grant the next budget. Otherwise there's no guarantee at which timestamp the frame will be generated.
Thanks Eric for the quick reply, I'll try that. How much budget should I give? Also after pausing the virtual time what should the frameTime be? Is the current method ok? Epoch plus 40ms for a 25 fps capture (1000/25)?
I've updated my code accordingly Eric thanks, but after frame 51, the 52nd frame is too far ahead into the animation (end of the animation exactly), but weirdly if I set the frameTime explicitly for 52nd frame instead of running in a for loop, the correct screenshot is produced and no frames are skipped:

Loop (The screenshots are skipped to the end of the animation after frame 52):

        let frameCount = 200;

        async function reallocateBudget() {
            console.log('Budget spent.')
        }

        client.on('Emulation.virtualTimeBudgetExpired', reallocateBudget);

        let epoch = await Emulation.setVirtualTimePolicy({policy: 'pauseIfNetworkFetchesPending', budget: 10000});
        let virtualTimeBase = epoch.virtualTimeBase;

        let initialResult = await HeadlessExperimental.beginFrame({
            frameTime: virtualTimeBase,
            interval: 40
        });

        console.log(initialResult);

        for (var i = 1; i < frameCount + 1; i++) {
            await Emulation.setVirtualTimePolicy({policy: 'pauseIfNetworkFetchesPending', budget: 10000});

            screenshotBuffer = await HeadlessExperimental.beginFrame({
                frameTime: virtualTimeBase + (i * 40),
                screenshot: {
                    format: 'jpeg',
                    quality: 88
                }
            });

            fsPath.writeFile("frame-" + i + ".jpeg", screenshotBuffer.screenshotData, 'base64', function(error) {
                if (error) {
                    sendNotification(9, "Could not save frame " + i + " to the directory.", error);
                } else {
                    console.log("Frame " + i + " created.");
                }
            });
        }

Explicit Frame (Correct screenshot in animation):

        let frameCount = 200;

        async function reallocateBudget() {
            console.log('Budget spent.')
        }

        client.on('Emulation.virtualTimeBudgetExpired', reallocateBudget);

        let epoch = await Emulation.setVirtualTimePolicy({policy: 'pauseIfNetworkFetchesPending', budget: 10000});
        let virtualTimeBase = epoch.virtualTimeBase;

        let initialResult = await HeadlessExperimental.beginFrame({
            frameTime: virtualTimeBase,
            interval: 40
        });

        console.log(initialResult);

        let explicitFrame = await HeadlessExperimental.beginFrame({
            frameTime: virtualTimeBase + 2200,
            screenshot: {
                format: 'jpeg',
                quality: 88
            }
        });

        fsPath.writeFile("frame-" + 52 + ".jpeg", explicitFrame.screenshotData, 'base64', function(error) {
            if (error) {
                sendNotification(9, "Could not save frame " + 2 + " to the directory.", error);
            } else {
                console.log("Frame " + 52 + " created.");
            }
        });

I'm not sure what you're trying to accomplish exactly, but here's what I'd do if I wanted to capture an animation at a specific FPS:

0) init virtual time in paused state, no budget. save |ts = virtual_time_base|.
1) capture a screenshot at |frame_time = ts|.
2) grant |FPS/1000 ms| of virtual time, e.g. 100ms if capturing at 10 FPS.
3) on virtual time expiration, update |ts += FPS/1000ms| and capture another screenshot at |ts|.
4) go to 2 and repeat until you've reached your desired end timestamp.

What you're doing isn't quite that. Try to ensure that the virtual time matches your frame timestamps and use the virtualTimeBudgetExpired event to initiate the next screenshot, i.e. after you grant VT, you should always wait for the expiration event.

Sign in to add a comment