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/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
10 #include "base/single_thread_task_runner.h" | 10 #include "base/single_thread_task_runner.h" |
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
387 | 387 |
388 void DidCompleteSwapBuffers() override { | 388 void DidCompleteSwapBuffers() override { |
389 test_hooks_->DidCompleteSwapBuffers(); | 389 test_hooks_->DidCompleteSwapBuffers(); |
390 } | 390 } |
391 | 391 |
392 void DidPostSwapBuffers() override {} | 392 void DidPostSwapBuffers() override {} |
393 void DidAbortSwapBuffers() override {} | 393 void DidAbortSwapBuffers() override {} |
394 void RequestScheduleComposite() override { test_hooks_->ScheduleComposite(); } | 394 void RequestScheduleComposite() override { test_hooks_->ScheduleComposite(); } |
395 void DidCompletePageScaleAnimation() override {} | 395 void DidCompletePageScaleAnimation() override {} |
396 void BeginMainFrameNotExpectedSoon() override {} | 396 void BeginMainFrameNotExpectedSoon() override {} |
397 void ReportFixedRasterScaleUseCounters( | |
398 bool has_blurry_content, | |
399 bool has_potential_performance_regression) override {} | |
400 | 397 |
401 private: | 398 private: |
402 explicit LayerTreeHostClientForTesting(TestHooks* test_hooks) | 399 explicit LayerTreeHostClientForTesting(TestHooks* test_hooks) |
403 : test_hooks_(test_hooks) {} | 400 : test_hooks_(test_hooks) {} |
404 | 401 |
405 TestHooks* test_hooks_; | 402 TestHooks* test_hooks_; |
406 }; | 403 }; |
407 | 404 |
408 // Adapts LayerTreeHost for test. Injects LayerTreeHostImplForTesting. | 405 // Adapts LayerTreeHost for test. Injects LayerTreeHostImplForTesting. |
409 class LayerTreeHostForTesting : public LayerTreeHost { | 406 class LayerTreeHostForTesting : public LayerTreeHost { |
(...skipping 627 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1037 | 1034 |
1038 RemoteChannelImplForTest* LayerTreeTest::GetRemoteChannelImplForTest() const { | 1035 RemoteChannelImplForTest* LayerTreeTest::GetRemoteChannelImplForTest() const { |
1039 DCHECK(IsRemoteTest()); | 1036 DCHECK(IsRemoteTest()); |
1040 DCHECK(remote_client_layer_tree_host_); | 1037 DCHECK(remote_client_layer_tree_host_); |
1041 | 1038 |
1042 return static_cast<RemoteChannelImplForTest*>( | 1039 return static_cast<RemoteChannelImplForTest*>( |
1043 remote_client_layer_tree_host_->proxy()); | 1040 remote_client_layer_tree_host_->proxy()); |
1044 } | 1041 } |
1045 | 1042 |
1046 } // namespace cc | 1043 } // namespace cc |
OLD | NEW |