OLD | NEW |
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 #ifndef CC_PLAYBACK_DISPLAY_ITEM_H_ | 5 #ifndef CC_PLAYBACK_DISPLAY_ITEM_H_ |
6 #define CC_PLAYBACK_DISPLAY_ITEM_H_ | 6 #define CC_PLAYBACK_DISPLAY_ITEM_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 20 matching lines...) Expand all Loading... |
31 FILTER, | 31 FILTER, |
32 END_FILTER, | 32 END_FILTER, |
33 FLOAT_CLIP, | 33 FLOAT_CLIP, |
34 END_FLOAT_CLIP, | 34 END_FLOAT_CLIP, |
35 TRANSFORM, | 35 TRANSFORM, |
36 END_TRANSFORM, | 36 END_TRANSFORM, |
37 }; | 37 }; |
38 | 38 |
39 virtual ~DisplayItem() {} | 39 virtual ~DisplayItem() {} |
40 | 40 |
41 virtual sk_sp<const SkPicture> GetPicture() const; | |
42 virtual void Raster(SkCanvas* canvas, | 41 virtual void Raster(SkCanvas* canvas, |
43 SkPicture::AbortCallback* callback) const = 0; | 42 SkPicture::AbortCallback* callback) const = 0; |
44 virtual void AsValueInto(const gfx::Rect& visual_rect, | 43 virtual void AsValueInto(const gfx::Rect& visual_rect, |
45 base::trace_event::TracedValue* array) const = 0; | 44 base::trace_event::TracedValue* array) const = 0; |
46 | 45 |
47 Type type() const { return type_; } | 46 Type type() const { return type_; } |
48 | 47 |
49 protected: | 48 protected: |
50 explicit DisplayItem(Type type) : type_(type) {} | 49 explicit DisplayItem(Type type) : type_(type) {} |
51 | 50 |
52 const Type type_; | 51 const Type type_; |
53 }; | 52 }; |
54 | 53 |
55 } // namespace cc | 54 } // namespace cc |
56 | 55 |
57 #endif // CC_PLAYBACK_DISPLAY_ITEM_H_ | 56 #endif // CC_PLAYBACK_DISPLAY_ITEM_H_ |
OLD | NEW |