| 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_FLOAT_CLIP_DISPLAY_ITEM_H_ | 5 #ifndef CC_PAINT_FLOAT_CLIP_DISPLAY_ITEM_H_ |
| 6 #define CC_PLAYBACK_FLOAT_CLIP_DISPLAY_ITEM_H_ | 6 #define CC_PAINT_FLOAT_CLIP_DISPLAY_ITEM_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| 11 #include <vector> | 11 #include <vector> |
| 12 | 12 |
| 13 #include "base/memory/ptr_util.h" | 13 #include "base/memory/ptr_util.h" |
| 14 #include "cc/base/cc_export.h" | 14 #include "cc/paint/display_item.h" |
| 15 #include "cc/playback/display_item.h" | 15 #include "cc/paint/paint_export.h" |
| 16 #include "ui/gfx/geometry/rect_f.h" | 16 #include "ui/gfx/geometry/rect_f.h" |
| 17 | 17 |
| 18 class SkCanvas; | 18 class SkCanvas; |
| 19 | 19 |
| 20 namespace cc { | 20 namespace cc { |
| 21 | 21 |
| 22 class CC_EXPORT FloatClipDisplayItem : public DisplayItem { | 22 class CC_PAINT_EXPORT FloatClipDisplayItem : public DisplayItem { |
| 23 public: | 23 public: |
| 24 explicit FloatClipDisplayItem(const gfx::RectF& clip_rect); | 24 explicit FloatClipDisplayItem(const gfx::RectF& clip_rect); |
| 25 ~FloatClipDisplayItem() override; | 25 ~FloatClipDisplayItem() override; |
| 26 | 26 |
| 27 void Raster(SkCanvas* canvas, | 27 void Raster(SkCanvas* canvas, |
| 28 SkPicture::AbortCallback* callback) const override; | 28 SkPicture::AbortCallback* callback) const override; |
| 29 | 29 |
| 30 size_t ExternalMemoryUsage() const { return 0; } | 30 size_t ExternalMemoryUsage() const { return 0; } |
| 31 int ApproximateOpCount() const { return 1; } | 31 int ApproximateOpCount() const { return 1; } |
| 32 | 32 |
| 33 const gfx::RectF& clip_rect() const { return clip_rect_; } | 33 const gfx::RectF& clip_rect() const { return clip_rect_; } |
| 34 | 34 |
| 35 private: | 35 private: |
| 36 void SetNew(const gfx::RectF& clip_rect); | 36 void SetNew(const gfx::RectF& clip_rect); |
| 37 | 37 |
| 38 gfx::RectF clip_rect_; | 38 gfx::RectF clip_rect_; |
| 39 }; | 39 }; |
| 40 | 40 |
| 41 class CC_EXPORT EndFloatClipDisplayItem : public DisplayItem { | 41 class CC_PAINT_EXPORT EndFloatClipDisplayItem : public DisplayItem { |
| 42 public: | 42 public: |
| 43 EndFloatClipDisplayItem(); | 43 EndFloatClipDisplayItem(); |
| 44 ~EndFloatClipDisplayItem() override; | 44 ~EndFloatClipDisplayItem() override; |
| 45 | 45 |
| 46 static std::unique_ptr<EndFloatClipDisplayItem> Create() { | 46 static std::unique_ptr<EndFloatClipDisplayItem> Create() { |
| 47 return base::MakeUnique<EndFloatClipDisplayItem>(); | 47 return base::MakeUnique<EndFloatClipDisplayItem>(); |
| 48 } | 48 } |
| 49 | 49 |
| 50 void Raster(SkCanvas* canvas, | 50 void Raster(SkCanvas* canvas, |
| 51 SkPicture::AbortCallback* callback) const override; | 51 SkPicture::AbortCallback* callback) const override; |
| 52 | 52 |
| 53 int ApproximateOpCount() const { return 0; } | 53 int ApproximateOpCount() const { return 0; } |
| 54 }; | 54 }; |
| 55 | 55 |
| 56 } // namespace cc | 56 } // namespace cc |
| 57 | 57 |
| 58 #endif // CC_PLAYBACK_FLOAT_CLIP_DISPLAY_ITEM_H_ | 58 #endif // CC_PAINT_FLOAT_CLIP_DISPLAY_ITEM_H_ |
| OLD | NEW |