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

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

Issue 817603002: cc: Make scheduling be driven by vsync for android webview. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 9 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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 void PostDelayedAnimationTaskOnImplThread(const base::Closure& task, 155 void PostDelayedAnimationTaskOnImplThread(const base::Closure& task,
156 base::TimeDelta delay) override { 156 base::TimeDelta delay) override {
157 animation_task_ = task; 157 animation_task_ = task;
158 requested_animation_delay_ = delay; 158 requested_animation_delay_ = delay;
159 } 159 }
160 void DidActivateSyncTree() override {} 160 void DidActivateSyncTree() override {}
161 void DidPrepareTiles() override {} 161 void DidPrepareTiles() override {}
162 void DidCompletePageScaleAnimationOnImplThread() override { 162 void DidCompletePageScaleAnimationOnImplThread() override {
163 did_complete_page_scale_animation_ = true; 163 did_complete_page_scale_animation_ = true;
164 } 164 }
165 void OnDrawForOutputSurface() override {}
165 166
166 void set_reduce_memory_result(bool reduce_memory_result) { 167 void set_reduce_memory_result(bool reduce_memory_result) {
167 reduce_memory_result_ = reduce_memory_result; 168 reduce_memory_result_ = reduce_memory_result;
168 } 169 }
169 170
170 virtual bool CreateHostImpl(const LayerTreeSettings& settings, 171 virtual bool CreateHostImpl(const LayerTreeSettings& settings,
171 scoped_ptr<OutputSurface> output_surface) { 172 scoped_ptr<OutputSurface> output_surface) {
172 host_impl_ = LayerTreeHostImpl::Create( 173 host_impl_ = LayerTreeHostImpl::Create(
173 settings, this, &proxy_, &stats_instrumentation_, 174 settings, this, &proxy_, &stats_instrumentation_,
174 shared_bitmap_manager_.get(), gpu_memory_buffer_manager_.get(), 175 shared_bitmap_manager_.get(), gpu_memory_buffer_manager_.get(),
(...skipping 8322 matching lines...) Expand 10 before | Expand all | Expand 10 after
8497 // surface. 8498 // surface.
8498 EXPECT_EQ(0, num_lost_surfaces_); 8499 EXPECT_EQ(0, num_lost_surfaces_);
8499 host_impl_->DidLoseOutputSurface(); 8500 host_impl_->DidLoseOutputSurface();
8500 EXPECT_EQ(1, num_lost_surfaces_); 8501 EXPECT_EQ(1, num_lost_surfaces_);
8501 host_impl_->DidLoseOutputSurface(); 8502 host_impl_->DidLoseOutputSurface();
8502 EXPECT_LE(1, num_lost_surfaces_); 8503 EXPECT_LE(1, num_lost_surfaces_);
8503 } 8504 }
8504 8505
8505 } // namespace 8506 } // namespace
8506 } // namespace cc 8507 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698