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 1958 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1969 Send(new ViewMsg_LockMouse_ACK(routing_id_, false)); | 1969 Send(new ViewMsg_LockMouse_ACK(routing_id_, false)); |
1970 return false; | 1970 return false; |
1971 } else { | 1971 } else { |
1972 Send(new ViewMsg_LockMouse_ACK(routing_id_, true)); | 1972 Send(new ViewMsg_LockMouse_ACK(routing_id_, true)); |
1973 return true; | 1973 return true; |
1974 } | 1974 } |
1975 } | 1975 } |
1976 } | 1976 } |
1977 | 1977 |
1978 // static | 1978 // static |
1979 void RenderWidgetHostImpl::AcknowledgeBufferPresent( | |
1980 int32 route_id, int gpu_host_id, | |
1981 const AcceleratedSurfaceMsg_BufferPresented_Params& params) { | |
1982 GpuProcessHostUIShim* ui_shim = GpuProcessHostUIShim::FromID(gpu_host_id); | |
1983 if (ui_shim) { | |
1984 ui_shim->Send(new AcceleratedSurfaceMsg_BufferPresented(route_id, | |
1985 params)); | |
1986 } | |
1987 } | |
1988 | |
1989 // static | |
1990 void RenderWidgetHostImpl::SendSwapCompositorFrameAck( | 1979 void RenderWidgetHostImpl::SendSwapCompositorFrameAck( |
1991 int32 route_id, | 1980 int32 route_id, |
1992 uint32 output_surface_id, | 1981 uint32 output_surface_id, |
1993 int renderer_host_id, | 1982 int renderer_host_id, |
1994 const cc::CompositorFrameAck& ack) { | 1983 const cc::CompositorFrameAck& ack) { |
1995 RenderProcessHost* host = RenderProcessHost::FromID(renderer_host_id); | 1984 RenderProcessHost* host = RenderProcessHost::FromID(renderer_host_id); |
1996 if (!host) | 1985 if (!host) |
1997 return; | 1986 return; |
1998 host->Send(new ViewMsg_SwapCompositorFrameAck( | 1987 host->Send(new ViewMsg_SwapCompositorFrameAck( |
1999 route_id, output_surface_id, ack)); | 1988 route_id, output_surface_id, ack)); |
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2322 } | 2311 } |
2323 #endif | 2312 #endif |
2324 | 2313 |
2325 SkColorType RenderWidgetHostImpl::PreferredReadbackFormat() { | 2314 SkColorType RenderWidgetHostImpl::PreferredReadbackFormat() { |
2326 if (view_) | 2315 if (view_) |
2327 return view_->PreferredReadbackFormat(); | 2316 return view_->PreferredReadbackFormat(); |
2328 return kN32_SkColorType; | 2317 return kN32_SkColorType; |
2329 } | 2318 } |
2330 | 2319 |
2331 } // namespace content | 2320 } // namespace content |
OLD | NEW |