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

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

Issue 16871016: cc: Use BeginFrameArgs (Closed) Base URL: http://git.chromium.org/chromium/src.git@bfargs2
Patch Set: Many optimizations. Address comments. Created 7 years, 6 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 | « no previous file | cc/scheduler/scheduler.h » ('j') | cc/scheduler/scheduler.h » ('J')
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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 base::TimeDelta BeginFrameArgs::DefaultDeadlineAdjustment() { 51 base::TimeDelta BeginFrameArgs::DefaultDeadlineAdjustment() {
52 #if defined(OS_ANDROID)
53 return base::TimeDelta::FromMicroseconds(-16666/3);
54 #else
52 // Using a large deadline adjustment will effectively revert BeginFrame 55 // Using a large deadline adjustment will effectively revert BeginFrame
53 // scheduling to the hard vsync scheduling we used to have. 56 // scheduling to the hard vsync scheduling we used to have.
54 return base::TimeDelta::FromSeconds(-1); 57 return base::TimeDelta::FromSeconds(-1);
58 #endif
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 69
66 } // namespace cc 70 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/scheduler/scheduler.h » ('j') | cc/scheduler/scheduler.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698