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

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

Issue 935333002: Update from https://crrev.com/316786 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: 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/clip_display_item.h ('k') | cc/resources/clip_path_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/clip_display_item.h" 5 #include "cc/resources/clip_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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 } 46 }
47 47
48 size_t ClipDisplayItem::PictureMemoryUsage() const { 48 size_t ClipDisplayItem::PictureMemoryUsage() const {
49 size_t total_size = sizeof(gfx::Rect); 49 size_t total_size = sizeof(gfx::Rect);
50 for (size_t i = 0; i < rounded_clip_rects_.size(); ++i) { 50 for (size_t i = 0; i < rounded_clip_rects_.size(); ++i) {
51 total_size += sizeof(rounded_clip_rects_[i]); 51 total_size += sizeof(rounded_clip_rects_[i]);
52 } 52 }
53 return total_size; 53 return total_size;
54 } 54 }
55 55
56 void ClipDisplayItem::AsValueInto(base::debug::TracedValue* array) const { 56 void ClipDisplayItem::AsValueInto(base::trace_event::TracedValue* array) const {
57 std::string value = base::StringPrintf("ClipDisplayItem rect: [%s]", 57 std::string value = base::StringPrintf("ClipDisplayItem rect: [%s]",
58 clip_rect_.ToString().c_str()); 58 clip_rect_.ToString().c_str());
59 for (const SkRRect& rounded_rect : rounded_clip_rects_) { 59 for (const SkRRect& rounded_rect : rounded_clip_rects_) {
60 base::StringAppendF( 60 base::StringAppendF(
61 &value, " rounded_rect: [rect: [%s]", 61 &value, " rounded_rect: [rect: [%s]",
62 gfx::SkRectToRectF(rounded_rect.rect()).ToString().c_str()); 62 gfx::SkRectToRectF(rounded_rect.rect()).ToString().c_str());
63 base::StringAppendF(&value, " radii: ["); 63 base::StringAppendF(&value, " radii: [");
64 SkVector upper_left_radius = rounded_rect.radii(SkRRect::kUpperLeft_Corner); 64 SkVector upper_left_radius = rounded_rect.radii(SkRRect::kUpperLeft_Corner);
65 base::StringAppendF(&value, "[%f,%f],", upper_left_radius.x(), 65 base::StringAppendF(&value, "[%f,%f],", upper_left_radius.x(),
66 upper_left_radius.y()); 66 upper_left_radius.y());
(...skipping 28 matching lines...) Expand all
95 } 95 }
96 96
97 int EndClipDisplayItem::ApproximateOpCount() const { 97 int EndClipDisplayItem::ApproximateOpCount() const {
98 return 0; 98 return 0;
99 } 99 }
100 100
101 size_t EndClipDisplayItem::PictureMemoryUsage() const { 101 size_t EndClipDisplayItem::PictureMemoryUsage() const {
102 return 0; 102 return 0;
103 } 103 }
104 104
105 void EndClipDisplayItem::AsValueInto(base::debug::TracedValue* array) const { 105 void EndClipDisplayItem::AsValueInto(
106 base::trace_event::TracedValue* array) const {
106 array->AppendString("EndClipDisplayItem"); 107 array->AppendString("EndClipDisplayItem");
107 } 108 }
108 109
109 } // namespace cc 110 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/clip_display_item.h ('k') | cc/resources/clip_path_display_item.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698