Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(578)

Side by Side Diff: cc/trees/layer_tree_host_unittest.cc

Issue 17351017: Re-land: cc: Add raster finished signals to RasterWorkerPool. (Closed) Base URL: http://git.chromium.org/chromium/src.git@new-graph-build
Patch Set: rebase Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 2185 matching lines...) Expand 10 before | Expand all | Expand 10 after
2948 private: 2956 private:
2949 FakeContentLayerClient client_; 2957 FakeContentLayerClient client_;
2950 scoped_refptr<FakePictureLayer> layer_; 2958 scoped_refptr<FakePictureLayer> layer_;
2951 bool initialized_gl_; 2959 bool initialized_gl_;
2952 }; 2960 };
2953 2961
2954 MULTI_THREAD_TEST_F(LayerTreeHostTestDeferredInitialize); 2962 MULTI_THREAD_TEST_F(LayerTreeHostTestDeferredInitialize);
2955 2963
2956 } // namespace 2964 } // namespace
2957 } // namespace cc 2965 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698