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

Side by Side Diff: cc/resources/clip_path_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_path_display_item.h ('k') | cc/resources/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 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/clip_path_display_item.h" 5 #include "cc/resources/clip_path_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 10
(...skipping 20 matching lines...) Expand all
31 31
32 int ClipPathDisplayItem::ApproximateOpCount() const { 32 int ClipPathDisplayItem::ApproximateOpCount() const {
33 return 1; 33 return 1;
34 } 34 }
35 35
36 size_t ClipPathDisplayItem::PictureMemoryUsage() const { 36 size_t ClipPathDisplayItem::PictureMemoryUsage() const {
37 size_t total_size = sizeof(SkPath) + sizeof(SkRegion::Op) + sizeof(bool); 37 size_t total_size = sizeof(SkPath) + sizeof(SkRegion::Op) + sizeof(bool);
38 return total_size; 38 return total_size;
39 } 39 }
40 40
41 void ClipPathDisplayItem::AsValueInto(base::debug::TracedValue* array) const { 41 void ClipPathDisplayItem::AsValueInto(
42 base::trace_event::TracedValue* array) const {
42 array->AppendString(base::StringPrintf("ClipPathDisplayItem length: %d", 43 array->AppendString(base::StringPrintf("ClipPathDisplayItem length: %d",
43 clip_path_.countPoints())); 44 clip_path_.countPoints()));
44 } 45 }
45 46
46 EndClipPathDisplayItem::EndClipPathDisplayItem() { 47 EndClipPathDisplayItem::EndClipPathDisplayItem() {
47 } 48 }
48 49
49 EndClipPathDisplayItem::~EndClipPathDisplayItem() { 50 EndClipPathDisplayItem::~EndClipPathDisplayItem() {
50 } 51 }
51 52
52 void EndClipPathDisplayItem::Raster(SkCanvas* canvas, 53 void EndClipPathDisplayItem::Raster(SkCanvas* canvas,
53 SkDrawPictureCallback* callback) const { 54 SkDrawPictureCallback* callback) const {
54 canvas->restore(); 55 canvas->restore();
55 } 56 }
56 57
57 bool EndClipPathDisplayItem::IsSuitableForGpuRasterization() const { 58 bool EndClipPathDisplayItem::IsSuitableForGpuRasterization() const {
58 return true; 59 return true;
59 } 60 }
60 61
61 int EndClipPathDisplayItem::ApproximateOpCount() const { 62 int EndClipPathDisplayItem::ApproximateOpCount() const {
62 return 0; 63 return 0;
63 } 64 }
64 65
65 size_t EndClipPathDisplayItem::PictureMemoryUsage() const { 66 size_t EndClipPathDisplayItem::PictureMemoryUsage() const {
66 return 0; 67 return 0;
67 } 68 }
68 69
69 void EndClipPathDisplayItem::AsValueInto( 70 void EndClipPathDisplayItem::AsValueInto(
70 base::debug::TracedValue* array) const { 71 base::trace_event::TracedValue* array) const {
71 array->AppendString("EndClipPathDisplayItem"); 72 array->AppendString("EndClipPathDisplayItem");
72 } 73 }
73 74
74 } // namespace cc 75 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/clip_path_display_item.h ('k') | cc/resources/display_item.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698