Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(643)

Side by Side Diff: content/browser/renderer_host/render_widget_host_impl.cc

Issue 855553002: Add more trace events to "benchmark" category (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add tracing to ThreadProxy::DidSwapBuffersCompleteOnImplThread Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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", 1416 TRACE_EVENT0("test_fps,benchmark", "OnSwapCompositorFrame");
1417 TRACE_DISABLED_BY_DEFAULT("OnSwapCompositorFrame"));
1418 ViewHostMsg_SwapCompositorFrame::Param param; 1417 ViewHostMsg_SwapCompositorFrame::Param param;
1419 if (!ViewHostMsg_SwapCompositorFrame::Read(&message, &param)) 1418 if (!ViewHostMsg_SwapCompositorFrame::Read(&message, &param))
1420 return false; 1419 return false;
1421 scoped_ptr<cc::CompositorFrame> frame(new cc::CompositorFrame); 1420 scoped_ptr<cc::CompositorFrame> frame(new cc::CompositorFrame);
1422 uint32 output_surface_id = get<0>(param); 1421 uint32 output_surface_id = get<0>(param);
1423 get<1>(param).AssignTo(frame.get()); 1422 get<1>(param).AssignTo(frame.get());
1424 std::vector<IPC::Message> messages_to_deliver_with_frame; 1423 std::vector<IPC::Message> messages_to_deliver_with_frame;
1425 messages_to_deliver_with_frame.swap(get<2>(param)); 1424 messages_to_deliver_with_frame.swap(get<2>(param));
1426 1425
1427 latency_tracker_.OnSwapCompositorFrame(&frame->metadata.latency_info); 1426 latency_tracker_.OnSwapCompositorFrame(&frame->metadata.latency_info);
(...skipping 732 matching lines...) Expand 10 before | Expand all | Expand 10 after
2160 } 2159 }
2161 #endif 2160 #endif
2162 2161
2163 SkColorType RenderWidgetHostImpl::PreferredReadbackFormat() { 2162 SkColorType RenderWidgetHostImpl::PreferredReadbackFormat() {
2164 if (view_) 2163 if (view_)
2165 return view_->PreferredReadbackFormat(); 2164 return view_->PreferredReadbackFormat();
2166 return kN32_SkColorType; 2165 return kN32_SkColorType;
2167 } 2166 }
2168 2167
2169 } // namespace content 2168 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698