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

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

Issue 895853003: Update from https://crrev.com/314320 (Closed) Base URL: https://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/float_clip_display_item.h ('k') | cc/resources/gpu_rasterizer.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 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"
8 #include "base/trace_event/trace_event_argument.h"
7 #include "third_party/skia/include/core/SkCanvas.h" 9 #include "third_party/skia/include/core/SkCanvas.h"
8 #include "ui/gfx/skia_util.h" 10 #include "ui/gfx/skia_util.h"
9 11
10 namespace cc { 12 namespace cc {
11 13
12 FloatClipDisplayItem::FloatClipDisplayItem(gfx::RectF clip_rect) 14 FloatClipDisplayItem::FloatClipDisplayItem(gfx::RectF clip_rect)
13 : clip_rect_(clip_rect) { 15 : clip_rect_(clip_rect) {
14 } 16 }
15 17
16 FloatClipDisplayItem::~FloatClipDisplayItem() { 18 FloatClipDisplayItem::~FloatClipDisplayItem() {
(...skipping 10 matching lines...) Expand all
27 } 29 }
28 30
29 int FloatClipDisplayItem::ApproximateOpCount() const { 31 int FloatClipDisplayItem::ApproximateOpCount() const {
30 return 1; 32 return 1;
31 } 33 }
32 34
33 size_t FloatClipDisplayItem::PictureMemoryUsage() const { 35 size_t FloatClipDisplayItem::PictureMemoryUsage() const {
34 return sizeof(gfx::RectF); 36 return sizeof(gfx::RectF);
35 } 37 }
36 38
39 void FloatClipDisplayItem::AsValueInto(base::debug::TracedValue* array) const {
40 array->AppendString(base::StringPrintf("FloatClipDisplayItem rect: [%s]",
41 clip_rect_.ToString().c_str()));
42 }
43
37 EndFloatClipDisplayItem::EndFloatClipDisplayItem() { 44 EndFloatClipDisplayItem::EndFloatClipDisplayItem() {
38 } 45 }
39 46
40 EndFloatClipDisplayItem::~EndFloatClipDisplayItem() { 47 EndFloatClipDisplayItem::~EndFloatClipDisplayItem() {
41 } 48 }
42 49
43 void EndFloatClipDisplayItem::Raster(SkCanvas* canvas, 50 void EndFloatClipDisplayItem::Raster(SkCanvas* canvas,
44 SkDrawPictureCallback* callback) const { 51 SkDrawPictureCallback* callback) const {
45 canvas->restore(); 52 canvas->restore();
46 } 53 }
47 54
48 bool EndFloatClipDisplayItem::IsSuitableForGpuRasterization() const { 55 bool EndFloatClipDisplayItem::IsSuitableForGpuRasterization() const {
49 return true; 56 return true;
50 } 57 }
51 58
52 int EndFloatClipDisplayItem::ApproximateOpCount() const { 59 int EndFloatClipDisplayItem::ApproximateOpCount() const {
53 return 0; 60 return 0;
54 } 61 }
55 62
56 size_t EndFloatClipDisplayItem::PictureMemoryUsage() const { 63 size_t EndFloatClipDisplayItem::PictureMemoryUsage() const {
57 return 0; 64 return 0;
58 } 65 }
59 66
67 void EndFloatClipDisplayItem::AsValueInto(
68 base::debug::TracedValue* array) const {
69 array->AppendString("EndFloatClipDisplayItem");
70 }
71
60 } // namespace cc 72 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/float_clip_display_item.h ('k') | cc/resources/gpu_rasterizer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698