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/test/layer_tree_test.h" | 5 #include "cc/test/layer_tree_test.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/location.h" | 8 #include "base/location.h" |
9 #include "base/single_thread_task_runner.h" | 9 #include "base/single_thread_task_runner.h" |
10 #include "base/thread_task_runner_handle.h" | 10 #include "base/thread_task_runner_handle.h" |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 bool animate) override { | 211 bool animate) override { |
212 test_hooks_->UpdateTopControlsStateOnImpl(constraints, current, animate); | 212 test_hooks_->UpdateTopControlsStateOnImpl(constraints, current, animate); |
213 ThreadProxy::UpdateTopControlsStateOnImpl(constraints, current, animate); | 213 ThreadProxy::UpdateTopControlsStateOnImpl(constraints, current, animate); |
214 } | 214 } |
215 | 215 |
216 void SetDeferCommitsOnImpl(bool defer_commits) const override { | 216 void SetDeferCommitsOnImpl(bool defer_commits) const override { |
217 test_hooks_->SetDeferCommitsOnImpl(defer_commits); | 217 test_hooks_->SetDeferCommitsOnImpl(defer_commits); |
218 ThreadProxy::SetDeferCommitsOnImpl(defer_commits); | 218 ThreadProxy::SetDeferCommitsOnImpl(defer_commits); |
219 } | 219 } |
220 | 220 |
221 void BeginMainFrameAbortedOnImpl(CommitEarlyOutReason reason) override { | 221 void BeginMainFrameAbortedOnImpl( |
| 222 CommitEarlyOutReason reason, |
| 223 base::TimeTicks main_thread_start_time) override { |
222 test_hooks_->BeginMainFrameAbortedOnImpl(reason); | 224 test_hooks_->BeginMainFrameAbortedOnImpl(reason); |
223 ThreadProxy::BeginMainFrameAbortedOnImpl(reason); | 225 ThreadProxy::BeginMainFrameAbortedOnImpl(reason, main_thread_start_time); |
224 } | 226 } |
225 | 227 |
226 void SetNeedsRedrawOnImpl(const gfx::Rect& damage_rect) override { | 228 void SetNeedsRedrawOnImpl(const gfx::Rect& damage_rect) override { |
227 test_hooks_->SetNeedsRedrawOnImpl(damage_rect); | 229 test_hooks_->SetNeedsRedrawOnImpl(damage_rect); |
228 ThreadProxy::SetNeedsRedrawOnImpl(damage_rect); | 230 ThreadProxy::SetNeedsRedrawOnImpl(damage_rect); |
229 }; | 231 }; |
230 | 232 |
231 void SetNeedsCommitOnImpl() override { | 233 void SetNeedsCommitOnImpl() override { |
232 test_hooks_->SetNeedsCommitOnImpl(); | 234 test_hooks_->SetNeedsCommitOnImpl(); |
233 ThreadProxy::SetNeedsCommitOnImpl(); | 235 ThreadProxy::SetNeedsCommitOnImpl(); |
(...skipping 14 matching lines...) Expand all Loading... |
248 ThreadProxy::ReleaseOutputSurfaceOnImpl(completion); | 250 ThreadProxy::ReleaseOutputSurfaceOnImpl(completion); |
249 } | 251 } |
250 | 252 |
251 void FinishGLOnImpl(CompletionEvent* completion) override { | 253 void FinishGLOnImpl(CompletionEvent* completion) override { |
252 test_hooks_->FinishGLOnImpl(); | 254 test_hooks_->FinishGLOnImpl(); |
253 ThreadProxy::FinishGLOnImpl(completion); | 255 ThreadProxy::FinishGLOnImpl(completion); |
254 } | 256 } |
255 | 257 |
256 void StartCommitOnImpl(CompletionEvent* completion, | 258 void StartCommitOnImpl(CompletionEvent* completion, |
257 LayerTreeHost* layer_tree_host, | 259 LayerTreeHost* layer_tree_host, |
| 260 base::TimeTicks main_thread_start_time, |
258 bool hold_commit_for_activation) override { | 261 bool hold_commit_for_activation) override { |
259 test_hooks_->StartCommitOnImpl(); | 262 test_hooks_->StartCommitOnImpl(); |
260 ThreadProxy::StartCommitOnImpl(completion, layer_tree_host, | 263 ThreadProxy::StartCommitOnImpl(completion, layer_tree_host, |
| 264 main_thread_start_time, |
261 hold_commit_for_activation); | 265 hold_commit_for_activation); |
262 } | 266 } |
263 | 267 |
264 void InitializeImplOnImpl(CompletionEvent* completion, | 268 void InitializeImplOnImpl(CompletionEvent* completion, |
265 LayerTreeHost* layer_tree_host) override { | 269 LayerTreeHost* layer_tree_host) override { |
266 ThreadProxy::InitializeImplOnImpl(completion, layer_tree_host); | 270 ThreadProxy::InitializeImplOnImpl(completion, layer_tree_host); |
267 test_hooks_->InitializeImplOnImpl(); | 271 test_hooks_->InitializeImplOnImpl(); |
268 } | 272 } |
269 | 273 |
270 void LayerTreeHostClosedOnImpl(CompletionEvent* completion) override { | 274 void LayerTreeHostClosedOnImpl(CompletionEvent* completion) override { |
(...skipping 883 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1154 LayerTreeHost* LayerTreeTest::layer_tree_host() { | 1158 LayerTreeHost* LayerTreeTest::layer_tree_host() { |
1155 // We check for a null proxy here as we sometimes ask for the layer tree host | 1159 // We check for a null proxy here as we sometimes ask for the layer tree host |
1156 // when the proxy does not exist, often for checking settings after a test has | 1160 // when the proxy does not exist, often for checking settings after a test has |
1157 // completed. For example, LTHPixelResourceTest::RunPixelResourceTest. See | 1161 // completed. For example, LTHPixelResourceTest::RunPixelResourceTest. See |
1158 // elsewhere in this file for other examples. | 1162 // elsewhere in this file for other examples. |
1159 DCHECK(!proxy() || proxy()->IsMainThread() || proxy()->IsMainThreadBlocked()); | 1163 DCHECK(!proxy() || proxy()->IsMainThread() || proxy()->IsMainThreadBlocked()); |
1160 return layer_tree_host_.get(); | 1164 return layer_tree_host_.get(); |
1161 } | 1165 } |
1162 | 1166 |
1163 } // namespace cc | 1167 } // namespace cc |
OLD | NEW |