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

Side by Side Diff: cc/scheduler/scheduler_unittest.cc

Issue 16871016: cc: Use BeginFrameArgs (Closed) Base URL: http://git.chromium.org/chromium/src.git@bfargs2
Patch Set: Rebase; More tests fixed; 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/scheduler/scheduler.h" 5 #include "cc/scheduler/scheduler.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "cc/test/scheduler_test_common.h" 11 #include "cc/test/scheduler_test_common.h"
12 #include "testing/gmock/include/gmock/gmock.h" 12 #include "testing/gmock/include/gmock/gmock.h"
13 #include "testing/gtest/include/gtest/gtest.h" 13 #include "testing/gtest/include/gtest/gtest.h"
14 14
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 } 112 }
113 virtual void ScheduledActionAcquireLayerTexturesForMainThread() OVERRIDE { 113 virtual void ScheduledActionAcquireLayerTexturesForMainThread() OVERRIDE {
114 actions_.push_back("ScheduledActionAcquireLayerTexturesForMainThread"); 114 actions_.push_back("ScheduledActionAcquireLayerTexturesForMainThread");
115 states_.push_back(scheduler_->StateAsStringForTesting()); 115 states_.push_back(scheduler_->StateAsStringForTesting());
116 } 116 }
117 virtual void DidAnticipatedDrawTimeChange(base::TimeTicks) OVERRIDE {} 117 virtual void DidAnticipatedDrawTimeChange(base::TimeTicks) OVERRIDE {}
118 virtual base::TimeDelta DrawDurationEstimate() OVERRIDE { 118 virtual base::TimeDelta DrawDurationEstimate() OVERRIDE {
119 return base::TimeDelta(); 119 return base::TimeDelta();
120 } 120 }
121 121
122 virtual void PostBeginFrameDeadline(const base::Closure& closure,
123 base::TimeTicks deadline) OVERRIDE {
124 actions_.push_back("PostBeginFrameDeadlineTask");
125 states_.push_back(scheduler_->StateAsStringForTesting());
126 }
127
122 protected: 128 protected:
123 bool needs_begin_frame_; 129 bool needs_begin_frame_;
124 bool draw_will_happen_; 130 bool draw_will_happen_;
125 bool swap_will_happen_if_draw_happens_; 131 bool swap_will_happen_if_draw_happens_;
126 int num_draws_; 132 int num_draws_;
127 std::vector<const char*> actions_; 133 std::vector<const char*> actions_;
128 std::vector<std::string> states_; 134 std::vector<std::string> states_;
129 scoped_ptr<Scheduler> scheduler_; 135 scoped_ptr<Scheduler> scheduler_;
130 }; 136 };
131 137
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after
591 597
592 // Get the compositor to do a ScheduledActionDrawAndSwapForced. 598 // Get the compositor to do a ScheduledActionDrawAndSwapForced.
593 scheduler->SetCanDraw(true); 599 scheduler->SetCanDraw(true);
594 scheduler->SetNeedsRedraw(); 600 scheduler->SetNeedsRedraw();
595 scheduler->SetNeedsForcedRedraw(); 601 scheduler->SetNeedsForcedRedraw();
596 EXPECT_TRUE(client.HasAction("ScheduledActionDrawAndSwapForced")); 602 EXPECT_TRUE(client.HasAction("ScheduledActionDrawAndSwapForced"));
597 } 603 }
598 604
599 } // namespace 605 } // namespace
600 } // namespace cc 606 } // namespace cc
607 */
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698