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

Side by Side Diff: cc/trees/layer_tree_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
« no previous file with comments | « cc/scheduler/scheduler.cc ('k') | cc/trees/single_thread_proxy.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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 "cc/trees/layer_tree_host_impl.h" 5 #include "cc/trees/layer_tree_host_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 1619 matching lines...) Expand 10 before | Expand all | Expand 10 after
1630 bool LayerTreeHostImpl::SwapBuffers(const LayerTreeHostImpl::FrameData& frame) { 1630 bool LayerTreeHostImpl::SwapBuffers(const LayerTreeHostImpl::FrameData& frame) {
1631 ResetRequiresHighResToDraw(); 1631 ResetRequiresHighResToDraw();
1632 if (frame.has_no_damage) { 1632 if (frame.has_no_damage) {
1633 active_tree()->BreakSwapPromises(SwapPromise::SWAP_FAILS); 1633 active_tree()->BreakSwapPromises(SwapPromise::SWAP_FAILS);
1634 return false; 1634 return false;
1635 } 1635 }
1636 CompositorFrameMetadata metadata = MakeCompositorFrameMetadata(); 1636 CompositorFrameMetadata metadata = MakeCompositorFrameMetadata();
1637 active_tree()->FinishSwapPromises(&metadata); 1637 active_tree()->FinishSwapPromises(&metadata);
1638 for (size_t i = 0; i < metadata.latency_info.size(); i++) { 1638 for (size_t i = 0; i < metadata.latency_info.size(); i++) {
1639 TRACE_EVENT_FLOW_STEP0( 1639 TRACE_EVENT_FLOW_STEP0(
1640 "input", 1640 "input,benchmark",
1641 "LatencyInfo.Flow", 1641 "LatencyInfo.Flow",
1642 TRACE_ID_DONT_MANGLE(metadata.latency_info[i].trace_id), 1642 TRACE_ID_DONT_MANGLE(metadata.latency_info[i].trace_id),
1643 "SwapBuffers"); 1643 "SwapBuffers");
1644 } 1644 }
1645 renderer_->SwapBuffers(metadata); 1645 renderer_->SwapBuffers(metadata);
1646 return true; 1646 return true;
1647 } 1647 }
1648 1648
1649 void LayerTreeHostImpl::WillBeginImplFrame(const BeginFrameArgs& args) { 1649 void LayerTreeHostImpl::WillBeginImplFrame(const BeginFrameArgs& args) {
1650 // Sample the frame time now. This time will be used for updating animations 1650 // Sample the frame time now. This time will be used for updating animations
(...skipping 1857 matching lines...) Expand 10 before | Expand all | Expand 10 after
3508 } 3508 }
3509 3509
3510 void LayerTreeHostImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) { 3510 void LayerTreeHostImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) {
3511 std::vector<PictureLayerImpl*>::iterator it = 3511 std::vector<PictureLayerImpl*>::iterator it =
3512 std::find(picture_layers_.begin(), picture_layers_.end(), layer); 3512 std::find(picture_layers_.begin(), picture_layers_.end(), layer);
3513 DCHECK(it != picture_layers_.end()); 3513 DCHECK(it != picture_layers_.end());
3514 picture_layers_.erase(it); 3514 picture_layers_.erase(it);
3515 } 3515 }
3516 3516
3517 } // namespace cc 3517 } // namespace cc
OLDNEW
« no previous file with comments | « cc/scheduler/scheduler.cc ('k') | cc/trees/single_thread_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698