| 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 1748 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1759 | 1759 |
| 1760 void RenderWidgetHostViewAndroid::OnDetachCompositor() { | 1760 void RenderWidgetHostViewAndroid::OnDetachCompositor() { |
| 1761 DCHECK(content_view_core_); | 1761 DCHECK(content_view_core_); |
| 1762 DCHECK(using_browser_compositor_); | 1762 DCHECK(using_browser_compositor_); |
| 1763 RunAckCallbacks(); | 1763 RunAckCallbacks(); |
| 1764 overscroll_controller_.reset(); | 1764 overscroll_controller_.reset(); |
| 1765 } | 1765 } |
| 1766 | 1766 |
| 1767 void RenderWidgetHostViewAndroid::OnVSync(base::TimeTicks frame_time, | 1767 void RenderWidgetHostViewAndroid::OnVSync(base::TimeTicks frame_time, |
| 1768 base::TimeDelta vsync_period) { | 1768 base::TimeDelta vsync_period) { |
| 1769 TRACE_EVENT0("cc", "RenderWidgetHostViewAndroid::OnVSync"); | 1769 TRACE_EVENT0("cc,benchmark", "RenderWidgetHostViewAndroid::OnVSync"); |
| 1770 if (!host_) | 1770 if (!host_) |
| 1771 return; | 1771 return; |
| 1772 | 1772 |
| 1773 const uint32 current_vsync_requests = outstanding_vsync_requests_; | 1773 const uint32 current_vsync_requests = outstanding_vsync_requests_; |
| 1774 outstanding_vsync_requests_ = 0; | 1774 outstanding_vsync_requests_ = 0; |
| 1775 | 1775 |
| 1776 if (current_vsync_requests & FLUSH_INPUT) | 1776 if (current_vsync_requests & FLUSH_INPUT) |
| 1777 host_->FlushInput(); | 1777 host_->FlushInput(); |
| 1778 | 1778 |
| 1779 if (current_vsync_requests & BEGIN_FRAME || | 1779 if (current_vsync_requests & BEGIN_FRAME || |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1930 results->orientationAngle = display.RotationAsDegree(); | 1930 results->orientationAngle = display.RotationAsDegree(); |
| 1931 results->orientationType = | 1931 results->orientationType = |
| 1932 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display); | 1932 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display); |
| 1933 gfx::DeviceDisplayInfo info; | 1933 gfx::DeviceDisplayInfo info; |
| 1934 results->depth = info.GetBitsPerPixel(); | 1934 results->depth = info.GetBitsPerPixel(); |
| 1935 results->depthPerComponent = info.GetBitsPerComponent(); | 1935 results->depthPerComponent = info.GetBitsPerComponent(); |
| 1936 results->isMonochrome = (results->depthPerComponent == 0); | 1936 results->isMonochrome = (results->depthPerComponent == 0); |
| 1937 } | 1937 } |
| 1938 | 1938 |
| 1939 } // namespace content | 1939 } // namespace content |
| OLD | NEW |