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

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: Rebase onto master. Created 6 years 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/test/layer_tree_test.cc ('k') | cc/trees/layer_tree_host_impl_unittest.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 3221 matching lines...) Expand 10 before | Expand all | Expand 10 after
3232 void LayerTreeHostImpl::ResetCurrentBeginFrameArgsForNextFrame() { 3232 void LayerTreeHostImpl::ResetCurrentBeginFrameArgsForNextFrame() {
3233 current_begin_frame_args_ = BeginFrameArgs(); 3233 current_begin_frame_args_ = BeginFrameArgs();
3234 } 3234 }
3235 3235
3236 BeginFrameArgs LayerTreeHostImpl::CurrentBeginFrameArgs() const { 3236 BeginFrameArgs LayerTreeHostImpl::CurrentBeginFrameArgs() const {
3237 // Try to use the current frame time to keep animations non-jittery. But if 3237 // Try to use the current frame time to keep animations non-jittery. But if
3238 // we're not in a frame (because this is during an input event or a delayed 3238 // we're not in a frame (because this is during an input event or a delayed
3239 // task), fall back to physical time. This should still be monotonic. 3239 // task), fall back to physical time. This should still be monotonic.
3240 if (current_begin_frame_args_.IsValid()) 3240 if (current_begin_frame_args_.IsValid())
3241 return current_begin_frame_args_; 3241 return current_begin_frame_args_;
3242 return BeginFrameArgs::Create(gfx::FrameTime::Now(), base::TimeTicks(), 3242 return BeginFrameArgs::Create(
3243 BeginFrameArgs::DefaultInterval(), 3243 BEGINFRAME_FROM_HERE, gfx::FrameTime::Now(), base::TimeTicks(),
3244 BeginFrameArgs::NORMAL); 3244 BeginFrameArgs::DefaultInterval(), BeginFrameArgs::NORMAL);
3245 } 3245 }
3246 3246
3247 scoped_refptr<base::debug::ConvertableToTraceFormat> 3247 scoped_refptr<base::debug::ConvertableToTraceFormat>
3248 LayerTreeHostImpl::AsValue() const { 3248 LayerTreeHostImpl::AsValue() const {
3249 return AsValueWithFrame(NULL); 3249 return AsValueWithFrame(NULL);
3250 } 3250 }
3251 3251
3252 scoped_refptr<base::debug::ConvertableToTraceFormat> 3252 scoped_refptr<base::debug::ConvertableToTraceFormat>
3253 LayerTreeHostImpl::AsValueWithFrame(FrameData* frame) const { 3253 LayerTreeHostImpl::AsValueWithFrame(FrameData* frame) const {
3254 scoped_refptr<base::debug::TracedValue> state = 3254 scoped_refptr<base::debug::TracedValue> state =
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
3479 } 3479 }
3480 3480
3481 void LayerTreeHostImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) { 3481 void LayerTreeHostImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) {
3482 std::vector<PictureLayerImpl*>::iterator it = 3482 std::vector<PictureLayerImpl*>::iterator it =
3483 std::find(picture_layers_.begin(), picture_layers_.end(), layer); 3483 std::find(picture_layers_.begin(), picture_layers_.end(), layer);
3484 DCHECK(it != picture_layers_.end()); 3484 DCHECK(it != picture_layers_.end());
3485 picture_layers_.erase(it); 3485 picture_layers_.erase(it);
3486 } 3486 }
3487 3487
3488 } // namespace cc 3488 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/layer_tree_test.cc ('k') | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698