OLD | NEW |
| (Empty) |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CC_PLAYBACK_FILTER_DISPLAY_ITEM_H_ | |
6 #define CC_PLAYBACK_FILTER_DISPLAY_ITEM_H_ | |
7 | |
8 #include "cc/base/cc_export.h" | |
9 #include "cc/output/filter_operations.h" | |
10 #include "cc/playback/display_item.h" | |
11 #include "ui/gfx/geometry/point_f.h" | |
12 #include "ui/gfx/geometry/rect_f.h" | |
13 | |
14 namespace cc { | |
15 | |
16 class CC_EXPORT FilterDisplayItem : public DisplayItem { | |
17 public: | |
18 FilterDisplayItem(const FilterOperations& filters, | |
19 const gfx::RectF& bounds, | |
20 const gfx::PointF& origin); | |
21 ~FilterDisplayItem() override; | |
22 | |
23 size_t ExternalMemoryUsage() const { | |
24 // FilterOperations doesn't expose its capacity, but size is probably good | |
25 // enough. | |
26 return filters.size() * sizeof(filters.at(0)); | |
27 } | |
28 int ApproximateOpCount() const { return 1; } | |
29 | |
30 const FilterOperations filters; | |
31 const gfx::RectF bounds; | |
32 const gfx::PointF origin; | |
33 }; | |
34 | |
35 class CC_EXPORT EndFilterDisplayItem : public DisplayItem { | |
36 public: | |
37 EndFilterDisplayItem(); | |
38 ~EndFilterDisplayItem() override; | |
39 | |
40 int ApproximateOpCount() const { return 0; } | |
41 }; | |
42 | |
43 } // namespace cc | |
44 | |
45 #endif // CC_PLAYBACK_FILTER_DISPLAY_ITEM_H_ | |
OLD | NEW |