| 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 : public DisplayItem { | 16 class PLATFORM_EXPORT DrawingDisplayItem : 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 DontCheck // Skip for known bugs. Each usage should have a FIXME and a l
ink to the bug. | |
| 23 }; | 22 }; |
| 24 #endif | 23 #endif |
| 25 | 24 |
| 26 DrawingDisplayItem(const DisplayItemClientWrapper& client, Type type, PassRe
fPtr<const SkPicture> picture) | 25 DrawingDisplayItem(const DisplayItemClientWrapper& client, Type type, PassRe
fPtr<const SkPicture> picture) |
| 27 : DisplayItem(client, type) | 26 : DisplayItem(client, type) |
| 28 , m_picture(picture && picture->approximateOpCount() ? picture : nullptr
) | 27 , m_picture(picture && picture->approximateOpCount() ? picture : nullptr
) |
| 29 #if ENABLE(ASSERT) | 28 #if ENABLE(ASSERT) |
| 30 , m_underInvalidationCheckingMode(CheckPicture) | 29 , m_underInvalidationCheckingMode(CheckPicture) |
| 31 #endif | 30 #endif |
| 32 { | 31 { |
| (...skipping 24 matching lines...) Expand all Loading... |
| 57 RefPtr<const SkPicture> m_picture; | 56 RefPtr<const SkPicture> m_picture; |
| 58 | 57 |
| 59 #if ENABLE(ASSERT) | 58 #if ENABLE(ASSERT) |
| 60 UnderInvalidationCheckingMode m_underInvalidationCheckingMode; | 59 UnderInvalidationCheckingMode m_underInvalidationCheckingMode; |
| 61 #endif | 60 #endif |
| 62 }; | 61 }; |
| 63 | 62 |
| 64 } // namespace blink | 63 } // namespace blink |
| 65 | 64 |
| 66 #endif // DrawingDisplayItem_h | 65 #endif // DrawingDisplayItem_h |
| OLD | NEW |