| 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) const 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 | 37 |
| 36 private: | 38 private: |
| 37 uint8_t alpha_; | 39 uint8_t alpha_; |
| 38 SkXfermode::Mode xfermode_; | 40 SkXfermode::Mode xfermode_; |
| 39 bool has_bounds_; | 41 bool has_bounds_; |
| 40 SkRect bounds_; | 42 SkRect bounds_; |
| 41 skia::RefPtr<SkColorFilter> color_filter_; | 43 skia::RefPtr<SkColorFilter> color_filter_; |
| 42 }; | 44 }; |
| 43 | 45 |
| 44 class CC_EXPORT EndCompositingDisplayItem : public DisplayItem { | 46 class CC_EXPORT EndCompositingDisplayItem : public DisplayItem { |
| 45 public: | 47 public: |
| 46 EndCompositingDisplayItem(); | 48 EndCompositingDisplayItem(); |
| 47 ~EndCompositingDisplayItem() override; | 49 ~EndCompositingDisplayItem() override; |
| 48 | 50 |
| 49 static scoped_ptr<EndCompositingDisplayItem> Create() { | 51 static scoped_ptr<EndCompositingDisplayItem> Create() { |
| 50 return make_scoped_ptr(new EndCompositingDisplayItem()); | 52 return make_scoped_ptr(new EndCompositingDisplayItem()); |
| 51 } | 53 } |
| 52 | 54 |
| 55 void ToProtobuf(proto::DisplayItem* proto) const override; |
| 56 void FromProtobuf(const proto::DisplayItem& proto) override; |
| 53 void Raster(SkCanvas* canvas, | 57 void Raster(SkCanvas* canvas, |
| 54 const gfx::Rect& canvas_target_playback_rect, | 58 const gfx::Rect& canvas_target_playback_rect, |
| 55 SkPicture::AbortCallback* callback) const override; | 59 SkPicture::AbortCallback* callback) const override; |
| 56 void AsValueInto(base::trace_event::TracedValue* array) const override; | 60 void AsValueInto(base::trace_event::TracedValue* array) const override; |
| 57 }; | 61 }; |
| 58 | 62 |
| 59 } // namespace cc | 63 } // namespace cc |
| 60 | 64 |
| 61 #endif // CC_PLAYBACK_COMPOSITING_DISPLAY_ITEM_H_ | 65 #endif // CC_PLAYBACK_COMPOSITING_DISPLAY_ITEM_H_ |
| OLD | NEW |