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 1395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1406 if (view_) { | 1406 if (view_) { |
1407 view_->SetBounds(pos); | 1407 view_->SetBounds(pos); |
1408 Send(new ViewMsg_Move_ACK(routing_id_)); | 1408 Send(new ViewMsg_Move_ACK(routing_id_)); |
1409 } | 1409 } |
1410 } | 1410 } |
1411 | 1411 |
1412 bool RenderWidgetHostImpl::OnSwapCompositorFrame( | 1412 bool RenderWidgetHostImpl::OnSwapCompositorFrame( |
1413 const IPC::Message& message) { | 1413 const IPC::Message& message) { |
1414 // This trace event is used in | 1414 // This trace event is used in |
1415 // chrome/browser/extensions/api/cast_streaming/performance_test.cc | 1415 // chrome/browser/extensions/api/cast_streaming/performance_test.cc |
1416 TRACE_EVENT0("test_fps,benchmark", "OnSwapCompositorFrame"); | 1416 TRACE_EVENT0("test_fps", |
| 1417 TRACE_DISABLED_BY_DEFAULT("OnSwapCompositorFrame")); |
1417 ViewHostMsg_SwapCompositorFrame::Param param; | 1418 ViewHostMsg_SwapCompositorFrame::Param param; |
1418 if (!ViewHostMsg_SwapCompositorFrame::Read(&message, ¶m)) | 1419 if (!ViewHostMsg_SwapCompositorFrame::Read(&message, ¶m)) |
1419 return false; | 1420 return false; |
1420 scoped_ptr<cc::CompositorFrame> frame(new cc::CompositorFrame); | 1421 scoped_ptr<cc::CompositorFrame> frame(new cc::CompositorFrame); |
1421 uint32 output_surface_id = get<0>(param); | 1422 uint32 output_surface_id = get<0>(param); |
1422 get<1>(param).AssignTo(frame.get()); | 1423 get<1>(param).AssignTo(frame.get()); |
1423 std::vector<IPC::Message> messages_to_deliver_with_frame; | 1424 std::vector<IPC::Message> messages_to_deliver_with_frame; |
1424 messages_to_deliver_with_frame.swap(get<2>(param)); | 1425 messages_to_deliver_with_frame.swap(get<2>(param)); |
1425 | 1426 |
1426 latency_tracker_.OnSwapCompositorFrame(&frame->metadata.latency_info); | 1427 latency_tracker_.OnSwapCompositorFrame(&frame->metadata.latency_info); |
(...skipping 732 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2159 } | 2160 } |
2160 #endif | 2161 #endif |
2161 | 2162 |
2162 SkColorType RenderWidgetHostImpl::PreferredReadbackFormat() { | 2163 SkColorType RenderWidgetHostImpl::PreferredReadbackFormat() { |
2163 if (view_) | 2164 if (view_) |
2164 return view_->PreferredReadbackFormat(); | 2165 return view_->PreferredReadbackFormat(); |
2165 return kN32_SkColorType; | 2166 return kN32_SkColorType; |
2166 } | 2167 } |
2167 | 2168 |
2168 } // namespace content | 2169 } // namespace content |
OLD | NEW |