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

Side by Side Diff: webkit/renderer/compositor_bindings/web_to_ccinput_handler_adapter.cc

Issue 15058004: cc: Rename VSync to BeginFrame (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fix Android Created 7 years, 7 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
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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 "webkit/renderer/compositor_bindings/web_to_ccinput_handler_adapter.h" 5 #include "webkit/renderer/compositor_bindings/web_to_ccinput_handler_adapter.h"
6 6
7 #include "third_party/WebKit/Source/Platform/chromium/public/WebInputHandlerClie nt.h" 7 #include "third_party/WebKit/Source/Platform/chromium/public/WebInputHandlerClie nt.h"
8 8
9 #define COMPILE_ASSERT_MATCHING_ENUM(webkit_name, cc_name) \ 9 #define COMPILE_ASSERT_MATCHING_ENUM(webkit_name, cc_name) \
10 COMPILE_ASSERT(static_cast<int>(WebKit::webkit_name) == \ 10 COMPILE_ASSERT(static_cast<int>(WebKit::webkit_name) == \
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 virtual void scheduleAnimation() { handler_->ScheduleAnimation(); } 93 virtual void scheduleAnimation() { handler_->ScheduleAnimation(); }
94 94
95 virtual bool haveTouchEventHandlersAt(WebPoint point) { 95 virtual bool haveTouchEventHandlersAt(WebPoint point) {
96 return handler_->HaveTouchEventHandlersAt(point); 96 return handler_->HaveTouchEventHandlersAt(point);
97 } 97 }
98 98
99 virtual void didReceiveLastInputEventForVSync(double frame_time_sec) 99 virtual void didReceiveLastInputEventForVSync(double frame_time_sec)
100 OVERRIDE { 100 OVERRIDE {
101 base::TimeTicks frame_time = base::TimeTicks::FromInternalValue( 101 base::TimeTicks frame_time = base::TimeTicks::FromInternalValue(
102 frame_time_sec * base::Time::kMicrosecondsPerSecond); 102 frame_time_sec * base::Time::kMicrosecondsPerSecond);
103 handler_->DidReceiveLastInputEventForVSync(frame_time); 103 handler_->DidReceiveLastInputEventForBeginImplFrame(frame_time);
104 } 104 }
105 105
106 private: 106 private:
107 cc::InputHandler* handler_; 107 cc::InputHandler* handler_;
108 }; 108 };
109 109
110 void WebToCCInputHandlerAdapter::BindToHandler(cc::InputHandler* handler) { 110 void WebToCCInputHandlerAdapter::BindToHandler(cc::InputHandler* handler) {
111 handler_adapter_.reset(new HandlerAdapter(handler)); 111 handler_adapter_.reset(new HandlerAdapter(handler));
112 handler_->bindToClient(handler_adapter_.get()); 112 handler_->bindToClient(handler_adapter_.get());
113 } 113 }
114 114
115 void WebToCCInputHandlerAdapter::Animate(base::TimeTicks time) { 115 void WebToCCInputHandlerAdapter::Animate(base::TimeTicks time) {
116 double monotonic_time_seconds = (time - base::TimeTicks()).InSecondsF(); 116 double monotonic_time_seconds = (time - base::TimeTicks()).InSecondsF();
117 handler_->animate(monotonic_time_seconds); 117 handler_->animate(monotonic_time_seconds);
118 } 118 }
119 119
120 void WebToCCInputHandlerAdapter::MainThreadHasStoppedFlinging() { 120 void WebToCCInputHandlerAdapter::MainThreadHasStoppedFlinging() {
121 handler_->mainThreadHasStoppedFlinging(); 121 handler_->mainThreadHasStoppedFlinging();
122 } 122 }
123 123
124 } // namespace WebKit 124 } // namespace WebKit
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698