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_impl.h" | 5 #include "content/browser/renderer_host/render_widget_host_impl.h" |
6 | 6 |
7 #include <math.h> | 7 #include <math.h> |
8 #include <set> | 8 #include <set> |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 2011 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2022 Send(new ViewMsg_LockMouse_ACK(routing_id_, false)); | 2022 Send(new ViewMsg_LockMouse_ACK(routing_id_, false)); |
2023 return false; | 2023 return false; |
2024 } else { | 2024 } else { |
2025 Send(new ViewMsg_LockMouse_ACK(routing_id_, true)); | 2025 Send(new ViewMsg_LockMouse_ACK(routing_id_, true)); |
2026 return true; | 2026 return true; |
2027 } | 2027 } |
2028 } | 2028 } |
2029 } | 2029 } |
2030 | 2030 |
2031 // static | 2031 // static |
2032 void RenderWidgetHostImpl::AcknowledgeBufferPresent( | |
2033 int32 route_id, int gpu_host_id, | |
2034 const AcceleratedSurfaceMsg_BufferPresented_Params& params) { | |
2035 GpuProcessHostUIShim* ui_shim = GpuProcessHostUIShim::FromID(gpu_host_id); | |
2036 if (ui_shim) { | |
2037 ui_shim->Send(new AcceleratedSurfaceMsg_BufferPresented(route_id, | |
2038 params)); | |
2039 } | |
2040 } | |
2041 | |
2042 // static | |
2043 void RenderWidgetHostImpl::SendSwapCompositorFrameAck( | 2032 void RenderWidgetHostImpl::SendSwapCompositorFrameAck( |
2044 int32 route_id, | 2033 int32 route_id, |
2045 uint32 output_surface_id, | 2034 uint32 output_surface_id, |
2046 int renderer_host_id, | 2035 int renderer_host_id, |
2047 const cc::CompositorFrameAck& ack) { | 2036 const cc::CompositorFrameAck& ack) { |
2048 RenderProcessHost* host = RenderProcessHost::FromID(renderer_host_id); | 2037 RenderProcessHost* host = RenderProcessHost::FromID(renderer_host_id); |
2049 if (!host) | 2038 if (!host) |
2050 return; | 2039 return; |
2051 host->Send(new ViewMsg_SwapCompositorFrameAck( | 2040 host->Send(new ViewMsg_SwapCompositorFrameAck( |
2052 route_id, output_surface_id, ack)); | 2041 route_id, output_surface_id, ack)); |
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2375 } | 2364 } |
2376 #endif | 2365 #endif |
2377 | 2366 |
2378 SkColorType RenderWidgetHostImpl::PreferredReadbackFormat() { | 2367 SkColorType RenderWidgetHostImpl::PreferredReadbackFormat() { |
2379 if (view_) | 2368 if (view_) |
2380 return view_->PreferredReadbackFormat(); | 2369 return view_->PreferredReadbackFormat(); |
2381 return kN32_SkColorType; | 2370 return kN32_SkColorType; |
2382 } | 2371 } |
2383 | 2372 |
2384 } // namespace content | 2373 } // namespace content |
OLD | NEW |