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

Unified Diff: third_party/WebKit/Source/core/paint/PaintLayer.cpp

Issue 1397583002: Implement the framework for a paint property hierarchy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Job insecurity: better tests, better comments, better names. Created 5 years, 2 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/core/paint/PaintLayer.cpp
diff --git a/third_party/WebKit/Source/core/paint/PaintLayer.cpp b/third_party/WebKit/Source/core/paint/PaintLayer.cpp
index 7bdb735193ca2461f26b4bd57ee7f2a799a1acd1..14d04fe6efb5744bb7b845a89423315496c6aa7a 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayer.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintLayer.cpp
@@ -72,6 +72,7 @@
#include "core/page/Page.h"
#include "core/page/scrolling/ScrollingCoordinator.h"
#include "core/paint/FilterEffectBuilder.h"
+#include "core/paint/ObjectPaintProperties.h"
#include "platform/LengthFunctions.h"
#include "platform/RuntimeEnabledFeatures.h"
#include "platform/TraceEvent.h"
@@ -2714,6 +2715,22 @@ void PaintLayer::markAncestorChainForNeedsRepaint()
}
}
+ObjectPaintProperties& PaintLayer::mutablePaintProperties()
+{
+ ASSERT(RuntimeEnabledFeatures::slimmingPaintV2Enabled());
+ ASSERT(layoutObject()->document().lifecycle().state() == DocumentLifecycle::InUpdatePaintProperties);
+ if (!m_paintProperties)
+ m_paintProperties = ObjectPaintProperties::create();
+ return *m_paintProperties;
+}
+
+const ObjectPaintProperties* PaintLayer::paintProperties() const
+{
+ ASSERT(RuntimeEnabledFeatures::slimmingPaintV2Enabled());
+ ASSERT(layoutObject()->document().lifecycle().state() == DocumentLifecycle::InPaint);
+ return m_paintProperties.get();
+}
+
DisableCompositingQueryAsserts::DisableCompositingQueryAsserts()
: m_disabler(gCompositingQueryMode, CompositingQueriesAreAllowed) { }
« no previous file with comments | « third_party/WebKit/Source/core/paint/PaintLayer.h ('k') | third_party/WebKit/Source/platform/blink_platform.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698