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

Side by Side Diff: cc/output/begin_frame_args.cc

Issue 24304002: cc: Implement deadline scheduling disabled by default (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: rebase Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/output/begin_frame_args.h ('k') | cc/output/output_surface.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/output/begin_frame_args.h" 5 #include "cc/output/begin_frame_args.h"
6 6
7 namespace cc { 7 namespace cc {
8 8
9 BeginFrameArgs::BeginFrameArgs() 9 BeginFrameArgs::BeginFrameArgs()
10 : frame_time(base::TimeTicks()), 10 : frame_time(base::TimeTicks()),
(...skipping 30 matching lines...) Expand all
41 DefaultInterval()); 41 DefaultInterval());
42 } 42 }
43 43
44 BeginFrameArgs BeginFrameArgs::CreateExpiredForTesting() { 44 BeginFrameArgs BeginFrameArgs::CreateExpiredForTesting() {
45 base::TimeTicks now = base::TimeTicks::Now(); 45 base::TimeTicks now = base::TimeTicks::Now();
46 return BeginFrameArgs(now, 46 return BeginFrameArgs(now,
47 now - DefaultInterval(), 47 now - DefaultInterval(),
48 DefaultInterval()); 48 DefaultInterval());
49 } 49 }
50 50
51 // This is a hard-coded deadline adjustment that assumes 60Hz, to be used in
52 // cases where a good estimated draw time is not known. Using 1/3 of the vsync
53 // as the default adjustment gives the Browser the last 1/3 of a frame to
54 // produce output, the Renderer Impl thread the middle 1/3 of a frame to produce
55 // ouput, and the Renderer Main thread the first 1/3 of a frame to produce
56 // output.
51 base::TimeDelta BeginFrameArgs::DefaultDeadlineAdjustment() { 57 base::TimeDelta BeginFrameArgs::DefaultDeadlineAdjustment() {
52 // Using a large deadline adjustment will effectively revert BeginFrame 58 return base::TimeDelta::FromMicroseconds(-16666 / 3);
53 // scheduling to the hard vsync scheduling we used to have.
54 return base::TimeDelta::FromSeconds(-1);
55 } 59 }
56 60
57 base::TimeDelta BeginFrameArgs::DefaultInterval() { 61 base::TimeDelta BeginFrameArgs::DefaultInterval() {
58 return base::TimeDelta::FromMicroseconds(16666); 62 return base::TimeDelta::FromMicroseconds(16666);
59 } 63 }
60 64
61 base::TimeDelta BeginFrameArgs::DefaultRetroactiveBeginFramePeriod() { 65 base::TimeDelta BeginFrameArgs::DefaultRetroactiveBeginFramePeriod() {
62 return base::TimeDelta::FromMicroseconds(4444); 66 return base::TimeDelta::FromMicroseconds(4444);
63 } 67 }
64 68
65
66 } // namespace cc 69 } // namespace cc
OLDNEW
« no previous file with comments | « cc/output/begin_frame_args.h ('k') | cc/output/output_surface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698