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

Side by Side Diff: cc/playback/compositing_display_item.h

Issue 1982893002: [blimp] Add SkPicture caching support. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments from vmpstr, including adding //cc/blimp Created 4 years, 6 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/playback/clip_path_display_item.cc ('k') | cc/playback/compositing_display_item.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 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 #ifndef CC_PLAYBACK_COMPOSITING_DISPLAY_ITEM_H_ 5 #ifndef CC_PLAYBACK_COMPOSITING_DISPLAY_ITEM_H_
6 #define CC_PLAYBACK_COMPOSITING_DISPLAY_ITEM_H_ 6 #define CC_PLAYBACK_COMPOSITING_DISPLAY_ITEM_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
11 #include <memory> 11 #include <memory>
12 12
13 #include "base/memory/ptr_util.h" 13 #include "base/memory/ptr_util.h"
14 #include "cc/base/cc_export.h" 14 #include "cc/base/cc_export.h"
15 #include "cc/playback/display_item.h" 15 #include "cc/playback/display_item.h"
16 #include "third_party/skia/include/core/SkColorFilter.h" 16 #include "third_party/skia/include/core/SkColorFilter.h"
17 #include "third_party/skia/include/core/SkRect.h" 17 #include "third_party/skia/include/core/SkRect.h"
18 #include "third_party/skia/include/core/SkRefCnt.h" 18 #include "third_party/skia/include/core/SkRefCnt.h"
19 #include "third_party/skia/include/core/SkXfermode.h" 19 #include "third_party/skia/include/core/SkXfermode.h"
20 #include "ui/gfx/geometry/rect_f.h" 20 #include "ui/gfx/geometry/rect_f.h"
21 21
22 class SkCanvas; 22 class SkCanvas;
23 23
24 namespace cc { 24 namespace cc {
25 class ImageSerializationProcessor;
26 25
27 class CC_EXPORT CompositingDisplayItem : public DisplayItem { 26 class CC_EXPORT CompositingDisplayItem : public DisplayItem {
28 public: 27 public:
29 CompositingDisplayItem(uint8_t alpha, 28 CompositingDisplayItem(uint8_t alpha,
30 SkXfermode::Mode xfermode, 29 SkXfermode::Mode xfermode,
31 SkRect* bounds, 30 SkRect* bounds,
32 sk_sp<SkColorFilter> color_filter, 31 sk_sp<SkColorFilter> color_filter,
33 bool lcd_text_requires_opaque_layer); 32 bool lcd_text_requires_opaque_layer);
34 explicit CompositingDisplayItem(const proto::DisplayItem& proto); 33 explicit CompositingDisplayItem(const proto::DisplayItem& proto);
35 ~CompositingDisplayItem() override; 34 ~CompositingDisplayItem() override;
36 35
37 void ToProtobuf(proto::DisplayItem* proto, 36 void ToProtobuf(proto::DisplayItem* proto) const override;
38 ImageSerializationProcessor* image_serialization_processor)
39 const override;
40 void Raster(SkCanvas* canvas, 37 void Raster(SkCanvas* canvas,
41 SkPicture::AbortCallback* callback) const override; 38 SkPicture::AbortCallback* callback) const override;
42 void AsValueInto(const gfx::Rect& visual_rect, 39 void AsValueInto(const gfx::Rect& visual_rect,
43 base::trace_event::TracedValue* array) const override; 40 base::trace_event::TracedValue* array) const override;
44 size_t ExternalMemoryUsage() const override; 41 size_t ExternalMemoryUsage() const override;
45 42
46 int ApproximateOpCount() const { return 1; } 43 int ApproximateOpCount() const { return 1; }
47 44
48 private: 45 private:
49 void SetNew(uint8_t alpha, 46 void SetNew(uint8_t alpha,
(...skipping 13 matching lines...) Expand all
63 class CC_EXPORT EndCompositingDisplayItem : public DisplayItem { 60 class CC_EXPORT EndCompositingDisplayItem : public DisplayItem {
64 public: 61 public:
65 EndCompositingDisplayItem(); 62 EndCompositingDisplayItem();
66 explicit EndCompositingDisplayItem(const proto::DisplayItem& proto); 63 explicit EndCompositingDisplayItem(const proto::DisplayItem& proto);
67 ~EndCompositingDisplayItem() override; 64 ~EndCompositingDisplayItem() override;
68 65
69 static std::unique_ptr<EndCompositingDisplayItem> Create() { 66 static std::unique_ptr<EndCompositingDisplayItem> Create() {
70 return base::WrapUnique(new EndCompositingDisplayItem()); 67 return base::WrapUnique(new EndCompositingDisplayItem());
71 } 68 }
72 69
73 void ToProtobuf(proto::DisplayItem* proto, 70 void ToProtobuf(proto::DisplayItem* proto) const override;
74 ImageSerializationProcessor* image_serialization_processor)
75 const override;
76 void Raster(SkCanvas* canvas, 71 void Raster(SkCanvas* canvas,
77 SkPicture::AbortCallback* callback) const override; 72 SkPicture::AbortCallback* callback) const override;
78 void AsValueInto(const gfx::Rect& visual_rect, 73 void AsValueInto(const gfx::Rect& visual_rect,
79 base::trace_event::TracedValue* array) const override; 74 base::trace_event::TracedValue* array) const override;
80 size_t ExternalMemoryUsage() const override; 75 size_t ExternalMemoryUsage() const override;
81 76
82 int ApproximateOpCount() const { return 0; } 77 int ApproximateOpCount() const { return 0; }
83 }; 78 };
84 79
85 } // namespace cc 80 } // namespace cc
86 81
87 #endif // CC_PLAYBACK_COMPOSITING_DISPLAY_ITEM_H_ 82 #endif // CC_PLAYBACK_COMPOSITING_DISPLAY_ITEM_H_
OLDNEW
« no previous file with comments | « cc/playback/clip_path_display_item.cc ('k') | cc/playback/compositing_display_item.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698