OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 "content/renderer/render_widget.h" | 5 #include "content/renderer/render_widget.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/debug/trace_event.h" | 9 #include "base/debug/trace_event.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 897 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
908 animation_floor_time_ = now + animationInterval; | 908 animation_floor_time_ = now + animationInterval; |
909 // Set a timer to call us back after animationInterval before | 909 // Set a timer to call us back after animationInterval before |
910 // running animation callbacks so that if a callback requests another | 910 // running animation callbacks so that if a callback requests another |
911 // we'll be sure to run it at the proper time. | 911 // we'll be sure to run it at the proper time. |
912 animation_timer_.Stop(); | 912 animation_timer_.Stop(); |
913 animation_timer_.Start(FROM_HERE, animationInterval, this, | 913 animation_timer_.Start(FROM_HERE, animationInterval, this, |
914 &RenderWidget::AnimationCallback); | 914 &RenderWidget::AnimationCallback); |
915 animation_update_pending_ = false; | 915 animation_update_pending_ = false; |
916 if (is_accelerated_compositing_active_ && web_layer_tree_view_) { | 916 if (is_accelerated_compositing_active_ && web_layer_tree_view_) { |
917 web_layer_tree_view_->layer_tree_host()->updateAnimations( | 917 web_layer_tree_view_->layer_tree_host()->updateAnimations( |
918 base::TimeTicks::Now()); | 918 base::TimeTicks::Now(), |
| 919 now); |
919 } else { | 920 } else { |
920 webwidget_->animate(0.0); | 921 webwidget_->animate(0.0); |
921 } | 922 } |
922 return; | 923 return; |
923 } | 924 } |
924 TRACE_EVENT0("renderer", "EarlyOut_AnimatedTooRecently"); | 925 TRACE_EVENT0("renderer", "EarlyOut_AnimatedTooRecently"); |
925 if (!animation_timer_.IsRunning()) { | 926 if (!animation_timer_.IsRunning()) { |
926 // This code uses base::Time::Now() to calculate the floor and next fire | 927 // This code uses base::Time::Now() to calculate the floor and next fire |
927 // time because javascript's Date object uses base::Time::Now(). The | 928 // time because javascript's Date object uses base::Time::Now(). The |
928 // message loop uses base::TimeTicks, which on windows can have a | 929 // message loop uses base::TimeTicks, which on windows can have a |
(...skipping 1178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2107 bool RenderWidget::WillHandleGestureEvent( | 2108 bool RenderWidget::WillHandleGestureEvent( |
2108 const WebKit::WebGestureEvent& event) { | 2109 const WebKit::WebGestureEvent& event) { |
2109 return false; | 2110 return false; |
2110 } | 2111 } |
2111 | 2112 |
2112 bool RenderWidget::HasTouchEventHandlersAt(const gfx::Point& point) const { | 2113 bool RenderWidget::HasTouchEventHandlersAt(const gfx::Point& point) const { |
2113 return true; | 2114 return true; |
2114 } | 2115 } |
2115 | 2116 |
2116 } // namespace content | 2117 } // namespace content |
OLD | NEW |