| 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 1419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1430 if (view_) { | 1430 if (view_) { |
| 1431 view_->SetBounds(pos); | 1431 view_->SetBounds(pos); |
| 1432 Send(new ViewMsg_Move_ACK(routing_id_)); | 1432 Send(new ViewMsg_Move_ACK(routing_id_)); |
| 1433 } | 1433 } |
| 1434 } | 1434 } |
| 1435 | 1435 |
| 1436 bool RenderWidgetHostImpl::OnSwapCompositorFrame( | 1436 bool RenderWidgetHostImpl::OnSwapCompositorFrame( |
| 1437 const IPC::Message& message) { | 1437 const IPC::Message& message) { |
| 1438 // This trace event is used in | 1438 // This trace event is used in |
| 1439 // chrome/browser/extensions/api/cast_streaming/performance_test.cc | 1439 // chrome/browser/extensions/api/cast_streaming/performance_test.cc |
| 1440 TRACE_EVENT0("test_fps", | 1440 TRACE_EVENT0("test_fps,benchmark", "OnSwapCompositorFrame"); |
| 1441 TRACE_DISABLED_BY_DEFAULT("OnSwapCompositorFrame")); | |
| 1442 ViewHostMsg_SwapCompositorFrame::Param param; | 1441 ViewHostMsg_SwapCompositorFrame::Param param; |
| 1443 if (!ViewHostMsg_SwapCompositorFrame::Read(&message, ¶m)) | 1442 if (!ViewHostMsg_SwapCompositorFrame::Read(&message, ¶m)) |
| 1444 return false; | 1443 return false; |
| 1445 scoped_ptr<cc::CompositorFrame> frame(new cc::CompositorFrame); | 1444 scoped_ptr<cc::CompositorFrame> frame(new cc::CompositorFrame); |
| 1446 uint32 output_surface_id = get<0>(param); | 1445 uint32 output_surface_id = get<0>(param); |
| 1447 get<1>(param).AssignTo(frame.get()); | 1446 get<1>(param).AssignTo(frame.get()); |
| 1448 std::vector<IPC::Message> messages_to_deliver_with_frame; | 1447 std::vector<IPC::Message> messages_to_deliver_with_frame; |
| 1449 messages_to_deliver_with_frame.swap(get<2>(param)); | 1448 messages_to_deliver_with_frame.swap(get<2>(param)); |
| 1450 | 1449 |
| 1451 latency_tracker_.OnSwapCompositorFrame(&frame->metadata.latency_info); | 1450 latency_tracker_.OnSwapCompositorFrame(&frame->metadata.latency_info); |
| (...skipping 732 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2184 } | 2183 } |
| 2185 #endif | 2184 #endif |
| 2186 | 2185 |
| 2187 SkColorType RenderWidgetHostImpl::PreferredReadbackFormat() { | 2186 SkColorType RenderWidgetHostImpl::PreferredReadbackFormat() { |
| 2188 if (view_) | 2187 if (view_) |
| 2189 return view_->PreferredReadbackFormat(); | 2188 return view_->PreferredReadbackFormat(); |
| 2190 return kN32_SkColorType; | 2189 return kN32_SkColorType; |
| 2191 } | 2190 } |
| 2192 | 2191 |
| 2193 } // namespace content | 2192 } // namespace content |
| OLD | NEW |