| 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 "cc/base/thread_impl.h" | 7 #include "cc/base/thread_impl.h" |
| 8 #include "cc/layers/content_layer.h" | 8 #include "cc/layers/content_layer.h" |
| 9 #include "cc/layers/layer.h" | 9 #include "cc/layers/layer.h" |
| 10 #include "cc/layers/layer_impl.h" | 10 #include "cc/layers/layer_impl.h" |
| (...skipping 583 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 594 initial_scroll_ + impl_thread_scroll1_); | 594 initial_scroll_ + impl_thread_scroll1_); |
| 595 | 595 |
| 596 // Pretend like Javascript updated the scroll position itself with a | 596 // Pretend like Javascript updated the scroll position itself with a |
| 597 // change of main_thread_scroll. | 597 // change of main_thread_scroll. |
| 598 root->SetScrollOffset(initial_scroll_ + | 598 root->SetScrollOffset(initial_scroll_ + |
| 599 main_thread_scroll_ + | 599 main_thread_scroll_ + |
| 600 impl_thread_scroll1_); | 600 impl_thread_scroll1_); |
| 601 } | 601 } |
| 602 } | 602 } |
| 603 | 603 |
| 604 virtual bool CanActivatePendingTree() OVERRIDE { | 604 virtual bool CanActivatePendingTree(LayerTreeHostImpl* impl) OVERRIDE { |
| 605 return can_activate_; | 605 return can_activate_; |
| 606 } | 606 } |
| 607 | 607 |
| 608 virtual void CommitCompleteOnThread(LayerTreeHostImpl* impl) OVERRIDE { | 608 virtual void CommitCompleteOnThread(LayerTreeHostImpl* impl) OVERRIDE { |
| 609 // We force a second draw here of the first commit before activating | 609 // We force a second draw here of the first commit before activating |
| 610 // the second commit. | 610 // the second commit. |
| 611 if (impl->active_tree()->source_frame_number() == 0) | 611 if (impl->active_tree()->source_frame_number() == 0) |
| 612 impl->SetNeedsRedraw(); | 612 impl->SetNeedsRedraw(); |
| 613 } | 613 } |
| 614 | 614 |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 793 LayerTreeHost::Create(&client, settings, impl_ccthread.Pass()); | 793 LayerTreeHost::Create(&client, settings, impl_ccthread.Pass()); |
| 794 | 794 |
| 795 layer_tree_host->DidStopFlinging(); | 795 layer_tree_host->DidStopFlinging(); |
| 796 layer_tree_host.reset(); | 796 layer_tree_host.reset(); |
| 797 impl_thread.Stop(); | 797 impl_thread.Stop(); |
| 798 EXPECT_TRUE(received_stop_flinging); | 798 EXPECT_TRUE(received_stop_flinging); |
| 799 } | 799 } |
| 800 | 800 |
| 801 } // namespace | 801 } // namespace |
| 802 } // namespace cc | 802 } // namespace cc |
| OLD | NEW |