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

Unified Diff: Source/core/rendering/RenderObject.h

Issue 131233003: Refactor ResourceLoadPriorityOptimizer to avoid walking render tree (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Changes from review. Created 6 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: Source/core/rendering/RenderObject.h
diff --git a/Source/core/rendering/RenderObject.h b/Source/core/rendering/RenderObject.h
index 066ee73d80ecbaf37aa2742d1ed070f846b210ef..f8a5946b59291a90125433fed7b179902e195573 100644
--- a/Source/core/rendering/RenderObject.h
+++ b/Source/core/rendering/RenderObject.h
@@ -668,8 +668,9 @@ public:
// Subclasses must reimplement this method to compute the size and position
// of this object and all its descendants.
virtual void layout() = 0;
- virtual void didLayout(ResourceLoadPriorityOptimizer&);
- virtual void didScroll(ResourceLoadPriorityOptimizer&);
+ virtual bool updateImageLoadingPriorities() { return false; }
+ void setHasPendingResourceUpdate(bool hasPendingResourceUpdate) { m_bitfields.setHasPendingResourceUpdate(hasPendingResourceUpdate); }
+ bool hasPendingResourceUpdate() const { return m_bitfields.hasPendingResourceUpdate(); }
/* This function performs a layout only if one is needed. */
void layoutIfNeeded() { if (needsLayout()) layout(); }
@@ -1147,10 +1148,11 @@ private:
, m_selectionState(SelectionNone)
, m_flowThreadState(NotInsideFlowThread)
, m_boxDecorationState(NoBoxDecorations)
+ , m_hasPendingResourceUpdate(false)
{
}
- // 32 bits have been used in the first word, and 2 in the second.
+ // 32 bits have been used in the first word, and 3 in the second.
ADD_BOOLEAN_BITFIELD(selfNeedsLayout, SelfNeedsLayout);
ADD_BOOLEAN_BITFIELD(shouldDoFullRepaintAfterLayout, ShouldDoFullRepaintAfterLayout);
ADD_BOOLEAN_BITFIELD(shouldRepaintOverflowIfNeeded, ShouldRepaintOverflowIfNeeded);
@@ -1191,6 +1193,9 @@ private:
unsigned m_boxDecorationState : 2; // BoxDecorationState
public:
+
+ ADD_BOOLEAN_BITFIELD(hasPendingResourceUpdate, HasPendingResourceUpdate);
+
bool isOutOfFlowPositioned() const { return m_positionedState == IsOutOfFlowPositioned; }
bool isRelPositioned() const { return m_positionedState == IsRelativelyPositioned; }
bool isStickyPositioned() const { return m_positionedState == IsStickyPositioned; }

Powered by Google App Engine
This is Rietveld 408576698