[cc] Disable frame throttling when frame rate is unlimited. [chromium/src : main]

83 views
Skip to first unread message

Andrew Wolfers (Gerrit)

unread,
Aug 31, 2022, 7:20:39 PM8/31/22
to Jonathan Ross, cc-...@chromium.org, schedule...@chromium.org

Attention is currently required from: Jonathan Ross.

Andrew Wolfers would like Jonathan Ross to review this change.

View Change

[cc] Disable frame throttling when frame rate is unlimited.

Running with the `--disable-frame-rate-limit` arg is supposed to allow
frames to be rendered at the maximum possible rate, but instead the
framerate is throttled such that it cannot exceed the display refresh
rate.

This CL prevents throttling when the `--disable-frame-rate-limit` arg
is set so that the framerate is correctly uncapped.

Bug: b:242953824
Change-Id: Ibdcd9c7217c51914f55e60aa33f894c633b6689f
---
M cc/scheduler/scheduler_state_machine.cc
1 file changed, 25 insertions(+), 1 deletion(-)

diff --git a/cc/scheduler/scheduler_state_machine.cc b/cc/scheduler/scheduler_state_machine.cc
index 0f9872b..e5e1a7b 100644
--- a/cc/scheduler/scheduler_state_machine.cc
+++ b/cc/scheduler/scheduler_state_machine.cc
@@ -5,11 +5,13 @@
#include "cc/scheduler/scheduler_state_machine.h"

#include "base/check_op.h"
+#include "base/command_line.h"
#include "base/format_macros.h"
#include "base/notreached.h"
#include "base/trace_event/trace_event.h"
#include "base/trace_event/traced_value.h"
#include "base/values.h"
+#include "components/viz/common/switches.h"

namespace cc {

@@ -1327,7 +1329,11 @@
}

bool SchedulerStateMachine::IsDrawThrottled() const {
- return pending_submit_frames_ >= kMaxPendingSubmitFrames;
+ static bool is_frame_rate_limit_disabled =
+ base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kDisableFrameRateLimit);
+ return pending_submit_frames_ >= kMaxPendingSubmitFrames &&
+ !is_frame_rate_limit_disabled;
}

void SchedulerStateMachine::SetVisible(bool visible) {

To view, visit change 3863575. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Ibdcd9c7217c51914f55e60aa33f894c633b6689f
Gerrit-Change-Number: 3863575
Gerrit-PatchSet: 1
Gerrit-Owner: Andrew Wolfers <aswo...@chromium.org>
Gerrit-Reviewer: Andrew Wolfers <aswo...@chromium.org>
Gerrit-Reviewer: Jonathan Ross <jon...@chromium.org>
Gerrit-Attention: Jonathan Ross <jon...@chromium.org>
Gerrit-MessageType: newchange

Andrew Wolfers (Gerrit)

unread,
Aug 31, 2022, 7:20:49 PM8/31/22
to cc-...@chromium.org, schedule...@chromium.org, Jonathan Ross, Chromium LUCI CQ, chromium...@chromium.org

Attention is currently required from: Jonathan Ross.

View Change

    To view, visit change 3863575. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: Ibdcd9c7217c51914f55e60aa33f894c633b6689f
    Gerrit-Change-Number: 3863575
    Gerrit-PatchSet: 1
    Gerrit-Owner: Andrew Wolfers <aswo...@chromium.org>
    Gerrit-Reviewer: Andrew Wolfers <aswo...@chromium.org>
    Gerrit-Reviewer: Jonathan Ross <jon...@chromium.org>
    Gerrit-Attention: Jonathan Ross <jon...@chromium.org>
    Gerrit-Comment-Date: Wed, 31 Aug 2022 23:20:36 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: No
    Gerrit-MessageType: comment

    Jonathan Ross (Gerrit)

    unread,
    Sep 6, 2022, 10:50:44 AM9/6/22
    to Andrew Wolfers, cc-...@chromium.org, schedule...@chromium.org, Chromium LUCI CQ, chromium...@chromium.org

    Attention is currently required from: Andrew Wolfers.

    View Change

    2 comments:

    • File cc/scheduler/scheduler_state_machine.cc:

      • Patch Set #1, Line 1332:

         static bool is_frame_rate_limit_disabled =
        base::CommandLine::ForCurrentProcess()->HasSwitch(
        switches::kDisableFrameRateLimit);

        Can this be added to `SchedulerSettings` as a param for this class?

        `static bool` is discouraged for how it interacts with testing

      • Patch Set #1, Line 1335: pending_submit_frames_ >= kMaxPendingSubmitFrames

        This waits on ACKs from the GPU process. With `--disable-frame-rate-limit` on do we know which `Surface::FrameData::SendAckIfNeeded` was being skipped leading to this throttle being hit?

        For example, if it was in `Surface::QueueFrame` do we know if these newly submitted frames are being processed/displayed?

    To view, visit change 3863575. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: Ibdcd9c7217c51914f55e60aa33f894c633b6689f
    Gerrit-Change-Number: 3863575
    Gerrit-PatchSet: 1
    Gerrit-Owner: Andrew Wolfers <aswo...@chromium.org>
    Gerrit-Reviewer: Andrew Wolfers <aswo...@chromium.org>
    Gerrit-Reviewer: Jonathan Ross <jon...@chromium.org>
    Gerrit-Attention: Andrew Wolfers <aswo...@chromium.org>
    Gerrit-Comment-Date: Tue, 06 Sep 2022 14:50:30 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Gerrit-MessageType: comment

    Andrew Wolfers (Gerrit)

    unread,
    Sep 6, 2022, 5:07:27 PM9/6/22
    to cc-...@chromium.org, schedule...@chromium.org, Jonathan Ross, Chromium LUCI CQ, chromium...@chromium.org

    Attention is currently required from: Jonathan Ross.

    View Change

    2 comments:

    • File cc/scheduler/scheduler_state_machine.cc:

      • Patch Set #1, Line 1332:

         static bool is_frame_rate_limit_disabled =
        base::CommandLine::ForCurrentProcess()->HasSwitch(
        switches::kDisableFrameRateLimit);

      • Can this be added to `SchedulerSettings` as a param for this class? […]

        Done

      • This waits on ACKs from the GPU process. […]

        Yes it was `Surface::QueueFrame`, and I believe yes they are being processed in the new version. They aren't literally displayed since the display doesn't refresh that fast, but it my testing `requestAnimationFrame` is being invoked at 1000fps.

    To view, visit change 3863575. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: Ibdcd9c7217c51914f55e60aa33f894c633b6689f
    Gerrit-Change-Number: 3863575
    Gerrit-PatchSet: 2
    Gerrit-Owner: Andrew Wolfers <aswo...@chromium.org>
    Gerrit-Reviewer: Andrew Wolfers <aswo...@chromium.org>
    Gerrit-Reviewer: Jonathan Ross <jon...@chromium.org>
    Gerrit-Attention: Jonathan Ross <jon...@chromium.org>
    Gerrit-Comment-Date: Tue, 06 Sep 2022 21:07:13 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Jonathan Ross <jon...@chromium.org>
    Gerrit-MessageType: comment

    Jonathan Ross (Gerrit)

    unread,
    Sep 6, 2022, 6:43:18 PM9/6/22
    to Andrew Wolfers, cc-...@chromium.org, schedule...@chromium.org, Chromium LUCI CQ, chromium...@chromium.org

    Attention is currently required from: Andrew Wolfers.

    View Change

    1 comment:

    • File cc/scheduler/scheduler_state_machine.cc:

      • Patch Set #1, Line 1335: pending_submit_frames_ >= kMaxPendingSubmitFrames

        Yes it was `Surface::QueueFrame`, and I believe yes they are being processed in the new version. […]

        Glad to hear that it leads to the uncapped `rAF`

        I realize the displaying will still be tied to the display rate. I'm curious as to the interaction of the 1000fps `rAF` vs how Surface handles activating/committing/uncommitted frames.

        IIRC the latest frame will display at the VSync time. However there is an internal cap on the `uncommitted` frames. So I'm wondering if this would lead to us dropping a large amount of the submitted frames.

        Could you take a "Rendering" trace? There's a bunch of "viz" category traces in Surface I'd be interested in seeing.

    To view, visit change 3863575. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: Ibdcd9c7217c51914f55e60aa33f894c633b6689f
    Gerrit-Change-Number: 3863575
    Gerrit-PatchSet: 2
    Gerrit-Owner: Andrew Wolfers <aswo...@chromium.org>
    Gerrit-Reviewer: Andrew Wolfers <aswo...@chromium.org>
    Gerrit-Reviewer: Jonathan Ross <jon...@chromium.org>
    Gerrit-Attention: Andrew Wolfers <aswo...@chromium.org>
    Gerrit-Comment-Date: Tue, 06 Sep 2022 22:43:02 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Jonathan Ross <jon...@chromium.org>
    Comment-In-Reply-To: Andrew Wolfers <aswo...@chromium.org>
    Gerrit-MessageType: comment

    Andrew Wolfers (Gerrit)

    unread,
    Sep 7, 2022, 10:08:22 AM9/7/22
    to cc-...@chromium.org, schedule...@chromium.org, Jonathan Ross, Chromium LUCI CQ, chromium...@chromium.org

    Attention is currently required from: Jonathan Ross.

    View Change

    1 comment:

    • File cc/scheduler/scheduler_state_machine.cc:

      • Glad to hear that it leads to the uncapped `rAF` […]

        Done (emailed to you). I think it does look like a large number of frames are dropped as you say. Very interested to hear what you learn from the trace.

    To view, visit change 3863575. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: Ibdcd9c7217c51914f55e60aa33f894c633b6689f
    Gerrit-Change-Number: 3863575
    Gerrit-PatchSet: 2
    Gerrit-Owner: Andrew Wolfers <aswo...@chromium.org>
    Gerrit-Reviewer: Andrew Wolfers <aswo...@chromium.org>
    Gerrit-Reviewer: Jonathan Ross <jon...@chromium.org>
    Gerrit-Attention: Jonathan Ross <jon...@chromium.org>
    Gerrit-Comment-Date: Wed, 07 Sep 2022 14:08:07 +0000

    Jonathan Ross (Gerrit)

    unread,
    Sep 8, 2022, 2:43:47 PM9/8/22
    to Stefan Zager, cc-...@chromium.org, schedule...@chromium.org, Andrew Wolfers

    Attention is currently required from: Andrew Wolfers, Stefan Zager.

    Jonathan Ross would like Stefan Zager to review this change authored by Andrew Wolfers.

    View Change

    [cc] Disable frame throttling when frame rate is unlimited.

    Running with the `--disable-frame-rate-limit` arg is supposed to allow
    frames to be rendered at the maximum possible rate, but instead the
    framerate is throttled such that it cannot exceed the display refresh
    rate.

    This CL prevents throttling when the `--disable-frame-rate-limit` arg
    is set so that the framerate is correctly uncapped.

    Bug: b:242953824
    Change-Id: Ibdcd9c7217c51914f55e60aa33f894c633b6689f
    ---
    M cc/scheduler/scheduler_settings.cc
    M cc/scheduler/scheduler_settings.h
    M cc/scheduler/scheduler_state_machine.cc
    M cc/trees/layer_tree_settings.cc
    M cc/trees/layer_tree_settings.h
    M third_party/blink/renderer/platform/widget/compositing/layer_tree_settings.cc
    M ui/compositor/compositor.cc
    7 files changed, 36 insertions(+), 1 deletion(-)


    To view, visit change 3863575. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: Ibdcd9c7217c51914f55e60aa33f894c633b6689f
    Gerrit-Change-Number: 3863575
    Gerrit-PatchSet: 2
    Gerrit-Owner: Andrew Wolfers <aswo...@chromium.org>
    Gerrit-Reviewer: Andrew Wolfers <aswo...@chromium.org>
    Gerrit-Reviewer: Jonathan Ross <jon...@chromium.org>
    Gerrit-Reviewer: Stefan Zager <sza...@chromium.org>
    Gerrit-Attention: Stefan Zager <sza...@chromium.org>
    Gerrit-Attention: Andrew Wolfers <aswo...@chromium.org>
    Gerrit-MessageType: newchange

    Jonathan Ross (Gerrit)

    unread,
    Sep 8, 2022, 2:44:00 PM9/8/22
    to Andrew Wolfers, cc-...@chromium.org, schedule...@chromium.org, Stefan Zager, Chromium LUCI CQ, chromium...@chromium.org

    Attention is currently required from: Andrew Wolfers, Stefan Zager.

    View Change

    2 comments:

    • Patchset:

      • Patch Set #2:

        +szager@ as an owner of third_party/blink/renderer/platform/OWNERS and cc/scheduling

        This change sgtm. `disable-frame-rate-limit` already shifts Renderer/GPU process to use back-to-back BeginFrames. The GPU process however was still waiting to VSync before ACKing the accepted/activated frame.

        Removing the cc:scheduler back-pressure mechanism when using this flag makes sense to me. Looking at the traces the Renderer was able to submit as it was ready in response to begin frames. While the GPU process was able to activate each frame in turn, and await VSync for actually drawing/displaying.

    • File cc/scheduler/scheduler_state_machine.cc:

      • Done (emailed to you). I think it does look like a large number of frames are dropped as you say. […]

        From the trace, Viz was successfully activating each new CompositorFrame that was submitted. Which would result in the desired effect of the newest submitted frame being drawn/presented at VSync.

        This sgtm, thanks!

    To view, visit change 3863575. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: Ibdcd9c7217c51914f55e60aa33f894c633b6689f
    Gerrit-Change-Number: 3863575
    Gerrit-PatchSet: 2
    Gerrit-Owner: Andrew Wolfers <aswo...@chromium.org>
    Gerrit-Reviewer: Andrew Wolfers <aswo...@chromium.org>
    Gerrit-Reviewer: Jonathan Ross <jon...@chromium.org>
    Gerrit-Reviewer: Stefan Zager <sza...@chromium.org>
    Gerrit-Attention: Stefan Zager <sza...@chromium.org>
    Gerrit-Attention: Andrew Wolfers <aswo...@chromium.org>
    Gerrit-Comment-Date: Thu, 08 Sep 2022 18:43:43 +0000

    Stefan Zager (Gerrit)

    unread,
    Sep 8, 2022, 2:57:53 PM9/8/22
    to Andrew Wolfers, cc-...@chromium.org, schedule...@chromium.org, Jonathan Ross, Chromium LUCI CQ, chromium...@chromium.org

    Attention is currently required from: Andrew Wolfers.

    View Change

    1 comment:

    To view, visit change 3863575. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: Ibdcd9c7217c51914f55e60aa33f894c633b6689f
    Gerrit-Change-Number: 3863575
    Gerrit-PatchSet: 2
    Gerrit-Owner: Andrew Wolfers <aswo...@chromium.org>
    Gerrit-Reviewer: Andrew Wolfers <aswo...@chromium.org>
    Gerrit-Reviewer: Jonathan Ross <jon...@chromium.org>
    Gerrit-Reviewer: Stefan Zager <sza...@chromium.org>
    Gerrit-Attention: Andrew Wolfers <aswo...@chromium.org>
    Gerrit-Comment-Date: Thu, 08 Sep 2022 18:57:41 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Gerrit-MessageType: comment

    Andrew Wolfers (Gerrit)

    unread,
    Sep 8, 2022, 3:47:07 PM9/8/22
    to cc-...@chromium.org, schedule...@chromium.org, Stefan Zager, Jonathan Ross, Chromium LUCI CQ, chromium...@chromium.org

    Attention is currently required from: Jonathan Ross, Stefan Zager.

    View Change

    2 comments:

    • File cc/scheduler/scheduler_state_machine.cc:

      • From the trace, Viz was successfully activating each new CompositorFrame that was submitted. […]

        Thanks!

    • File third_party/blink/renderer/platform/widget/compositing/layer_tree_settings.cc:

      • Can you make WidgetBase::RequestNewLayerTreeFrameSink use this setting now, rather than looking at t […]

        Done

    To view, visit change 3863575. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: Ibdcd9c7217c51914f55e60aa33f894c633b6689f
    Gerrit-Change-Number: 3863575
    Gerrit-PatchSet: 3
    Gerrit-Owner: Andrew Wolfers <aswo...@chromium.org>
    Gerrit-Reviewer: Andrew Wolfers <aswo...@chromium.org>
    Gerrit-Reviewer: Jonathan Ross <jon...@chromium.org>
    Gerrit-Reviewer: Stefan Zager <sza...@chromium.org>
    Gerrit-Attention: Stefan Zager <sza...@chromium.org>
    Gerrit-Attention: Jonathan Ross <jon...@chromium.org>
    Gerrit-Comment-Date: Thu, 08 Sep 2022 19:46:49 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Stefan Zager <sza...@chromium.org>

    Stefan Zager (Gerrit)

    unread,
    Sep 8, 2022, 5:36:41 PM9/8/22
    to Andrew Wolfers, cc-...@chromium.org, schedule...@chromium.org, Jonathan Ross, Chromium LUCI CQ, chromium...@chromium.org

    Attention is currently required from: Andrew Wolfers.

    Patch set 3:Code-Review +1

    View Change

    1 comment:

    To view, visit change 3863575. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: Ibdcd9c7217c51914f55e60aa33f894c633b6689f
    Gerrit-Change-Number: 3863575
    Gerrit-PatchSet: 3
    Gerrit-Owner: Andrew Wolfers <aswo...@chromium.org>
    Gerrit-Reviewer: Andrew Wolfers <aswo...@chromium.org>
    Gerrit-Reviewer: Jonathan Ross <jon...@chromium.org>
    Gerrit-Reviewer: Stefan Zager <sza...@chromium.org>
    Gerrit-Attention: Andrew Wolfers <aswo...@chromium.org>
    Gerrit-Comment-Date: Thu, 08 Sep 2022 21:36:17 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    Gerrit-MessageType: comment

    Andrew Wolfers (Gerrit)

    unread,
    Sep 8, 2022, 7:58:59 PM9/8/22
    to Robert Flack, cc-...@chromium.org, schedule...@chromium.org, Stefan Zager, Jonathan Ross

    Attention is currently required from: Robert Flack.

    Andrew Wolfers would like Robert Flack to review this change.

    View Change

    [cc] Disable frame throttling when frame rate is unlimited.

    Running with the `--disable-frame-rate-limit` arg is supposed to allow
    frames to be rendered at the maximum possible rate, but instead the
    framerate is throttled such that it cannot exceed the display refresh
    rate.

    This CL prevents throttling when the `--disable-frame-rate-limit` arg
    is set so that the framerate is correctly uncapped.

    Bug: b:242953824
    Change-Id: Ibdcd9c7217c51914f55e60aa33f894c633b6689f
    ---
    M cc/scheduler/scheduler_settings.cc
    M cc/scheduler/scheduler_settings.h
    M cc/scheduler/scheduler_state_machine.cc
    M cc/trees/layer_tree_settings.cc
    M cc/trees/layer_tree_settings.h
    M third_party/blink/renderer/platform/widget/compositing/layer_tree_settings.cc
    M third_party/blink/renderer/platform/widget/widget_base.cc
    M ui/compositor/compositor.cc
    8 files changed, 37 insertions(+), 5 deletions(-)


    To view, visit change 3863575. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: Ibdcd9c7217c51914f55e60aa33f894c633b6689f
    Gerrit-Change-Number: 3863575
    Gerrit-PatchSet: 3
    Gerrit-Owner: Andrew Wolfers <aswo...@chromium.org>
    Gerrit-Reviewer: Andrew Wolfers <aswo...@chromium.org>
    Gerrit-Reviewer: Jonathan Ross <jon...@chromium.org>
    Gerrit-Reviewer: Robert Flack <fla...@chromium.org>
    Gerrit-Reviewer: Stefan Zager <sza...@chromium.org>
    Gerrit-Attention: Robert Flack <fla...@chromium.org>
    Gerrit-MessageType: newchange

    Andrew Wolfers (Gerrit)

    unread,
    Sep 8, 2022, 7:59:16 PM9/8/22
    to cc-...@chromium.org, schedule...@chromium.org, Robert Flack, Stefan Zager, Jonathan Ross, Chromium LUCI CQ, chromium...@chromium.org

    Attention is currently required from: Robert Flack.

    View Change

    1 comment:

    • Patchset:

      • Patch Set #3:

        +@flackr for owners approval on ui/compositor/compositor.cc

    To view, visit change 3863575. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: Ibdcd9c7217c51914f55e60aa33f894c633b6689f
    Gerrit-Change-Number: 3863575
    Gerrit-PatchSet: 3
    Gerrit-Owner: Andrew Wolfers <aswo...@chromium.org>
    Gerrit-Reviewer: Andrew Wolfers <aswo...@chromium.org>
    Gerrit-Reviewer: Jonathan Ross <jon...@chromium.org>
    Gerrit-Reviewer: Robert Flack <fla...@chromium.org>
    Gerrit-Reviewer: Stefan Zager <sza...@chromium.org>
    Gerrit-Attention: Robert Flack <fla...@chromium.org>
    Gerrit-Comment-Date: Thu, 08 Sep 2022 23:58:55 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Gerrit-MessageType: comment

    Robert Flack (Gerrit)

    unread,
    Sep 9, 2022, 4:20:41 PM9/9/22
    to Andrew Wolfers, cc-...@chromium.org, schedule...@chromium.org, Stefan Zager, Jonathan Ross, Chromium LUCI CQ, chromium...@chromium.org

    Attention is currently required from: Andrew Wolfers, Jonathan Ross.

    View Change

    1 comment:

    • File cc/scheduler/scheduler_state_machine.cc:

      • Patch Set #3, Line 1331: !settings_.disable_frame_rate_limit;

        What happens when we submit more than 1 pending frame at a time? Are they all eventually drawn and acked or do we only draw the latest one?

        I feel like this may have implications on how realistic the unlimited frame rate is.

    To view, visit change 3863575. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: Ibdcd9c7217c51914f55e60aa33f894c633b6689f
    Gerrit-Change-Number: 3863575
    Gerrit-PatchSet: 3
    Gerrit-Owner: Andrew Wolfers <aswo...@chromium.org>
    Gerrit-Reviewer: Andrew Wolfers <aswo...@chromium.org>
    Gerrit-Reviewer: Jonathan Ross <jon...@chromium.org>
    Gerrit-Reviewer: Robert Flack <fla...@chromium.org>
    Gerrit-Reviewer: Stefan Zager <sza...@chromium.org>
    Gerrit-Attention: Jonathan Ross <jon...@chromium.org>
    Gerrit-Attention: Andrew Wolfers <aswo...@chromium.org>
    Gerrit-Comment-Date: Fri, 09 Sep 2022 20:20:24 +0000

    Jonathan Ross (Gerrit)

    unread,
    Sep 9, 2022, 4:54:08 PM9/9/22
    to Andrew Wolfers, cc-...@chromium.org, schedule...@chromium.org, Robert Flack, Stefan Zager, Chromium LUCI CQ, chromium...@chromium.org

    Attention is currently required from: Andrew Wolfers, Robert Flack.

    View Change

    1 comment:

    • File cc/scheduler/scheduler_state_machine.cc:

      • What happens when we submit more than 1 pending frame at a time? Are they all eventually drawn and a […]

        On non-WebView the GPU process will activate each newly arrived frame. Then await VSync for actually drawing/displaying. At which time the most recently submitted frame will be used.

        There is some extra complexity if there is on-going changes to visual properties (like a window resize.) Where a different deadline is applied to activating surfaces that have dependencies on others. However we should still be activating the newest frame from the client.

        WebView has some extra complexity with how it enqueues/activates frames. So there we can end up presenting one frame older than the newest submitted one.

        aswolfers@ sent me a trace of this. There the Renderer was successfully submitting multiple frames within a VSync and the GPU only attempted to draw-and-swap once.

    To view, visit change 3863575. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: Ibdcd9c7217c51914f55e60aa33f894c633b6689f
    Gerrit-Change-Number: 3863575
    Gerrit-PatchSet: 3
    Gerrit-Owner: Andrew Wolfers <aswo...@chromium.org>
    Gerrit-Reviewer: Andrew Wolfers <aswo...@chromium.org>
    Gerrit-Reviewer: Jonathan Ross <jon...@chromium.org>
    Gerrit-Reviewer: Robert Flack <fla...@chromium.org>
    Gerrit-Reviewer: Stefan Zager <sza...@chromium.org>
    Gerrit-Attention: Robert Flack <fla...@chromium.org>
    Gerrit-Attention: Andrew Wolfers <aswo...@chromium.org>
    Gerrit-Comment-Date: Fri, 09 Sep 2022 20:53:41 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Robert Flack <fla...@chromium.org>
    Gerrit-MessageType: comment

    Robert Flack (Gerrit)

    unread,
    Sep 9, 2022, 5:46:23 PM9/9/22
    to Andrew Wolfers, cc-...@chromium.org, schedule...@chromium.org, Stefan Zager, Jonathan Ross, Chromium LUCI CQ, chromium...@chromium.org

    Attention is currently required from: Andrew Wolfers, Jonathan Ross.

    Patch set 3:Code-Review +1

    View Change

    1 comment:

    • File cc/scheduler/scheduler_state_machine.cc:

      • On non-WebView the GPU process will activate each newly arrived frame. […]

        Thanks, so IIUC we shouldn't end up with unacked submit frames accumulating, and at worst will be displaying slightly old frames which seems not a big deal for what is presumably a flag meant for benchmarking.

    To view, visit change 3863575. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: Ibdcd9c7217c51914f55e60aa33f894c633b6689f
    Gerrit-Change-Number: 3863575
    Gerrit-PatchSet: 3
    Gerrit-Owner: Andrew Wolfers <aswo...@chromium.org>
    Gerrit-Reviewer: Andrew Wolfers <aswo...@chromium.org>
    Gerrit-Reviewer: Jonathan Ross <jon...@chromium.org>
    Gerrit-Reviewer: Robert Flack <fla...@chromium.org>
    Gerrit-Reviewer: Stefan Zager <sza...@chromium.org>
    Gerrit-Attention: Jonathan Ross <jon...@chromium.org>
    Gerrit-Attention: Andrew Wolfers <aswo...@chromium.org>
    Gerrit-Comment-Date: Fri, 09 Sep 2022 21:46:10 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    Comment-In-Reply-To: Robert Flack <fla...@chromium.org>

    Andrew Wolfers (Gerrit)

    unread,
    Sep 12, 2022, 10:00:43 AM9/12/22
    to cc-...@chromium.org, schedule...@chromium.org, Robert Flack, Stefan Zager, Jonathan Ross, Chromium LUCI CQ, chromium...@chromium.org

    Attention is currently required from: Andrew Wolfers, Jonathan Ross.

    Patch set 3:Commit-Queue +2

    View Change

      To view, visit change 3863575. To unsubscribe, or for help writing mail filters, visit settings.

      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: Ibdcd9c7217c51914f55e60aa33f894c633b6689f
      Gerrit-Change-Number: 3863575
      Gerrit-PatchSet: 3
      Gerrit-Owner: Andrew Wolfers <aswo...@chromium.org>
      Gerrit-Reviewer: Andrew Wolfers <aswo...@chromium.org>
      Gerrit-Reviewer: Jonathan Ross <jon...@chromium.org>
      Gerrit-Reviewer: Robert Flack <fla...@chromium.org>
      Gerrit-Reviewer: Stefan Zager <sza...@chromium.org>
      Gerrit-Attention: Jonathan Ross <jon...@chromium.org>
      Gerrit-Attention: Andrew Wolfers <aswo...@chromium.org>
      Gerrit-Comment-Date: Mon, 12 Sep 2022 14:00:25 +0000
      Gerrit-HasComments: No
      Gerrit-Has-Labels: Yes
      Gerrit-MessageType: comment

      Chromium LUCI CQ (Gerrit)

      unread,
      Sep 12, 2022, 11:59:56 AM9/12/22
      to Andrew Wolfers, cc-...@chromium.org, schedule...@chromium.org, Robert Flack, Stefan Zager, Jonathan Ross, chromium...@chromium.org

      Chromium LUCI CQ submitted this change.

      View Change


      Approvals: Robert Flack: Looks good to me Stefan Zager: Looks good to me Andrew Wolfers: Commit
      [cc] Disable frame throttling when frame rate is unlimited.

      Running with the `--disable-frame-rate-limit` arg is supposed to allow
      frames to be rendered at the maximum possible rate, but instead the
      framerate is throttled such that it cannot exceed the display refresh
      rate.

      This CL prevents throttling when the `--disable-frame-rate-limit` arg
      is set so that the framerate is correctly uncapped.

      Bug: b:242953824
      Change-Id: Ibdcd9c7217c51914f55e60aa33f894c633b6689f
      Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3863575
      Commit-Queue: Andrew Wolfers <aswo...@chromium.org>
      Reviewed-by: Robert Flack <fla...@chromium.org>
      Reviewed-by: Stefan Zager <sza...@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#1045852}

      ---
      M cc/scheduler/scheduler_settings.cc
      M cc/scheduler/scheduler_settings.h
      M cc/scheduler/scheduler_state_machine.cc
      M cc/trees/layer_tree_settings.cc
      M cc/trees/layer_tree_settings.h
      M third_party/blink/renderer/platform/widget/compositing/layer_tree_settings.cc
      M third_party/blink/renderer/platform/widget/widget_base.cc
      M ui/compositor/compositor.cc
      8 files changed, 42 insertions(+), 5 deletions(-)


      To view, visit change 3863575. To unsubscribe, or for help writing mail filters, visit settings.

      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: Ibdcd9c7217c51914f55e60aa33f894c633b6689f
      Gerrit-Change-Number: 3863575
      Gerrit-PatchSet: 4
      Gerrit-Owner: Andrew Wolfers <aswo...@chromium.org>
      Gerrit-Reviewer: Andrew Wolfers <aswo...@chromium.org>
      Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
      Gerrit-Reviewer: Jonathan Ross <jon...@chromium.org>
      Gerrit-Reviewer: Robert Flack <fla...@chromium.org>
      Gerrit-Reviewer: Stefan Zager <sza...@chromium.org>
      Gerrit-MessageType: merged
      Reply all
      Reply to author
      Forward
      0 new messages