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

Unified Diff: third_party/WebKit/Source/core/dom/IntersectionObserver.h

Issue 2272773002: Use intersection observer to control frame throttling (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adjust OOPIF expectations Created 4 years, 4 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/dom/IntersectionObserver.h
diff --git a/third_party/WebKit/Source/core/dom/IntersectionObserver.h b/third_party/WebKit/Source/core/dom/IntersectionObserver.h
index cfccf152a5c5754ad6d7b8d4f77656aff5159db4..b1e5142abb632ea7347d883bcffa13d6f31523e0 100644
--- a/third_party/WebKit/Source/core/dom/IntersectionObserver.h
+++ b/third_party/WebKit/Source/core/dom/IntersectionObserver.h
@@ -59,6 +59,11 @@ public:
bool hasEntries() const { return m_entries.size(); }
const HeapLinkedHashSet<WeakMember<IntersectionObservation>>& observations() const { return m_observations; }
+ // A low latency intersection observer delivers events with an immediately
+ // posted task instead of waiting for an idle period (or up to 100ms).
+ void setLowLatency(bool lowLatency) { m_lowLatency = lowLatency; }
+ bool lowLatency() const { return m_lowLatency; }
+
DECLARE_TRACE();
private:
@@ -74,6 +79,7 @@ private:
Length m_rightMargin;
Length m_bottomMargin;
Length m_leftMargin;
+ bool m_lowLatency;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698