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

Side by Side Diff: cc/resources/transparency_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/transparency_display_item.h ('k') | cc/resources/video_resource_updater.cc » ('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/transparency_display_item.h" 5 #include "cc/resources/transparency_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 "third_party/skia/include/core/SkPaint.h" 10 #include "third_party/skia/include/core/SkPaint.h"
(...skipping 24 matching lines...) Expand all
35 35
36 int TransparencyDisplayItem::ApproximateOpCount() const { 36 int TransparencyDisplayItem::ApproximateOpCount() const {
37 return 1; 37 return 1;
38 } 38 }
39 39
40 size_t TransparencyDisplayItem::PictureMemoryUsage() const { 40 size_t TransparencyDisplayItem::PictureMemoryUsage() const {
41 return sizeof(float) + sizeof(SkXfermode::Mode); 41 return sizeof(float) + sizeof(SkXfermode::Mode);
42 } 42 }
43 43
44 void TransparencyDisplayItem::AsValueInto( 44 void TransparencyDisplayItem::AsValueInto(
45 base::debug::TracedValue* array) const { 45 base::trace_event::TracedValue* array) const {
46 array->AppendString( 46 array->AppendString(
47 base::StringPrintf("TransparencyDisplayItem opacity: %f, blend_mode: %d", 47 base::StringPrintf("TransparencyDisplayItem opacity: %f, blend_mode: %d",
48 opacity_, blend_mode_)); 48 opacity_, blend_mode_));
49 } 49 }
50 50
51 EndTransparencyDisplayItem::EndTransparencyDisplayItem() { 51 EndTransparencyDisplayItem::EndTransparencyDisplayItem() {
52 } 52 }
53 53
54 EndTransparencyDisplayItem::~EndTransparencyDisplayItem() { 54 EndTransparencyDisplayItem::~EndTransparencyDisplayItem() {
55 } 55 }
56 56
57 void EndTransparencyDisplayItem::Raster(SkCanvas* canvas, 57 void EndTransparencyDisplayItem::Raster(SkCanvas* canvas,
58 SkDrawPictureCallback* callback) const { 58 SkDrawPictureCallback* callback) const {
59 canvas->restore(); 59 canvas->restore();
60 } 60 }
61 61
62 bool EndTransparencyDisplayItem::IsSuitableForGpuRasterization() const { 62 bool EndTransparencyDisplayItem::IsSuitableForGpuRasterization() const {
63 return true; 63 return true;
64 } 64 }
65 65
66 int EndTransparencyDisplayItem::ApproximateOpCount() const { 66 int EndTransparencyDisplayItem::ApproximateOpCount() const {
67 return 0; 67 return 0;
68 } 68 }
69 69
70 size_t EndTransparencyDisplayItem::PictureMemoryUsage() const { 70 size_t EndTransparencyDisplayItem::PictureMemoryUsage() const {
71 return 0; 71 return 0;
72 } 72 }
73 73
74 void EndTransparencyDisplayItem::AsValueInto( 74 void EndTransparencyDisplayItem::AsValueInto(
75 base::debug::TracedValue* array) const { 75 base::trace_event::TracedValue* array) const {
76 array->AppendString("EndTransparencyDisplayItem"); 76 array->AppendString("EndTransparencyDisplayItem");
77 } 77 }
78 78
79 } // namespace cc 79 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/transparency_display_item.h ('k') | cc/resources/video_resource_updater.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698