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 | 8 |
9 #include <set> | 9 #include <set> |
10 #include <tuple> | 10 #include <tuple> |
(...skipping 1570 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1581 | 1581 |
1582 bool RenderWidgetHostImpl::OnSwapCompositorFrame( | 1582 bool RenderWidgetHostImpl::OnSwapCompositorFrame( |
1583 const IPC::Message& message) { | 1583 const IPC::Message& message) { |
1584 // This trace event is used in | 1584 // This trace event is used in |
1585 // chrome/browser/extensions/api/cast_streaming/performance_test.cc | 1585 // chrome/browser/extensions/api/cast_streaming/performance_test.cc |
1586 TRACE_EVENT0("test_fps,benchmark", "OnSwapCompositorFrame"); | 1586 TRACE_EVENT0("test_fps,benchmark", "OnSwapCompositorFrame"); |
1587 | 1587 |
1588 ViewHostMsg_SwapCompositorFrame::Param param; | 1588 ViewHostMsg_SwapCompositorFrame::Param param; |
1589 if (!ViewHostMsg_SwapCompositorFrame::Read(&message, ¶m)) | 1589 if (!ViewHostMsg_SwapCompositorFrame::Read(&message, ¶m)) |
1590 return false; | 1590 return false; |
1591 std::unique_ptr<cc::CompositorFrame> frame(new cc::CompositorFrame); | 1591 std::unique_ptr<cc::CompositorFrame> frame(std::move(std::get<1>(param))); |
1592 uint32_t output_surface_id = std::get<0>(param); | 1592 uint32_t output_surface_id = std::get<0>(param); |
1593 std::get<1>(param).AssignTo(frame.get()); | |
1594 std::vector<IPC::Message> messages_to_deliver_with_frame; | 1593 std::vector<IPC::Message> messages_to_deliver_with_frame; |
1595 messages_to_deliver_with_frame.swap(std::get<2>(param)); | 1594 messages_to_deliver_with_frame.swap(std::get<2>(param)); |
1596 | 1595 |
1597 if (!ui::LatencyInfo::Verify(frame->metadata.latency_info, | 1596 if (!ui::LatencyInfo::Verify(frame->metadata.latency_info, |
1598 "RenderWidgetHostImpl::OnSwapCompositorFrame")) { | 1597 "RenderWidgetHostImpl::OnSwapCompositorFrame")) { |
1599 std::vector<ui::LatencyInfo>().swap(frame->metadata.latency_info); | 1598 std::vector<ui::LatencyInfo>().swap(frame->metadata.latency_info); |
1600 } | 1599 } |
1601 | 1600 |
1602 latency_tracker_.OnSwapCompositorFrame(&frame->metadata.latency_info); | 1601 latency_tracker_.OnSwapCompositorFrame(&frame->metadata.latency_info); |
1603 | 1602 |
(...skipping 595 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2199 return delegate_ ? delegate_->GetRootBrowserAccessibilityManager() : NULL; | 2198 return delegate_ ? delegate_->GetRootBrowserAccessibilityManager() : NULL; |
2200 } | 2199 } |
2201 | 2200 |
2202 BrowserAccessibilityManager* | 2201 BrowserAccessibilityManager* |
2203 RenderWidgetHostImpl::GetOrCreateRootBrowserAccessibilityManager() { | 2202 RenderWidgetHostImpl::GetOrCreateRootBrowserAccessibilityManager() { |
2204 return delegate_ ? | 2203 return delegate_ ? |
2205 delegate_->GetOrCreateRootBrowserAccessibilityManager() : NULL; | 2204 delegate_->GetOrCreateRootBrowserAccessibilityManager() : NULL; |
2206 } | 2205 } |
2207 | 2206 |
2208 } // namespace content | 2207 } // namespace content |
OLD | NEW |