OLD | NEW |
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 Loading... |
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 8289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8464 // surface. | 8465 // surface. |
8465 EXPECT_EQ(0, num_lost_surfaces_); | 8466 EXPECT_EQ(0, num_lost_surfaces_); |
8466 host_impl_->DidLoseOutputSurface(); | 8467 host_impl_->DidLoseOutputSurface(); |
8467 EXPECT_EQ(1, num_lost_surfaces_); | 8468 EXPECT_EQ(1, num_lost_surfaces_); |
8468 host_impl_->DidLoseOutputSurface(); | 8469 host_impl_->DidLoseOutputSurface(); |
8469 EXPECT_LE(1, num_lost_surfaces_); | 8470 EXPECT_LE(1, num_lost_surfaces_); |
8470 } | 8471 } |
8471 | 8472 |
8472 } // namespace | 8473 } // namespace |
8473 } // namespace cc | 8474 } // namespace cc |
OLD | NEW |