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

Side by Side Diff: cc/resources/drawing_display_item.cc

Issue 879913002: mechanical rename of base::debug -> base::trace_event for /cc (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move_trace_part3
Patch Set: Edited a comment Created 5 years, 10 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/resources/drawing_display_item.h ('k') | cc/resources/filter_display_item.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 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/resources/drawing_display_item.h" 5 #include "cc/resources/drawing_display_item.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/strings/stringprintf.h" 9 #include "base/strings/stringprintf.h"
10 #include "base/trace_event/trace_event_argument.h" 10 #include "base/trace_event/trace_event_argument.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 54
55 int DrawingDisplayItem::ApproximateOpCount() const { 55 int DrawingDisplayItem::ApproximateOpCount() const {
56 return picture_->approximateOpCount() + sizeof(gfx::PointF); 56 return picture_->approximateOpCount() + sizeof(gfx::PointF);
57 } 57 }
58 58
59 size_t DrawingDisplayItem::PictureMemoryUsage() const { 59 size_t DrawingDisplayItem::PictureMemoryUsage() const {
60 DCHECK(picture_); 60 DCHECK(picture_);
61 return SkPictureUtils::ApproximateBytesUsed(picture_.get()); 61 return SkPictureUtils::ApproximateBytesUsed(picture_.get());
62 } 62 }
63 63
64 void DrawingDisplayItem::AsValueInto(base::debug::TracedValue* array) const { 64 void DrawingDisplayItem::AsValueInto(
65 base::trace_event::TracedValue* array) const {
65 array->BeginDictionary(); 66 array->BeginDictionary();
66 array->SetString("name", "DrawingDisplayItem"); 67 array->SetString("name", "DrawingDisplayItem");
67 array->SetString("location", 68 array->SetString("location",
68 base::StringPrintf("[%f,%f]", picture_->cullRect().x(), 69 base::StringPrintf("[%f,%f]", picture_->cullRect().x(),
69 picture_->cullRect().y())); 70 picture_->cullRect().y()));
70 std::string b64_picture; 71 std::string b64_picture;
71 PictureDebugUtil::SerializeAsBase64(picture_.get(), &b64_picture); 72 PictureDebugUtil::SerializeAsBase64(picture_.get(), &b64_picture);
72 array->SetString("skp64", b64_picture); 73 array->SetString("skp64", b64_picture);
73 array->EndDictionary(); 74 array->EndDictionary();
74 } 75 }
75 76
76 } // namespace cc 77 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/drawing_display_item.h ('k') | cc/resources/filter_display_item.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698