Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(91)

Issue 67023003: cc: Don't double-tick unthrottled FrameRateController (Closed)

Created:
7 years, 1 month ago by Sami
Modified:
7 years, 1 month ago
Reviewers:
brianderson, enne (OOO)
CC:
chromium-reviews, cc-bugs_chromium.org
Visibility:
Public.

Description

cc: Don't double-tick unthrottled FrameRateController When the FrameRateController is configured with a non-throttling time source (i.e., vsync is off), it posts the next tick task manually whenever it is active at the end of a previous tick. However, it also posts a manual tick task when a swap buffers call completes to make sure rendering doesn't stall. These two tick task sources combined can lead to an expential growth of tick tasks. Consider the following call tree where each edge is an asynchronous task: OnTimerTick | | | `--------------------. | | BeginImplFrame | Deadline | | | OnSwapBuffers | Complete | | | OnTimerTick OnTimerTick | | | | | `--------. | `----------. | | | | BeginImplFrame | BeginImplFrame | Deadline | Deadline | | | | | OnSwapBuffers | OnSwapBuffers | Complete | Complete | | | | | OnTimerTick OnTimerTick OnTimerTick OnTimerTick | | | | | | | | : : : : : : : : (etc.) In practice this situation happens if both the impl and main threads request a BeginFrame and when the tick task runs, the scheduler isn't ready to draw because the previous BeginFrame deadline hasn't triggered yet. This means the the pending swap count never increases to the throttling limit and each timer tick causes another one to get queued. Once the deadline triggers and we do swap, the swap completion spawns a parallel line of tick tasks. This patch fixes the problem by only queueing a new tick task if we haven't queued one already. BUG=312960 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=235178

Patch Set 1 #

Total comments: 1

Patch Set 2 : Pull out change to disable deadline scheduling. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+39 lines, -7 lines) Patch
M cc/scheduler/frame_rate_controller.h View 1 chunk +1 line, -0 lines 0 comments Download
M cc/scheduler/frame_rate_controller.cc View 5 chunks +9 lines, -3 lines 0 comments Download
M cc/scheduler/frame_rate_controller_unittest.cc View 2 chunks +29 lines, -4 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
Sami
Enne, maybe you could have a look at this while Brian's out? Sorry for the ...
7 years, 1 month ago (2013-11-08 17:05:47 UTC) #1
Sami
Friendly ping?
7 years, 1 month ago (2013-11-13 11:07:58 UTC) #2
enne (OOO)
lgtm, but https://codereview.chromium.org/67023003/diff/1/cc/trees/layer_tree_host_perftest.cc File cc/trees/layer_tree_host_perftest.cc (right): https://codereview.chromium.org/67023003/diff/1/cc/trees/layer_tree_host_perftest.cc#newcode49 cc/trees/layer_tree_host_perftest.cc:49: settings->deadline_scheduling_enabled = false; Can you put this ...
7 years, 1 month ago (2013-11-13 20:42:16 UTC) #3
Sami
Thanks! On 2013/11/13 20:42:16, enne wrote: > lgtm, but > > https://codereview.chromium.org/67023003/diff/1/cc/trees/layer_tree_host_perftest.cc > File cc/trees/layer_tree_host_perftest.cc ...
7 years, 1 month ago (2013-11-14 11:15:22 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/skyostil@chromium.org/67023003/100001
7 years, 1 month ago (2013-11-14 11:15:34 UTC) #5
commit-bot: I haz the power
Commit queue rejected this change because the description was changed between the time the change ...
7 years, 1 month ago (2013-11-14 17:10:40 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/skyostil@chromium.org/67023003/100001
7 years, 1 month ago (2013-11-14 17:47:00 UTC) #7
commit-bot: I haz the power
7 years, 1 month ago (2013-11-14 17:50:21 UTC) #8
Message was sent while issue was closed.
Change committed as 235178

Powered by Google App Engine
This is Rietveld 408576698