| 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 DrawingDisplayItem_h | 5 #ifndef DrawingDisplayItem_h |
| 6 #define DrawingDisplayItem_h | 6 #define DrawingDisplayItem_h |
| 7 | 7 |
| 8 #include "platform/PlatformExport.h" | 8 #include "platform/PlatformExport.h" |
| 9 #include "platform/geometry/FloatPoint.h" | 9 #include "platform/geometry/FloatPoint.h" |
| 10 #include "platform/graphics/paint/DisplayItem.h" | 10 #include "platform/graphics/paint/DisplayItem.h" |
| 11 #include "third_party/skia/include/core/SkPicture.h" | 11 #include "third_party/skia/include/core/SkPicture.h" |
| 12 #include "wtf/PassOwnPtr.h" | 12 #include "wtf/PassOwnPtr.h" |
| 13 | 13 |
| 14 namespace blink { | 14 namespace blink { |
| 15 | 15 |
| 16 class PLATFORM_EXPORT DrawingDisplayItem final : public DisplayItem { | 16 class PLATFORM_EXPORT DrawingDisplayItem final : public DisplayItem { |
| 17 public: | 17 public: |
| 18 #if ENABLE(ASSERT) | 18 #if ENABLE(ASSERT) |
| 19 enum UnderInvalidationCheckingMode { | 19 enum UnderInvalidationCheckingMode { |
| 20 CheckPicture, // Check if the new picture and the old picture are the sa
me | 20 CheckPicture, // Check if the new picture and the old picture are the sa
me |
| 21 CheckBitmap, // Check if the new picture and the old picture produce the
same bitmap | 21 CheckBitmap, // Check if the new picture and the old picture produce the
same bitmap |
| 22 }; | 22 }; |
| 23 #endif | 23 #endif |
| 24 | 24 |
| 25 DrawingDisplayItem(const DisplayItemClientWrapper& client | 25 DrawingDisplayItem(const DisplayItemClient& client |
| 26 , Type type | 26 , Type type |
| 27 , PassRefPtr<const SkPicture> picture | 27 , PassRefPtr<const SkPicture> picture |
| 28 #if ENABLE(ASSERT) | 28 #if ENABLE(ASSERT) |
| 29 , UnderInvalidationCheckingMode underInvalidationCheckingMode = CheckPic
ture | 29 , UnderInvalidationCheckingMode underInvalidationCheckingMode = CheckPic
ture |
| 30 #endif | 30 #endif |
| 31 ) | 31 ) |
| 32 : DisplayItem(client, type, sizeof(*this)) | 32 : DisplayItem(client, type, sizeof(*this)) |
| 33 , m_picture(picture && picture->approximateOpCount() ? picture : nullptr
) | 33 , m_picture(picture && picture->approximateOpCount() ? picture : nullptr
) |
| 34 #if ENABLE(ASSERT) | 34 #if ENABLE(ASSERT) |
| 35 , m_underInvalidationCheckingMode(underInvalidationCheckingMode) | 35 , m_underInvalidationCheckingMode(underInvalidationCheckingMode) |
| (...skipping 21 matching lines...) Expand all Loading... |
| 57 RefPtr<const SkPicture> m_picture; | 57 RefPtr<const SkPicture> m_picture; |
| 58 | 58 |
| 59 #if ENABLE(ASSERT) | 59 #if ENABLE(ASSERT) |
| 60 UnderInvalidationCheckingMode m_underInvalidationCheckingMode; | 60 UnderInvalidationCheckingMode m_underInvalidationCheckingMode; |
| 61 #endif | 61 #endif |
| 62 }; | 62 }; |
| 63 | 63 |
| 64 } // namespace blink | 64 } // namespace blink |
| 65 | 65 |
| 66 #endif // DrawingDisplayItem_h | 66 #endif // DrawingDisplayItem_h |
| OLD | NEW |