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

Side by Side Diff: cc/debug/traced_display_item_list.cc

Issue 1717283003: tracing: Make ConvertableToTraceFormat move-only scoped_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 9 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/debug/traced_display_item_list.h" 4 #include "cc/debug/traced_display_item_list.h"
5 5
6 #include "base/json/json_writer.h" 6 #include "base/json/json_writer.h"
7 #include "cc/debug/traced_value.h" 7 #include "cc/debug/traced_value.h"
8 #include "cc/playback/display_item_list.h" 8 #include "cc/playback/display_item_list.h"
9 9
10 namespace cc { 10 namespace cc {
11 11
12 TracedDisplayItemList::TracedDisplayItemList( 12 TracedDisplayItemList::TracedDisplayItemList(
13 scoped_refptr<const DisplayItemList> list, 13 scoped_refptr<const DisplayItemList> list,
14 bool include_items) 14 bool include_items)
15 : display_item_list_(list), include_items_(include_items) { 15 : display_item_list_(list), include_items_(include_items) {
16 } 16 }
17 17
18 TracedDisplayItemList::~TracedDisplayItemList() { 18 TracedDisplayItemList::~TracedDisplayItemList() {
19 } 19 }
20 20
21 void TracedDisplayItemList::AppendAsTraceFormat(std::string* out) const { 21 void TracedDisplayItemList::AppendAsTraceFormat(std::string* out) const {
22 scoped_refptr<base::trace_event::ConvertableToTraceFormat> convertable = 22 scoped_ptr<base::trace_event::ConvertableToTraceFormat> convertable(
23 display_item_list_->AsValue(include_items_); 23 display_item_list_->AsValue(include_items_));
24 convertable->AppendAsTraceFormat(out); 24 convertable->AppendAsTraceFormat(out);
25 } 25 }
26 26
27 } // namespace cc 27 } // namespace cc
OLDNEW
« no previous file with comments | « cc/debug/traced_display_item_list.h ('k') | cc/layers/layer.h » ('j') | cc/layers/layer_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698