Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 "base/json/json_writer.h" | 5 #include "base/json/json_writer.h" |
| 6 #include "cc/output/begin_frame_args.h" | 6 #include "cc/output/begin_frame_args.h" |
| 7 #include "ui/gfx/frame_time.h" | 7 #include "ui/gfx/frame_time.h" |
| 8 | 8 |
| 9 namespace cc { | 9 namespace cc { |
| 10 | 10 |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 45 now = gfx::FrameTime::Now(); | 45 now = gfx::FrameTime::Now(); |
| 46 return BeginFrameArgs(now, base::TimeTicks(), DefaultInterval()); | 46 return BeginFrameArgs(now, base::TimeTicks(), DefaultInterval()); |
| 47 } | 47 } |
| 48 | 48 |
| 49 // This is a hard-coded deadline adjustment that assumes 60Hz, to be used in | 49 // This is a hard-coded deadline adjustment that assumes 60Hz, to be used in |
| 50 // cases where a good estimated draw time is not known. Using 1/3 of the vsync | 50 // cases where a good estimated draw time is not known. Using 1/3 of the vsync |
| 51 // as the default adjustment gives the Browser the last 1/3 of a frame to | 51 // as the default adjustment gives the Browser the last 1/3 of a frame to |
| 52 // produce output, the Renderer Impl thread the middle 1/3 of a frame to produce | 52 // produce output, the Renderer Impl thread the middle 1/3 of a frame to produce |
| 53 // ouput, and the Renderer Main thread the first 1/3 of a frame to produce | 53 // ouput, and the Renderer Main thread the first 1/3 of a frame to produce |
| 54 // output. | 54 // output. |
| 55 base::TimeDelta BeginFrameArgs::DefaultDeadlineAdjustment() { | 55 base::TimeDelta BeginFrameArgs::DefaultEstimatedParentDrawTime() { |
|
danakj
2014/06/06 22:45:45
+1 to the new name
| |
| 56 return base::TimeDelta::FromMicroseconds(-16666 / 3); | 56 return base::TimeDelta::FromMicroseconds(16666 / 3); |
| 57 } | 57 } |
| 58 | 58 |
| 59 base::TimeDelta BeginFrameArgs::DefaultInterval() { | 59 base::TimeDelta BeginFrameArgs::DefaultInterval() { |
| 60 return base::TimeDelta::FromMicroseconds(16666); | 60 return base::TimeDelta::FromMicroseconds(16666); |
| 61 } | 61 } |
| 62 | 62 |
| 63 base::TimeDelta BeginFrameArgs::DefaultRetroactiveBeginFramePeriod() { | 63 base::TimeDelta BeginFrameArgs::DefaultRetroactiveBeginFramePeriod() { |
| 64 return base::TimeDelta::FromMicroseconds(4444); | 64 return base::TimeDelta::FromMicroseconds(4444); |
| 65 } | 65 } |
| 66 | 66 |
| 67 } // namespace cc | 67 } // namespace cc |
| OLD | NEW |