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 #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 "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "cc/base/cc_export.h" | 9 #include "cc/base/cc_export.h" |
10 #include "cc/playback/display_item.h" | 10 #include "cc/playback/display_item.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 class CC_EXPORT CompositingDisplayItem : public DisplayItem { | 21 class CC_EXPORT CompositingDisplayItem : public DisplayItem { |
22 public: | 22 public: |
23 CompositingDisplayItem(); | 23 CompositingDisplayItem(); |
24 ~CompositingDisplayItem() override; | 24 ~CompositingDisplayItem() override; |
25 | 25 |
26 void SetNew(uint8_t alpha, | 26 void SetNew(uint8_t alpha, |
27 SkXfermode::Mode xfermode, | 27 SkXfermode::Mode xfermode, |
28 SkRect* bounds, | 28 SkRect* bounds, |
29 skia::RefPtr<SkColorFilter> color_filter); | 29 skia::RefPtr<SkColorFilter> color_filter); |
30 | 30 |
| 31 void ToProtobuf(proto::DisplayItem* proto) override; |
| 32 void FromProtobuf(const proto::DisplayItem& proto) override; |
31 void Raster(SkCanvas* canvas, | 33 void Raster(SkCanvas* canvas, |
32 const gfx::Rect& canvas_target_playback_rect, | 34 const gfx::Rect& canvas_target_playback_rect, |
33 SkPicture::AbortCallback* callback) const override; | 35 SkPicture::AbortCallback* callback) const override; |
34 void AsValueInto(base::trace_event::TracedValue* array) const override; | 36 void AsValueInto(base::trace_event::TracedValue* array) const override; |
35 void ProcessForBounds( | 37 void ProcessForBounds( |
36 DisplayItemListBoundsCalculator* calculator) const override; | 38 DisplayItemListBoundsCalculator* calculator) const override; |
37 | 39 |
38 private: | 40 private: |
39 uint8_t alpha_; | 41 uint8_t alpha_; |
40 SkXfermode::Mode xfermode_; | 42 SkXfermode::Mode xfermode_; |
41 bool has_bounds_; | 43 bool has_bounds_; |
42 SkRect bounds_; | 44 SkRect bounds_; |
43 skia::RefPtr<SkColorFilter> color_filter_; | 45 skia::RefPtr<SkColorFilter> color_filter_; |
44 }; | 46 }; |
45 | 47 |
46 class CC_EXPORT EndCompositingDisplayItem : public DisplayItem { | 48 class CC_EXPORT EndCompositingDisplayItem : public DisplayItem { |
47 public: | 49 public: |
48 EndCompositingDisplayItem(); | 50 EndCompositingDisplayItem(); |
49 ~EndCompositingDisplayItem() override; | 51 ~EndCompositingDisplayItem() override; |
50 | 52 |
51 static scoped_ptr<EndCompositingDisplayItem> Create() { | 53 static scoped_ptr<EndCompositingDisplayItem> Create() { |
52 return make_scoped_ptr(new EndCompositingDisplayItem()); | 54 return make_scoped_ptr(new EndCompositingDisplayItem()); |
53 } | 55 } |
54 | 56 |
| 57 void ToProtobuf(proto::DisplayItem* proto) override; |
| 58 void FromProtobuf(const proto::DisplayItem& proto) override; |
55 void Raster(SkCanvas* canvas, | 59 void Raster(SkCanvas* canvas, |
56 const gfx::Rect& canvas_target_playback_rect, | 60 const gfx::Rect& canvas_target_playback_rect, |
57 SkPicture::AbortCallback* callback) const override; | 61 SkPicture::AbortCallback* callback) const override; |
58 void AsValueInto(base::trace_event::TracedValue* array) const override; | 62 void AsValueInto(base::trace_event::TracedValue* array) const override; |
59 void ProcessForBounds( | 63 void ProcessForBounds( |
60 DisplayItemListBoundsCalculator* calculator) const override; | 64 DisplayItemListBoundsCalculator* calculator) const override; |
61 }; | 65 }; |
62 | 66 |
63 } // namespace cc | 67 } // namespace cc |
64 | 68 |
65 #endif // CC_PLAYBACK_COMPOSITING_DISPLAY_ITEM_H_ | 69 #endif // CC_PLAYBACK_COMPOSITING_DISPLAY_ITEM_H_ |
OLD | NEW |