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

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

Issue 914403003: cc: Add main frame timing info to frame timing tracker. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tests Created 5 years, 10 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 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 <cmath> 8 #include <cmath>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 void PostDelayedScrollbarFadeOnImplThread(const base::Closure& start_fade, 153 void PostDelayedScrollbarFadeOnImplThread(const base::Closure& start_fade,
154 base::TimeDelta delay) override { 154 base::TimeDelta delay) override {
155 scrollbar_fade_start_ = start_fade; 155 scrollbar_fade_start_ = start_fade;
156 requested_scrollbar_animation_delay_ = delay; 156 requested_scrollbar_animation_delay_ = delay;
157 } 157 }
158 void DidActivateSyncTree() override {} 158 void DidActivateSyncTree() override {}
159 void DidPrepareTiles() override {} 159 void DidPrepareTiles() override {}
160 void DidCompletePageScaleAnimationOnImplThread() override { 160 void DidCompletePageScaleAnimationOnImplThread() override {
161 did_complete_page_scale_animation_ = true; 161 did_complete_page_scale_animation_ = true;
162 } 162 }
163 base::TimeTicks GetNextBeginImplFrameTimeIfRequested() const override {
164 return base::TimeTicks();
165 }
163 166
164 void set_reduce_memory_result(bool reduce_memory_result) { 167 void set_reduce_memory_result(bool reduce_memory_result) {
165 reduce_memory_result_ = reduce_memory_result; 168 reduce_memory_result_ = reduce_memory_result;
166 } 169 }
167 170
168 virtual bool CreateHostImpl(const LayerTreeSettings& settings, 171 virtual bool CreateHostImpl(const LayerTreeSettings& settings,
169 scoped_ptr<OutputSurface> output_surface) { 172 scoped_ptr<OutputSurface> output_surface) {
170 host_impl_ = LayerTreeHostImpl::Create(settings, 173 host_impl_ = LayerTreeHostImpl::Create(settings,
171 this, 174 this,
172 &proxy_, 175 &proxy_,
(...skipping 8042 matching lines...) Expand 10 before | Expand all | Expand 10 after
8215 // surface. 8218 // surface.
8216 EXPECT_EQ(0, num_lost_surfaces_); 8219 EXPECT_EQ(0, num_lost_surfaces_);
8217 host_impl_->DidLoseOutputSurface(); 8220 host_impl_->DidLoseOutputSurface();
8218 EXPECT_EQ(1, num_lost_surfaces_); 8221 EXPECT_EQ(1, num_lost_surfaces_);
8219 host_impl_->DidLoseOutputSurface(); 8222 host_impl_->DidLoseOutputSurface();
8220 EXPECT_LE(1, num_lost_surfaces_); 8223 EXPECT_LE(1, num_lost_surfaces_);
8221 } 8224 }
8222 8225
8223 } // namespace 8226 } // namespace
8224 } // namespace cc 8227 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698