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 "base/android/build_info.h" | 9 #include "base/android/build_info.h" |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 1485 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1496 | 1496 |
1497 if (using_browser_compositor_) { | 1497 if (using_browser_compositor_) { |
1498 base::TimeTicks display_time = frame_time + vsync_period; | 1498 base::TimeTicks display_time = frame_time + vsync_period; |
1499 | 1499 |
1500 base::TimeTicks deadline = | 1500 base::TimeTicks deadline = |
1501 display_time - host_->GetEstimatedBrowserCompositeTime(); | 1501 display_time - host_->GetEstimatedBrowserCompositeTime(); |
1502 | 1502 |
1503 host_->Send(new ViewMsg_BeginFrame( | 1503 host_->Send(new ViewMsg_BeginFrame( |
1504 host_->GetRoutingID(), | 1504 host_->GetRoutingID(), |
1505 cc::BeginFrameArgs::Create(BEGINFRAME_FROM_HERE, frame_time, deadline, | 1505 cc::BeginFrameArgs::Create(BEGINFRAME_FROM_HERE, frame_time, deadline, |
1506 vsync_period, cc::BeginFrameArgs::NORMAL))); | 1506 vsync_period, cc::BeginFrameArgs::NORMAL, |
| 1507 true))); |
1507 } else { | 1508 } else { |
1508 SynchronousCompositorImpl* compositor = SynchronousCompositorImpl::FromID( | 1509 SynchronousCompositorImpl* compositor = SynchronousCompositorImpl::FromID( |
1509 host_->GetProcess()->GetID(), host_->GetRoutingID()); | 1510 host_->GetProcess()->GetID(), host_->GetRoutingID()); |
1510 if (compositor) { | 1511 if (compositor) { |
1511 // The synchronous compositor synchronously does it's work in this call. | 1512 // The synchronous compositor synchronously does it's work in this call. |
1512 // It does not use a deadline. | 1513 // It does not use a deadline. |
1513 compositor->BeginFrame(cc::BeginFrameArgs::Create( | 1514 compositor->BeginFrame(cc::BeginFrameArgs::Create( |
1514 BEGINFRAME_FROM_HERE, frame_time, base::TimeTicks(), vsync_period, | 1515 BEGINFRAME_FROM_HERE, frame_time, base::TimeTicks(), vsync_period, |
1515 cc::BeginFrameArgs::NORMAL)); | 1516 cc::BeginFrameArgs::NORMAL, true)); |
1516 } | 1517 } |
1517 } | 1518 } |
1518 } | 1519 } |
1519 | 1520 |
1520 bool RenderWidgetHostViewAndroid::Animate(base::TimeTicks frame_time) { | 1521 bool RenderWidgetHostViewAndroid::Animate(base::TimeTicks frame_time) { |
1521 bool needs_animate = false; | 1522 bool needs_animate = false; |
1522 if (overscroll_controller_) { | 1523 if (overscroll_controller_) { |
1523 needs_animate |= overscroll_controller_->Animate( | 1524 needs_animate |= overscroll_controller_->Animate( |
1524 frame_time, content_view_core_->GetLayer().get()); | 1525 frame_time, content_view_core_->GetLayer().get()); |
1525 } | 1526 } |
(...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2037 results->orientationAngle = display.RotationAsDegree(); | 2038 results->orientationAngle = display.RotationAsDegree(); |
2038 results->orientationType = | 2039 results->orientationType = |
2039 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display); | 2040 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display); |
2040 gfx::DeviceDisplayInfo info; | 2041 gfx::DeviceDisplayInfo info; |
2041 results->depth = info.GetBitsPerPixel(); | 2042 results->depth = info.GetBitsPerPixel(); |
2042 results->depthPerComponent = info.GetBitsPerComponent(); | 2043 results->depthPerComponent = info.GetBitsPerComponent(); |
2043 results->isMonochrome = (results->depthPerComponent == 0); | 2044 results->isMonochrome = (results->depthPerComponent == 0); |
2044 } | 2045 } |
2045 | 2046 |
2046 } // namespace content | 2047 } // namespace content |
OLD | NEW |