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

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

Issue 1866203004: Convert //cc from scoped_ptr to std::unique_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: scopedptrcc: rebase Created 4 years, 8 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/begin_frame_source.h ('k') | cc/scheduler/begin_frame_source_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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/begin_frame_source.h" 5 #include "cc/scheduler/begin_frame_source.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 // SyntheticBeginFrameSource --------------------------------------------- 190 // SyntheticBeginFrameSource ---------------------------------------------
191 SyntheticBeginFrameSource::SyntheticBeginFrameSource( 191 SyntheticBeginFrameSource::SyntheticBeginFrameSource(
192 base::SingleThreadTaskRunner* task_runner, 192 base::SingleThreadTaskRunner* task_runner,
193 base::TimeDelta initial_vsync_interval) 193 base::TimeDelta initial_vsync_interval)
194 : time_source_( 194 : time_source_(
195 DelayBasedTimeSource::Create(initial_vsync_interval, task_runner)) { 195 DelayBasedTimeSource::Create(initial_vsync_interval, task_runner)) {
196 time_source_->SetClient(this); 196 time_source_->SetClient(this);
197 } 197 }
198 198
199 SyntheticBeginFrameSource::SyntheticBeginFrameSource( 199 SyntheticBeginFrameSource::SyntheticBeginFrameSource(
200 scoped_ptr<DelayBasedTimeSource> time_source) 200 std::unique_ptr<DelayBasedTimeSource> time_source)
201 : time_source_(std::move(time_source)) { 201 : time_source_(std::move(time_source)) {
202 time_source_->SetClient(this); 202 time_source_->SetClient(this);
203 } 203 }
204 204
205 SyntheticBeginFrameSource::~SyntheticBeginFrameSource() {} 205 SyntheticBeginFrameSource::~SyntheticBeginFrameSource() {}
206 206
207 void SyntheticBeginFrameSource::OnUpdateVSyncParameters( 207 void SyntheticBeginFrameSource::OnUpdateVSyncParameters(
208 base::TimeTicks new_vsync_timebase, 208 base::TimeTicks new_vsync_timebase,
209 base::TimeDelta new_vsync_interval) { 209 base::TimeDelta new_vsync_interval) {
210 time_source_->SetTimebaseAndInterval(new_vsync_timebase, new_vsync_interval); 210 time_source_->SetTimebaseAndInterval(new_vsync_timebase, new_vsync_interval);
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 base::trace_event::TracedValue* dict) const { 257 base::trace_event::TracedValue* dict) const {
258 dict->SetString("type", "SyntheticBeginFrameSource"); 258 dict->SetString("type", "SyntheticBeginFrameSource");
259 BeginFrameSourceBase::AsValueInto(dict); 259 BeginFrameSourceBase::AsValueInto(dict);
260 260
261 dict->BeginDictionary("time_source"); 261 dict->BeginDictionary("time_source");
262 time_source_->AsValueInto(dict); 262 time_source_->AsValueInto(dict);
263 dict->EndDictionary(); 263 dict->EndDictionary();
264 } 264 }
265 265
266 } // namespace cc 266 } // namespace cc
OLDNEW
« no previous file with comments | « cc/scheduler/begin_frame_source.h ('k') | cc/scheduler/begin_frame_source_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698