| 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.h" | 5 #include "cc/trees/layer_tree_host.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/synchronization/lock.h" | 9 #include "base/synchronization/lock.h" |
| 10 #include "cc/animation/timing_function.h" | 10 #include "cc/animation/timing_function.h" |
| (...skipping 732 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 743 EXPECT_NE(first_frame_time_, impl->CurrentFrameTimeTicks()); | 743 EXPECT_NE(first_frame_time_, impl->CurrentFrameTimeTicks()); |
| 744 EndTest(); | 744 EndTest(); |
| 745 return; | 745 return; |
| 746 } | 746 } |
| 747 | 747 |
| 748 EXPECT_FALSE(impl->settings().impl_side_painting); | 748 EXPECT_FALSE(impl->settings().impl_side_painting); |
| 749 EndTest(); | 749 EndTest(); |
| 750 } | 750 } |
| 751 | 751 |
| 752 virtual bool CanActivatePendingTree(LayerTreeHostImpl* impl) OVERRIDE { | 752 virtual bool CanActivatePendingTree(LayerTreeHostImpl* impl) OVERRIDE { |
| 753 if (frame_ >= 1) |
| 754 return true; |
| 755 |
| 756 return false; |
| 757 } |
| 758 |
| 759 virtual bool CanActivatePendingTreeIfNeeded(LayerTreeHostImpl* impl) |
| 760 OVERRIDE { |
| 753 frame_++; | 761 frame_++; |
| 754 if (frame_ == 1) { | 762 if (frame_ == 1) { |
| 755 first_frame_time_ = impl->CurrentFrameTimeTicks(); | 763 first_frame_time_ = impl->CurrentFrameTimeTicks(); |
| 756 | 764 |
| 757 // Since base::TimeTicks::Now() uses a low-resolution clock on | 765 // Since base::TimeTicks::Now() uses a low-resolution clock on |
| 758 // Windows, we need to make sure that the clock has incremented past | 766 // Windows, we need to make sure that the clock has incremented past |
| 759 // first_frame_time_. | 767 // first_frame_time_. |
| 760 while (first_frame_time_ == base::TimeTicks::Now()) {} | 768 while (first_frame_time_ == base::TimeTicks::Now()) {} |
| 761 | 769 |
| 762 return false; | 770 return false; |
| (...skipping 2187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2950 private: | 2958 private: |
| 2951 FakeContentLayerClient client_; | 2959 FakeContentLayerClient client_; |
| 2952 scoped_refptr<FakePictureLayer> layer_; | 2960 scoped_refptr<FakePictureLayer> layer_; |
| 2953 bool initialized_gl_; | 2961 bool initialized_gl_; |
| 2954 }; | 2962 }; |
| 2955 | 2963 |
| 2956 MULTI_THREAD_TEST_F(LayerTreeHostTestDeferredInitialize); | 2964 MULTI_THREAD_TEST_F(LayerTreeHostTestDeferredInitialize); |
| 2957 | 2965 |
| 2958 } // namespace | 2966 } // namespace |
| 2959 } // namespace cc | 2967 } // namespace cc |
| OLD | NEW |