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

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

Issue 60353002: cc: add DevTools instrumentation for impl-side frames (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed scheduler_unittest.cc Created 7 years, 1 month 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 | Annotate | Revision Log
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 #include "cc/scheduler/scheduler.h" 4 #include "cc/scheduler/scheduler.h"
5 5
6 #include <string> 6 #include <string>
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/scoped_vector.h" 10 #include "base/memory/scoped_vector.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 50
51 void Reset() { 51 void Reset() {
52 actions_.clear(); 52 actions_.clear();
53 states_.clear(); 53 states_.clear();
54 draw_will_happen_ = true; 54 draw_will_happen_ = true;
55 swap_will_happen_if_draw_happens_ = true; 55 swap_will_happen_if_draw_happens_ = true;
56 num_draws_ = 0; 56 num_draws_ = 0;
57 } 57 }
58 58
59 Scheduler* CreateScheduler(const SchedulerSettings& settings) { 59 Scheduler* CreateScheduler(const SchedulerSettings& settings) {
60 scheduler_ = Scheduler::Create(this, settings); 60 scheduler_ = Scheduler::Create(this, settings, 0);
61 return scheduler_.get(); 61 return scheduler_.get();
62 } 62 }
63 63
64 bool needs_begin_impl_frame() { return needs_begin_impl_frame_; } 64 bool needs_begin_impl_frame() { return needs_begin_impl_frame_; }
65 int num_draws() const { return num_draws_; } 65 int num_draws() const { return num_draws_; }
66 int num_actions_() const { return static_cast<int>(actions_.size()); } 66 int num_actions_() const { return static_cast<int>(actions_.size()); }
67 const char* Action(int i) const { return actions_[i]; } 67 const char* Action(int i) const { return actions_[i]; }
68 base::Value& StateForAction(int i) const { return *states_[i]; } 68 base::Value& StateForAction(int i) const { return *states_[i]; }
69 69
70 int ActionIndex(const char* action) const { 70 int ActionIndex(const char* action) const {
(...skipping 1052 matching lines...) Expand 10 before | Expand all | Expand 10 after
1123 EXPECT_TRUE(client.HasAction("ScheduledActionDrawAndSwapIfPossible")); 1123 EXPECT_TRUE(client.HasAction("ScheduledActionDrawAndSwapIfPossible"));
1124 EXPECT_TRUE(client.HasAction("ScheduledActionManageTiles")); 1124 EXPECT_TRUE(client.HasAction("ScheduledActionManageTiles"));
1125 EXPECT_LT(client.ActionIndex("ScheduledActionDrawAndSwapIfPossible"), 1125 EXPECT_LT(client.ActionIndex("ScheduledActionDrawAndSwapIfPossible"),
1126 client.ActionIndex("ScheduledActionManageTiles")); 1126 client.ActionIndex("ScheduledActionManageTiles"));
1127 EXPECT_FALSE(scheduler->RedrawPending()); 1127 EXPECT_FALSE(scheduler->RedrawPending());
1128 EXPECT_FALSE(scheduler->ManageTilesPending()); 1128 EXPECT_FALSE(scheduler->ManageTilesPending());
1129 } 1129 }
1130 1130
1131 } // namespace 1131 } // namespace
1132 } // namespace cc 1132 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698