OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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.h" | 5 #include "cc/trees/layer_tree_host.h" |
6 | 6 |
7 #include "base/memory/weak_ptr.h" | 7 #include "base/memory/weak_ptr.h" |
8 #include "cc/base/thread_impl.h" | 8 #include "cc/base/thread_impl.h" |
9 #include "cc/layers/content_layer.h" | 9 #include "cc/layers/content_layer.h" |
10 #include "cc/layers/layer.h" | 10 #include "cc/layers/layer.h" |
(...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
525 RunTest(true, true, true); | 525 RunTest(true, true, true); |
526 } | 526 } |
527 | 527 |
528 class ImplSidePaintingScrollTest : public LayerTreeHostScrollTest { | 528 class ImplSidePaintingScrollTest : public LayerTreeHostScrollTest { |
529 public: | 529 public: |
530 virtual void InitializeSettings(LayerTreeSettings* settings) OVERRIDE { | 530 virtual void InitializeSettings(LayerTreeSettings* settings) OVERRIDE { |
531 settings->impl_side_painting = true; | 531 settings->impl_side_painting = true; |
532 } | 532 } |
533 | 533 |
534 virtual void DrawLayersOnThread(LayerTreeHostImpl* impl) OVERRIDE { | 534 virtual void DrawLayersOnThread(LayerTreeHostImpl* impl) OVERRIDE { |
535 // Manual vsync tick. | |
536 if (impl->pending_tree()) | 535 if (impl->pending_tree()) |
537 impl->SetNeedsRedraw(); | 536 impl->SetNeedsRedraw(); |
538 } | 537 } |
539 }; | 538 }; |
540 | 539 |
541 class ImplSidePaintingScrollTestSimple : public ImplSidePaintingScrollTest { | 540 class ImplSidePaintingScrollTestSimple : public ImplSidePaintingScrollTest { |
542 public: | 541 public: |
543 ImplSidePaintingScrollTestSimple() | 542 ImplSidePaintingScrollTestSimple() |
544 : initial_scroll_(10, 20), | 543 : initial_scroll_(10, 20), |
545 main_thread_scroll_(40, 5), | 544 main_thread_scroll_(40, 5), |
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
748 base::Unretained(&input_handler_client))); | 747 base::Unretained(&input_handler_client))); |
749 | 748 |
750 layer_tree_host->DidStopFlinging(); | 749 layer_tree_host->DidStopFlinging(); |
751 layer_tree_host.reset(); | 750 layer_tree_host.reset(); |
752 impl_thread.Stop(); | 751 impl_thread.Stop(); |
753 EXPECT_TRUE(received_stop_flinging); | 752 EXPECT_TRUE(received_stop_flinging); |
754 } | 753 } |
755 | 754 |
756 } // namespace | 755 } // namespace |
757 } // namespace cc | 756 } // namespace cc |
OLD | NEW |