Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(97)

Unified Diff: third_party/WebKit/Source/platform/graphics/paint/DrawingDisplayItem.h

Issue 1632263002: Calculate and track display item opaqueness (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove comment about moving bits Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..825d58b5e0c6291dd63dc97a34a7fd3178f6797a 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,9 @@ private:
RefPtr<const SkPicture> m_picture;
+ // True if there are no transparent areas. Only used for SlimmingPaintV2.
+ const bool m_knownToBeOpaque;
+
#if ENABLE(ASSERT)
UnderInvalidationCheckingMode m_underInvalidationCheckingMode;
#endif

Powered by Google App Engine
This is Rietveld 408576698