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

Side by Side Diff: cc/trees/layer_tree_host_impl.cc

Issue 735723005: cc: Adding creation location to debug BeginFrameArgs objects. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Testing on try bots. Created 6 years, 1 month 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 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 3193 matching lines...) Expand 10 before | Expand all | Expand 10 after
3204 void LayerTreeHostImpl::ResetCurrentBeginFrameArgsForNextFrame() { 3204 void LayerTreeHostImpl::ResetCurrentBeginFrameArgsForNextFrame() {
3205 current_begin_frame_args_ = BeginFrameArgs(); 3205 current_begin_frame_args_ = BeginFrameArgs();
3206 } 3206 }
3207 3207
3208 BeginFrameArgs LayerTreeHostImpl::CurrentBeginFrameArgs() const { 3208 BeginFrameArgs LayerTreeHostImpl::CurrentBeginFrameArgs() const {
3209 // Try to use the current frame time to keep animations non-jittery. But if 3209 // Try to use the current frame time to keep animations non-jittery. But if
3210 // we're not in a frame (because this is during an input event or a delayed 3210 // we're not in a frame (because this is during an input event or a delayed
3211 // task), fall back to physical time. This should still be monotonic. 3211 // task), fall back to physical time. This should still be monotonic.
3212 if (current_begin_frame_args_.IsValid()) 3212 if (current_begin_frame_args_.IsValid())
3213 return current_begin_frame_args_; 3213 return current_begin_frame_args_;
3214 return BeginFrameArgs::Create(gfx::FrameTime::Now(), 3214 return BeginFrameArgs::Create(
3215 base::TimeTicks(), 3215 BEGINFRAME_FROM_HERE, gfx::FrameTime::Now(), base::TimeTicks(),
3216 BeginFrameArgs::DefaultInterval()); 3216 BeginFrameArgs::DefaultInterval(), BeginFrameArgs::NORMAL);
3217 } 3217 }
3218 3218
3219 scoped_refptr<base::debug::ConvertableToTraceFormat> 3219 scoped_refptr<base::debug::ConvertableToTraceFormat>
3220 LayerTreeHostImpl::AsValue() const { 3220 LayerTreeHostImpl::AsValue() const {
3221 return AsValueWithFrame(NULL); 3221 return AsValueWithFrame(NULL);
3222 } 3222 }
3223 3223
3224 scoped_refptr<base::debug::ConvertableToTraceFormat> 3224 scoped_refptr<base::debug::ConvertableToTraceFormat>
3225 LayerTreeHostImpl::AsValueWithFrame(FrameData* frame) const { 3225 LayerTreeHostImpl::AsValueWithFrame(FrameData* frame) const {
3226 scoped_refptr<base::debug::TracedValue> state = 3226 scoped_refptr<base::debug::TracedValue> state =
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
3451 } 3451 }
3452 3452
3453 void LayerTreeHostImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) { 3453 void LayerTreeHostImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) {
3454 std::vector<PictureLayerImpl*>::iterator it = 3454 std::vector<PictureLayerImpl*>::iterator it =
3455 std::find(picture_layers_.begin(), picture_layers_.end(), layer); 3455 std::find(picture_layers_.begin(), picture_layers_.end(), layer);
3456 DCHECK(it != picture_layers_.end()); 3456 DCHECK(it != picture_layers_.end());
3457 picture_layers_.erase(it); 3457 picture_layers_.erase(it);
3458 } 3458 }
3459 3459
3460 } // namespace cc 3460 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698