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

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

Issue 502203003: Remove implicit conversions from scoped_refptr to T* in cc/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Change to use .get() instead of rewriting local variable Created 6 years, 4 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
« no previous file with comments | « cc/scheduler/scheduler_state_machine.cc ('k') | cc/test/layer_tree_json_parser_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 } 109 }
110 bool needs_begin_frame() { return needs_begin_frame_; } 110 bool needs_begin_frame() { return needs_begin_frame_; }
111 int num_draws() const { return num_draws_; } 111 int num_draws() const { return num_draws_; }
112 int num_actions_() const { return static_cast<int>(actions_.size()); } 112 int num_actions_() const { return static_cast<int>(actions_.size()); }
113 const char* Action(int i) const { return actions_[i]; } 113 const char* Action(int i) const { return actions_[i]; }
114 std::string StateForAction(int i) const { return states_[i]->ToString(); } 114 std::string StateForAction(int i) const { return states_[i]->ToString(); }
115 base::TimeTicks posted_begin_impl_frame_deadline() const { 115 base::TimeTicks posted_begin_impl_frame_deadline() const {
116 return posted_begin_impl_frame_deadline_; 116 return posted_begin_impl_frame_deadline_;
117 } 117 }
118 118
119 OrderedSimpleTaskRunner& task_runner() { return *task_runner_; } 119 OrderedSimpleTaskRunner& task_runner() { return *task_runner_.get(); }
120 120
121 int ActionIndex(const char* action) const { 121 int ActionIndex(const char* action) const {
122 for (size_t i = 0; i < actions_.size(); i++) 122 for (size_t i = 0; i < actions_.size(); i++)
123 if (!strcmp(actions_[i], action)) 123 if (!strcmp(actions_[i], action))
124 return i; 124 return i;
125 return -1; 125 return -1;
126 } 126 }
127 127
128 void SetSwapContainsIncompleteTile(bool contain) { 128 void SetSwapContainsIncompleteTile(bool contain) {
129 swap_contains_incomplete_tile_ = contain; 129 swap_contains_incomplete_tile_ = contain;
(...skipping 1787 matching lines...) Expand 10 before | Expand all | Expand 10 after
1917 EXPECT_FALSE(scheduler->IsSyntheticBeginFrameSourceActive()); 1917 EXPECT_FALSE(scheduler->IsSyntheticBeginFrameSourceActive());
1918 1918
1919 client.Reset(); 1919 client.Reset();
1920 client.task_runner().RunPendingTasks(); // Run posted deadline. 1920 client.task_runner().RunPendingTasks(); // Run posted deadline.
1921 EXPECT_SINGLE_ACTION("ScheduledActionBeginOutputSurfaceCreation", client); 1921 EXPECT_SINGLE_ACTION("ScheduledActionBeginOutputSurfaceCreation", client);
1922 EXPECT_FALSE(scheduler->IsSyntheticBeginFrameSourceActive()); 1922 EXPECT_FALSE(scheduler->IsSyntheticBeginFrameSourceActive());
1923 } 1923 }
1924 1924
1925 } // namespace 1925 } // namespace
1926 } // namespace cc 1926 } // namespace cc
OLDNEW
« no previous file with comments | « cc/scheduler/scheduler_state_machine.cc ('k') | cc/test/layer_tree_json_parser_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698