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 DrawingDisplayItem_h |
| 6 #define DrawingDisplayItem_h |
| 7 |
| 8 #include "platform/PlatformExport.h" |
| 9 #include "platform/geometry/FloatPoint.h" |
| 10 #include "platform/graphics/paint/DisplayItem.h" |
| 11 #include "third_party/skia/include/core/SkPicture.h" |
| 12 |
| 13 namespace blink { |
| 14 |
| 15 class PLATFORM_EXPORT DrawingDisplayItem : public DisplayItem { |
| 16 public: |
| 17 DrawingDisplayItem(DisplayItemClient client, Type type, PassRefPtr<SkPicture
> picture, const FloatPoint& location) |
| 18 : DisplayItem(client, type), m_picture(picture), m_location(location) {
} |
| 19 |
| 20 PassRefPtr<SkPicture> picture() const { return m_picture; } |
| 21 const FloatPoint& location() const { return m_location; } |
| 22 |
| 23 private: |
| 24 virtual void replay(GraphicsContext*); |
| 25 |
| 26 RefPtr<SkPicture> m_picture; |
| 27 const FloatPoint m_location; |
| 28 #ifndef NDEBUG |
| 29 virtual WTF::String asDebugString() const override; |
| 30 #endif |
| 31 }; |
| 32 |
| 33 } // namespace blink |
| 34 |
| 35 #endif // DrawingDisplayItem_h |
OLD | NEW |