| 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/browser/renderer_host/render_widget_host_view_android.h" | 5 #include "content/browser/renderer_host/render_widget_host_view_android.h" |
| 6 | 6 |
| 7 #include <android/bitmap.h> | 7 #include <android/bitmap.h> |
| 8 | 8 |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 1410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1421 // Synchronous compositor does not use deadline-based scheduling. | 1421 // Synchronous compositor does not use deadline-based scheduling. |
| 1422 // TODO(brianderson): Replace this hardcoded deadline after Android | 1422 // TODO(brianderson): Replace this hardcoded deadline after Android |
| 1423 // switches to Surfaces and the Browser's commit isn't in the critcal path. | 1423 // switches to Surfaces and the Browser's commit isn't in the critcal path. |
| 1424 base::TimeTicks deadline = | 1424 base::TimeTicks deadline = |
| 1425 sync_compositor_ ? base::TimeTicks() : frame_time + (vsync_period * 0.6); | 1425 sync_compositor_ ? base::TimeTicks() : frame_time + (vsync_period * 0.6); |
| 1426 host_->Send(new ViewMsg_BeginFrame( | 1426 host_->Send(new ViewMsg_BeginFrame( |
| 1427 host_->GetRoutingID(), | 1427 host_->GetRoutingID(), |
| 1428 cc::BeginFrameArgs::Create(BEGINFRAME_FROM_HERE, frame_time, deadline, | 1428 cc::BeginFrameArgs::Create(BEGINFRAME_FROM_HERE, frame_time, deadline, |
| 1429 vsync_period, cc::BeginFrameArgs::NORMAL))); | 1429 vsync_period, cc::BeginFrameArgs::NORMAL))); |
| 1430 if (sync_compositor_) | 1430 if (sync_compositor_) |
| 1431 sync_compositor_->DidSendBeginFrame(); | 1431 sync_compositor_->DidSendBeginFrame(content_view_core_->GetWindowAndroid()); |
| 1432 } | 1432 } |
| 1433 | 1433 |
| 1434 bool RenderWidgetHostViewAndroid::Animate(base::TimeTicks frame_time) { | 1434 bool RenderWidgetHostViewAndroid::Animate(base::TimeTicks frame_time) { |
| 1435 bool needs_animate = false; | 1435 bool needs_animate = false; |
| 1436 if (overscroll_controller_) { | 1436 if (overscroll_controller_) { |
| 1437 needs_animate |= overscroll_controller_->Animate( | 1437 needs_animate |= overscroll_controller_->Animate( |
| 1438 frame_time, content_view_core_->GetLayer()); | 1438 frame_time, content_view_core_->GetLayer()); |
| 1439 } | 1439 } |
| 1440 if (selection_controller_) | 1440 if (selection_controller_) |
| 1441 needs_animate |= selection_controller_->Animate(frame_time); | 1441 needs_animate |= selection_controller_->Animate(frame_time); |
| (...skipping 554 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1996 case ui::MotionEvent::ACTION_UP: | 1996 case ui::MotionEvent::ACTION_UP: |
| 1997 case ui::MotionEvent::ACTION_POINTER_UP: | 1997 case ui::MotionEvent::ACTION_POINTER_UP: |
| 1998 UMA_HISTOGRAM_CUSTOM_COUNTS("Event.Latency.OS.TOUCH_RELEASED", | 1998 UMA_HISTOGRAM_CUSTOM_COUNTS("Event.Latency.OS.TOUCH_RELEASED", |
| 1999 delta.InMicroseconds(), 1, 1000000, 50); | 1999 delta.InMicroseconds(), 1, 1000000, 50); |
| 2000 default: | 2000 default: |
| 2001 return; | 2001 return; |
| 2002 } | 2002 } |
| 2003 } | 2003 } |
| 2004 | 2004 |
| 2005 } // namespace content | 2005 } // namespace content |
| OLD | NEW |