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

Unified Diff: third_party/WebKit/Source/core/paint/FindPropertiesNeedingUpdate.h

Issue 2539693002: Early-out from the prepaint tree walk (Closed)
Patch Set: Switch away from typed enums which Windows clang does not like Created 4 years 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/FindPropertiesNeedingUpdate.h
diff --git a/third_party/WebKit/Source/core/paint/FindPropertiesNeedingUpdate.h b/third_party/WebKit/Source/core/paint/FindPropertiesNeedingUpdate.h
index fb3358b3aa74a4532ceb25d031c6e892b3e722f8..827c92de388f628589ca27bbc20ea09bd7b150ab 100644
--- a/third_party/WebKit/Source/core/paint/FindPropertiesNeedingUpdate.h
+++ b/third_party/WebKit/Source/core/paint/FindPropertiesNeedingUpdate.h
@@ -22,9 +22,13 @@ namespace blink {
class FindFrameViewPropertiesNeedingUpdateScope {
public:
- FindFrameViewPropertiesNeedingUpdateScope(FrameView* frameView)
+ FindFrameViewPropertiesNeedingUpdateScope(
+ FrameView* frameView,
+ PaintPropertyTreeBuilderContext& context)
: m_frameView(frameView),
- m_neededPaintPropertyUpdate(frameView->needsPaintPropertyUpdate()) {
+ m_neededPaintPropertyUpdate(frameView->needsPaintPropertyUpdate()),
+ m_context(context),
+ m_hadForceSubtreeUpdate(context.forceSubtreeUpdate) {
chrishtr 2016/12/01 02:36:35 Can you also use this field to check that forceSub
pdr. 2016/12/01 09:35:35 This class catches underinvalidation by checking t
// No need to check when already marked as needing an update.
if (m_neededPaintPropertyUpdate)
return;
@@ -52,13 +56,16 @@ class FindFrameViewPropertiesNeedingUpdateScope {
DCHECK_PTR_VAL_EQ(m_contentClip, m_frameView->contentClip());
DCHECK_PTR_VAL_EQ(m_scrollTranslation, m_frameView->scrollTranslation());
DCHECK_PTR_VAL_EQ(m_scroll, m_frameView->scroll());
- // Restore original clean bit.
+ // Restore original clean bits.
m_frameView->clearNeedsPaintPropertyUpdate();
+ m_context.forceSubtreeUpdate = m_hadForceSubtreeUpdate;
}
private:
Persistent<FrameView> m_frameView;
bool m_neededPaintPropertyUpdate;
+ PaintPropertyTreeBuilderContext& m_context;
+ bool m_hadForceSubtreeUpdate;
RefPtr<TransformPaintPropertyNode> m_preTranslation;
RefPtr<ClipPaintPropertyNode> m_contentClip;
RefPtr<TransformPaintPropertyNode> m_scrollTranslation;
@@ -67,9 +74,13 @@ class FindFrameViewPropertiesNeedingUpdateScope {
class FindObjectPropertiesNeedingUpdateScope {
public:
- FindObjectPropertiesNeedingUpdateScope(const LayoutObject& object)
+ FindObjectPropertiesNeedingUpdateScope(
+ const LayoutObject& object,
+ PaintPropertyTreeBuilderContext& context)
: m_object(object),
- m_neededPaintPropertyUpdate(object.needsPaintPropertyUpdate()) {
+ m_neededPaintPropertyUpdate(object.needsPaintPropertyUpdate()),
+ m_context(context),
+ m_hadForceSubtreeUpdate(context.forceSubtreeUpdate) {
// No need to check when already marked as needing an update.
if (m_neededPaintPropertyUpdate)
return;
@@ -128,13 +139,16 @@ class FindObjectPropertiesNeedingUpdateScope {
} else {
DCHECK_EQ(!!m_properties, !!objectProperties);
}
- // Restore original clean bit.
+ // Restore original clean bits.
const_cast<LayoutObject&>(m_object).clearNeedsPaintPropertyUpdate();
+ m_context.forceSubtreeUpdate = m_hadForceSubtreeUpdate;
}
private:
const LayoutObject& m_object;
bool m_neededPaintPropertyUpdate;
+ PaintPropertyTreeBuilderContext& m_context;
+ bool m_hadForceSubtreeUpdate;
std::unique_ptr<const ObjectPaintProperties> m_properties;
};

Powered by Google App Engine
This is Rietveld 408576698