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_PAINT_TRANSFORM_DISPLAY_ITEM_H_ | 5 #ifndef CC_PAINT_TRANSFORM_DISPLAY_ITEM_H_ |
6 #define CC_PAINT_TRANSFORM_DISPLAY_ITEM_H_ | 6 #define CC_PAINT_TRANSFORM_DISPLAY_ITEM_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include "cc/paint/display_item.h" | 10 #include "cc/paint/display_item.h" |
11 #include "cc/paint/paint_export.h" | 11 #include "cc/paint/paint_export.h" |
12 #include "ui/gfx/transform.h" | 12 #include "ui/gfx/transform.h" |
13 | 13 |
14 namespace cc { | 14 namespace cc { |
15 | 15 |
16 class CC_PAINT_EXPORT TransformDisplayItem : public DisplayItem { | 16 class CC_PAINT_EXPORT TransformDisplayItem : public DisplayItem { |
17 public: | 17 public: |
18 explicit TransformDisplayItem(const gfx::Transform& transform); | 18 explicit TransformDisplayItem(const gfx::Transform& transform); |
19 ~TransformDisplayItem() override; | 19 ~TransformDisplayItem() override; |
20 | 20 |
21 size_t ExternalMemoryUsage() const { return 0; } | 21 size_t ExternalMemoryUsage() const { return 0; } |
22 int ApproximateOpCount() const { return 1; } | 22 int OpCount() const { return 1; } |
23 | 23 |
24 const gfx::Transform transform; | 24 const gfx::Transform transform; |
25 }; | 25 }; |
26 | 26 |
27 class CC_PAINT_EXPORT EndTransformDisplayItem : public DisplayItem { | 27 class CC_PAINT_EXPORT EndTransformDisplayItem : public DisplayItem { |
28 public: | 28 public: |
29 EndTransformDisplayItem(); | 29 EndTransformDisplayItem(); |
30 ~EndTransformDisplayItem() override; | 30 ~EndTransformDisplayItem() override; |
31 | 31 |
32 int ApproximateOpCount() const { return 0; } | 32 int OpCount() const { return 0; } |
33 }; | 33 }; |
34 | 34 |
35 } // namespace cc | 35 } // namespace cc |
36 | 36 |
37 #endif // CC_PAINT_TRANSFORM_DISPLAY_ITEM_H_ | 37 #endif // CC_PAINT_TRANSFORM_DISPLAY_ITEM_H_ |
OLD | NEW |