OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "sky/engine/config.h" | |
6 #include "sky/engine/core/view/View.h" | 5 #include "sky/engine/core/view/View.h" |
7 | 6 |
8 namespace blink { | 7 namespace blink { |
9 | 8 |
10 PassRefPtr<View> View::create(const base::Closure& scheduleFrameCallback) | 9 PassRefPtr<View> View::create(const base::Closure& scheduleFrameCallback) |
11 { | 10 { |
12 return adoptRef(new View(scheduleFrameCallback)); | 11 return adoptRef(new View(scheduleFrameCallback)); |
13 } | 12 } |
14 | 13 |
15 View::View(const base::Closure& scheduleFrameCallback) | 14 View::View(const base::Closure& scheduleFrameCallback) |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 | 67 |
69 void View::beginFrame(base::TimeTicks frameTime) | 68 void View::beginFrame(base::TimeTicks frameTime) |
70 { | 69 { |
71 if (!m_beginFrameCallback) | 70 if (!m_beginFrameCallback) |
72 return; | 71 return; |
73 double frameTimeMS = (frameTime - base::TimeTicks()).InMillisecondsF(); | 72 double frameTimeMS = (frameTime - base::TimeTicks()).InMillisecondsF(); |
74 m_beginFrameCallback->handleEvent(frameTimeMS); | 73 m_beginFrameCallback->handleEvent(frameTimeMS); |
75 } | 74 } |
76 | 75 |
77 } // namespace blink | 76 } // namespace blink |
OLD | NEW |