Chromium Code Reviews| Index: third_party/WebKit/Source/platform/graphics/paint/DrawingDisplayItem.h |
| diff --git a/third_party/WebKit/Source/platform/graphics/paint/DrawingDisplayItem.h b/third_party/WebKit/Source/platform/graphics/paint/DrawingDisplayItem.h |
| index a2a9c1ddf6e02a9fdafa50ac560e6c9b63f7c035..3af2a3d6b4567abc2be4a79f77e1e941bc9f9bfc 100644 |
| --- a/third_party/WebKit/Source/platform/graphics/paint/DrawingDisplayItem.h |
| +++ b/third_party/WebKit/Source/platform/graphics/paint/DrawingDisplayItem.h |
| @@ -6,6 +6,7 @@ |
| #define DrawingDisplayItem_h |
| #include "platform/PlatformExport.h" |
| +#include "platform/RuntimeEnabledFeatures.h" |
| #include "platform/geometry/FloatPoint.h" |
| #include "platform/graphics/paint/DisplayItem.h" |
| #include "third_party/skia/include/core/SkPicture.h" |
| @@ -25,12 +26,14 @@ public: |
| DrawingDisplayItem(const DisplayItemClient& client |
| , Type type |
| , PassRefPtr<const SkPicture> picture |
| + , bool knownToBeOpaque = false |
| #if ENABLE(ASSERT) |
| , UnderInvalidationCheckingMode underInvalidationCheckingMode = CheckPicture |
| #endif |
| ) |
| : DisplayItem(client, type, sizeof(*this)) |
| , m_picture(picture && picture->approximateOpCount() ? picture : nullptr) |
| + , m_knownToBeOpaque(knownToBeOpaque) |
| #if ENABLE(ASSERT) |
| , m_underInvalidationCheckingMode(underInvalidationCheckingMode) |
| #endif |
| @@ -44,6 +47,8 @@ public: |
| const SkPicture* picture() const { return m_picture.get(); } |
| + bool knownToBeOpaque() const { ASSERT(RuntimeEnabledFeatures::slimmingPaintV2Enabled()); return m_knownToBeOpaque; } |
| + |
| #if ENABLE(ASSERT) |
| UnderInvalidationCheckingMode underInvalidationCheckingMode() const { return m_underInvalidationCheckingMode; } |
| bool equals(const DisplayItem& other) const final; |
| @@ -56,6 +61,10 @@ private: |
| RefPtr<const SkPicture> m_picture; |
| + // True if there are no transparent areas. Only used for SlimmingPaintV2. |
|
pdr.
2016/01/27 05:07:46
Jbroman, what do you think about this?
It's very
jbroman
2016/01/27 16:04:27
Ugh, it probably costs us 4-8 bytes per due to poi
|
| + // TODO(pdr): It's messy, but we may want to move this to DisplayItem which has free bits. |
| + const bool m_knownToBeOpaque; |
| + |
| #if ENABLE(ASSERT) |
| UnderInvalidationCheckingMode m_underInvalidationCheckingMode; |
| #endif |