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

Side by Side Diff: cc/output/begin_frame_args.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/output/begin_frame_args.h ('k') | cc/output/bsp_tree.h » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/output/begin_frame_args.h" 5 #include "cc/output/begin_frame_args.h"
6 6
7 #include "base/trace_event/trace_event_argument.h" 7 #include "base/trace_event/trace_event_argument.h"
8 #include "cc/proto/base_conversions.h" 8 #include "cc/proto/base_conversions.h"
9 #include "cc/proto/begin_main_frame_and_commit_state.pb.h" 9 #include "cc/proto/begin_main_frame_and_commit_state.pb.h"
10 10
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 DCHECK_NE(type, BeginFrameArgs::BEGIN_FRAME_ARGS_TYPE_MAX); 91 DCHECK_NE(type, BeginFrameArgs::BEGIN_FRAME_ARGS_TYPE_MAX);
92 #ifdef NDEBUG 92 #ifdef NDEBUG
93 return BeginFrameArgs(frame_time, deadline, interval, type); 93 return BeginFrameArgs(frame_time, deadline, interval, type);
94 #else 94 #else
95 BeginFrameArgs args = BeginFrameArgs(frame_time, deadline, interval, type); 95 BeginFrameArgs args = BeginFrameArgs(frame_time, deadline, interval, type);
96 args.created_from = location; 96 args.created_from = location;
97 return args; 97 return args;
98 #endif 98 #endif
99 } 99 }
100 100
101 scoped_ptr<base::trace_event::ConvertableToTraceFormat> 101 std::unique_ptr<base::trace_event::ConvertableToTraceFormat>
102 BeginFrameArgs::AsValue() const { 102 BeginFrameArgs::AsValue() const {
103 scoped_ptr<base::trace_event::TracedValue> state( 103 std::unique_ptr<base::trace_event::TracedValue> state(
104 new base::trace_event::TracedValue()); 104 new base::trace_event::TracedValue());
105 AsValueInto(state.get()); 105 AsValueInto(state.get());
106 return std::move(state); 106 return std::move(state);
107 } 107 }
108 108
109 void BeginFrameArgs::AsValueInto(base::trace_event::TracedValue* state) const { 109 void BeginFrameArgs::AsValueInto(base::trace_event::TracedValue* state) const {
110 state->SetString("type", "BeginFrameArgs"); 110 state->SetString("type", "BeginFrameArgs");
111 state->SetString("subtype", TypeToString(type)); 111 state->SetString("subtype", TypeToString(type));
112 state->SetDouble("frame_time_us", frame_time.ToInternalValue()); 112 state->SetDouble("frame_time_us", frame_time.ToInternalValue());
113 state->SetDouble("deadline_us", deadline.ToInternalValue()); 113 state->SetDouble("deadline_us", deadline.ToInternalValue());
(...skipping 28 matching lines...) Expand all
142 // output. 142 // output.
143 base::TimeDelta BeginFrameArgs::DefaultEstimatedParentDrawTime() { 143 base::TimeDelta BeginFrameArgs::DefaultEstimatedParentDrawTime() {
144 return base::TimeDelta::FromMicroseconds(16666 / 3); 144 return base::TimeDelta::FromMicroseconds(16666 / 3);
145 } 145 }
146 146
147 base::TimeDelta BeginFrameArgs::DefaultInterval() { 147 base::TimeDelta BeginFrameArgs::DefaultInterval() {
148 return base::TimeDelta::FromMicroseconds(16666); 148 return base::TimeDelta::FromMicroseconds(16666);
149 } 149 }
150 150
151 } // namespace cc 151 } // namespace cc
OLDNEW
« no previous file with comments | « cc/output/begin_frame_args.h ('k') | cc/output/bsp_tree.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698