Roll src/third_party/WebKit d9c6159:8139f33 (svn 201974:201975)
[chromium-blink-merge.git] / cc / debug / traced_display_item_list.cc
blob1b45a593f2a98f8c527bb7b7ace73ab1f597ad78
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
3 // found in the LICENSE file.
4 #include "cc/debug/traced_display_item_list.h"
6 #include "base/json/json_writer.h"
7 #include "cc/debug/traced_value.h"
8 #include "cc/playback/display_item_list.h"
10 namespace cc {
12 TracedDisplayItemList::TracedDisplayItemList(
13 scoped_refptr<const DisplayItemList> list,
14 bool include_items)
15 : display_item_list_(list), include_items_(include_items) {
18 TracedDisplayItemList::~TracedDisplayItemList() {
21 void TracedDisplayItemList::AppendAsTraceFormat(std::string* out) const {
22 scoped_refptr<base::trace_event::ConvertableToTraceFormat> convertable =
23 display_item_list_->AsValue(include_items_);
24 convertable->AppendAsTraceFormat(out);
27 } // namespace cc