OLD | NEW |
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 | 4 |
5 #include "cc/resources/float_clip_display_item.h" | 5 #include "cc/resources/float_clip_display_item.h" |
6 | 6 |
7 #include "base/strings/stringprintf.h" | 7 #include "base/strings/stringprintf.h" |
8 #include "base/trace_event/trace_event_argument.h" | 8 #include "base/trace_event/trace_event_argument.h" |
9 #include "third_party/skia/include/core/SkCanvas.h" | 9 #include "third_party/skia/include/core/SkCanvas.h" |
10 #include "ui/gfx/skia_util.h" | 10 #include "ui/gfx/skia_util.h" |
(...skipping 18 matching lines...) Expand all Loading... |
29 } | 29 } |
30 | 30 |
31 int FloatClipDisplayItem::ApproximateOpCount() const { | 31 int FloatClipDisplayItem::ApproximateOpCount() const { |
32 return 1; | 32 return 1; |
33 } | 33 } |
34 | 34 |
35 size_t FloatClipDisplayItem::PictureMemoryUsage() const { | 35 size_t FloatClipDisplayItem::PictureMemoryUsage() const { |
36 return sizeof(gfx::RectF); | 36 return sizeof(gfx::RectF); |
37 } | 37 } |
38 | 38 |
39 void FloatClipDisplayItem::AsValueInto(base::debug::TracedValue* array) const { | 39 void FloatClipDisplayItem::AsValueInto( |
| 40 base::trace_event::TracedValue* array) const { |
40 array->AppendString(base::StringPrintf("FloatClipDisplayItem rect: [%s]", | 41 array->AppendString(base::StringPrintf("FloatClipDisplayItem rect: [%s]", |
41 clip_rect_.ToString().c_str())); | 42 clip_rect_.ToString().c_str())); |
42 } | 43 } |
43 | 44 |
44 EndFloatClipDisplayItem::EndFloatClipDisplayItem() { | 45 EndFloatClipDisplayItem::EndFloatClipDisplayItem() { |
45 } | 46 } |
46 | 47 |
47 EndFloatClipDisplayItem::~EndFloatClipDisplayItem() { | 48 EndFloatClipDisplayItem::~EndFloatClipDisplayItem() { |
48 } | 49 } |
49 | 50 |
50 void EndFloatClipDisplayItem::Raster(SkCanvas* canvas, | 51 void EndFloatClipDisplayItem::Raster(SkCanvas* canvas, |
51 SkDrawPictureCallback* callback) const { | 52 SkDrawPictureCallback* callback) const { |
52 canvas->restore(); | 53 canvas->restore(); |
53 } | 54 } |
54 | 55 |
55 bool EndFloatClipDisplayItem::IsSuitableForGpuRasterization() const { | 56 bool EndFloatClipDisplayItem::IsSuitableForGpuRasterization() const { |
56 return true; | 57 return true; |
57 } | 58 } |
58 | 59 |
59 int EndFloatClipDisplayItem::ApproximateOpCount() const { | 60 int EndFloatClipDisplayItem::ApproximateOpCount() const { |
60 return 0; | 61 return 0; |
61 } | 62 } |
62 | 63 |
63 size_t EndFloatClipDisplayItem::PictureMemoryUsage() const { | 64 size_t EndFloatClipDisplayItem::PictureMemoryUsage() const { |
64 return 0; | 65 return 0; |
65 } | 66 } |
66 | 67 |
67 void EndFloatClipDisplayItem::AsValueInto( | 68 void EndFloatClipDisplayItem::AsValueInto( |
68 base::debug::TracedValue* array) const { | 69 base::trace_event::TracedValue* array) const { |
69 array->AppendString("EndFloatClipDisplayItem"); | 70 array->AppendString("EndFloatClipDisplayItem"); |
70 } | 71 } |
71 | 72 |
72 } // namespace cc | 73 } // namespace cc |
OLD | NEW |