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

Unified Diff: ui/compositor/compositor.cc

Issue 1841083007: Remove SendBeginFramesToChildren plumbing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@scheduler_output_surface_client_set_beginframesource
Patch Set: Rebase Created 4 years, 8 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
« no previous file with comments | « ui/compositor/compositor.h ('k') | ui/compositor/compositor_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/compositor/compositor.cc
diff --git a/ui/compositor/compositor.cc b/ui/compositor/compositor.cc
index 7bb1f0957bd1a6948ecf3de60c9c07e6d4f7f9e6..fda1f495c0490000fb8340c8755e8dc9db883776 100644
--- a/ui/compositor/compositor.cc
+++ b/ui/compositor/compositor.cc
@@ -397,24 +397,6 @@ bool Compositor::HasAnimationObserver(
return animation_observer_list_.HasObserver(observer);
}
-void Compositor::AddBeginFrameObserver(CompositorBeginFrameObserver* observer) {
- if (!begin_frame_observer_list_.might_have_observers())
- host_->SetChildrenNeedBeginFrames(true);
-
- begin_frame_observer_list_.AddObserver(observer);
-
- if (missed_begin_frame_args_.IsValid())
- observer->OnSendBeginFrame(missed_begin_frame_args_);
-}
-
-void Compositor::RemoveBeginFrameObserver(
- CompositorBeginFrameObserver* observer) {
- begin_frame_observer_list_.RemoveObserver(observer);
-
- // As this call may take place while iterating over observers, unsubscription
- // from |host_| is performed after iteration in |SendBeginFramesToChildren()|.
-}
-
void Compositor::BeginMainFrame(const cc::BeginFrameArgs& args) {
FOR_EACH_OBSERVER(CompositorAnimationObserver,
animation_observer_list_,
@@ -486,24 +468,6 @@ void Compositor::SetOutputIsSecure(bool output_is_secure) {
host_->SetNeedsRedraw();
}
-void Compositor::SendBeginFramesToChildren(const cc::BeginFrameArgs& args) {
- FOR_EACH_OBSERVER(CompositorBeginFrameObserver, begin_frame_observer_list_,
- OnSendBeginFrame(args));
-
- // Unsubscription is performed here, after iteration, to handle the case where
- // the last BeginFrame observer is removed while iterating over the observers.
- if (!begin_frame_observer_list_.might_have_observers()) {
- host_->SetChildrenNeedBeginFrames(false);
- // Unsubscription should reset |missed_begin_frame_args_|, avoiding stale
- // BeginFrame dispatch when the next BeginFrame observer is added.
- missed_begin_frame_args_ = cc::BeginFrameArgs();
- return;
- }
-
- missed_begin_frame_args_ = args;
- missed_begin_frame_args_.type = cc::BeginFrameArgs::MISSED;
-}
-
const cc::LayerTreeDebugState& Compositor::GetLayerTreeDebugState() const {
return host_->debug_state();
}
« no previous file with comments | « ui/compositor/compositor.h ('k') | ui/compositor/compositor_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698