summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorenne <enne@chromium.org>2016-03-08 16:47:36 -0800
committerCommit bot <commit-bot@chromium.org>2016-03-09 00:48:27 +0000
commit1e43e0d8e6dc2ec7c73a2587d21c079663e89159 (patch)
tree658c89d0d957855aa9a42c75cb648d5b13f80dc4
parented3fb75a61e88d854315d39566f20db3f4b3a1b1 (diff)
downloadchromium_src-1e43e0d8e6dc2ec7c73a2587d21c079663e89159.zip
chromium_src-1e43e0d8e6dc2ec7c73a2587d21c079663e89159.tar.gz
chromium_src-1e43e0d8e6dc2ec7c73a2587d21c079663e89159.tar.bz2
Remove runtime toggling of throttling frames
This was added in https://codereview.chromium.org/811523002, but was never actually hooked up to anything. So, time to remove it. Sorry year old feature that never got finished, your time can come again. This is just scheduler cleanup to make it possible to do further begin frame source refactoring. The followups to this patch are to make scheduler not own any begin frame source (always external, from its perspective) and then make it possible to remove/change the begin frame source the scheduler is using. Review URL: https://codereview.chromium.org/1762823002 Cr-Commit-Position: refs/heads/master@{#380000}
-rw-r--r--cc/scheduler/scheduler.cc23
-rw-r--r--cc/scheduler/scheduler.h2
-rw-r--r--cc/scheduler/scheduler_unittest.cc114
-rw-r--r--cc/test/fake_proxy.h1
-rw-r--r--cc/test/proxy_impl_for_test.cc5
-rw-r--r--cc/test/proxy_impl_for_test.h1
-rw-r--r--cc/test/scheduler_test_common.h4
-rw-r--r--cc/test/test_hooks.h1
-rw-r--r--cc/trees/channel_main.h1
-rw-r--r--cc/trees/layer_tree_host.cc4
-rw-r--r--cc/trees/layer_tree_host.h2
-rw-r--r--cc/trees/proxy.h2
-rw-r--r--cc/trees/proxy_impl.cc7
-rw-r--r--cc/trees/proxy_impl.h1
-rw-r--r--cc/trees/proxy_main.cc6
-rw-r--r--cc/trees/proxy_main.h1
-rw-r--r--cc/trees/remote_channel_impl.cc4
-rw-r--r--cc/trees/remote_channel_impl.h1
-rw-r--r--cc/trees/remote_channel_main.cc2
-rw-r--r--cc/trees/remote_channel_main.h1
-rw-r--r--cc/trees/single_thread_proxy.cc8
-rw-r--r--cc/trees/single_thread_proxy.h1
-rw-r--r--cc/trees/threaded_channel.cc7
-rw-r--r--cc/trees/threaded_channel.h1
-rw-r--r--cc/trees/threaded_channel_unittest.cc16
25 files changed, 12 insertions, 204 deletions
diff --git a/cc/scheduler/scheduler.cc b/cc/scheduler/scheduler.cc
index 0af7fa6..a84c1ba 100644
--- a/cc/scheduler/scheduler.cc
+++ b/cc/scheduler/scheduler.cc
@@ -64,7 +64,6 @@ Scheduler::Scheduler(
unthrottled_frame_source_(std::move(unthrottled_frame_source)),
frame_source_(BeginFrameSourceMultiplexer::Create()),
observing_frame_source_(false),
- throttle_frame_production_(false),
compositor_timing_history_(std::move(compositor_timing_history)),
begin_impl_frame_deadline_mode_(
SchedulerStateMachine::BEGIN_IMPL_FRAME_DEADLINE_MODE_NONE),
@@ -91,7 +90,12 @@ Scheduler::Scheduler(
frame_source_->AddSource(unthrottled_frame_source_.get());
unthrottled_frame_source_->SetClientReady();
- SetThrottleFrameProduction(settings_.throttle_frame_production);
+ if (settings_.throttle_frame_production) {
+ frame_source_->SetActiveSource(primary_frame_source());
+ } else {
+ frame_source_->SetActiveSource(unthrottled_frame_source_.get());
+ }
+ ProcessScheduledActions();
}
Scheduler::~Scheduler() {
@@ -152,16 +156,6 @@ void Scheduler::NotifyReadyToDraw() {
ProcessScheduledActions();
}
-void Scheduler::SetThrottleFrameProduction(bool throttle) {
- throttle_frame_production_ = throttle;
- if (throttle) {
- frame_source_->SetActiveSource(primary_frame_source());
- } else {
- frame_source_->SetActiveSource(unthrottled_frame_source_.get());
- }
- ProcessScheduledActions();
-}
-
void Scheduler::SetNeedsBeginMainFrame() {
state_machine_.SetNeedsBeginMainFrame();
ProcessScheduledActions();
@@ -808,7 +802,8 @@ void Scheduler::AsValueInto(base::trace_event::TracedValue* state) const {
state->BeginDictionary("scheduler_state");
state->SetBoolean("external_frame_source_", !!external_frame_source_);
- state->SetBoolean("throttle_frame_production_", throttle_frame_production_);
+ state->SetBoolean("throttle_frame_production_",
+ settings_.throttle_frame_production);
state->SetDouble("authoritative_vsync_interval_ms",
authoritative_vsync_interval_.InMillisecondsF());
state->SetDouble(
@@ -870,7 +865,7 @@ bool Scheduler::ShouldRecoverImplLatency(
// Disable impl thread latency recovery when using the unthrottled
// begin frame source since we will always get a BeginFrame before
// the swap ack and our heuristics below will not work.
- if (!throttle_frame_production_)
+ if (!settings_.throttle_frame_production)
return false;
// If we are swap throttled at the BeginFrame, that means the impl thread is
diff --git a/cc/scheduler/scheduler.h b/cc/scheduler/scheduler.h
index 3a98a24..a5a6bd4 100644
--- a/cc/scheduler/scheduler.h
+++ b/cc/scheduler/scheduler.h
@@ -82,7 +82,6 @@ class CC_EXPORT Scheduler : public BeginFrameObserverBase {
void SetCanDraw(bool can_draw);
void NotifyReadyToActivate();
void NotifyReadyToDraw();
- void SetThrottleFrameProduction(bool throttle);
void SetNeedsBeginMainFrame();
// Requests a single impl frame (after the current frame if there is one
@@ -168,7 +167,6 @@ class CC_EXPORT Scheduler : public BeginFrameObserverBase {
scoped_ptr<BeginFrameSourceMultiplexer> frame_source_;
bool observing_frame_source_;
- bool throttle_frame_production_;
base::TimeDelta authoritative_vsync_interval_;
base::TimeTicks last_vsync_timebase_;
diff --git a/cc/scheduler/scheduler_unittest.cc b/cc/scheduler/scheduler_unittest.cc
index ec1a20a..4ae7749 100644
--- a/cc/scheduler/scheduler_unittest.cc
+++ b/cc/scheduler/scheduler_unittest.cc
@@ -3042,120 +3042,6 @@ TEST_F(SchedulerTest, ScheduledActionActivateAfterBeginFrameSourcePaused) {
EXPECT_SINGLE_ACTION("ScheduledActionActivateSyncTree", client_);
}
-// Tests to ensure frame sources can be successfully changed while drawing.
-TEST_F(SchedulerTest, SwitchFrameSourceToUnthrottled) {
- scheduler_settings_.use_external_begin_frame_source = true;
- SetUpScheduler(true);
-
- // SetNeedsRedraw should begin the frame on the next BeginImplFrame.
- scheduler_->SetNeedsRedraw();
- EXPECT_SINGLE_ACTION("AddObserver(this)", client_);
- client_->Reset();
-
- EXPECT_SCOPED(AdvanceFrame());
- EXPECT_ACTION("WillBeginImplFrame", client_, 0, 1);
- EXPECT_TRUE(scheduler_->BeginImplFrameDeadlinePending());
- EXPECT_TRUE(scheduler_->begin_frames_expected());
- client_->Reset();
- task_runner().RunPendingTasks(); // Run posted deadline.
- EXPECT_ACTION("ScheduledActionDrawAndSwapIfPossible", client_, 0, 1);
- scheduler_->SetNeedsRedraw();
-
- // Switch to an unthrottled frame source.
- scheduler_->SetThrottleFrameProduction(false);
- client_->Reset();
-
- // Unthrottled frame source will immediately begin a new frame.
- task_runner().RunPendingTasks(); // Run posted BeginFrame.
- EXPECT_ACTION("WillBeginImplFrame", client_, 0, 1);
- EXPECT_TRUE(scheduler_->BeginImplFrameDeadlinePending());
- client_->Reset();
-
- // If we don't swap on the deadline, we wait for the next BeginFrame.
- task_runner().RunPendingTasks(); // Run posted deadline.
- EXPECT_ACTION("ScheduledActionDrawAndSwapIfPossible", client_, 0, 1);
- EXPECT_FALSE(scheduler_->BeginImplFrameDeadlinePending());
- client_->Reset();
-}
-
-// Tests to ensure frame sources can be successfully changed while a frame
-// deadline is pending.
-TEST_F(SchedulerTest, SwitchFrameSourceToUnthrottledBeforeDeadline) {
- scheduler_settings_.use_external_begin_frame_source = true;
- SetUpScheduler(true);
-
- // SetNeedsRedraw should begin the frame on the next BeginImplFrame.
- scheduler_->SetNeedsRedraw();
- EXPECT_SINGLE_ACTION("AddObserver(this)", client_);
- client_->Reset();
-
- EXPECT_SCOPED(AdvanceFrame());
- EXPECT_SINGLE_ACTION("WillBeginImplFrame", client_);
-
- // Switch to an unthrottled frame source before the frame deadline is hit.
- scheduler_->SetThrottleFrameProduction(false);
- client_->Reset();
-
- EXPECT_TRUE(scheduler_->BeginImplFrameDeadlinePending());
- EXPECT_TRUE(scheduler_->begin_frames_expected());
- client_->Reset();
-
- task_runner().RunPendingTasks(); // Run posted deadline.
- EXPECT_SINGLE_ACTION("ScheduledActionDrawAndSwapIfPossible", client_);
- client_->Reset();
-
- // Unthrottled frame source will immediately begin a new frame.
- task_runner().RunPendingTasks(); // Run BeginFrame.
- EXPECT_SINGLE_ACTION("WillBeginImplFrame", client_);
- scheduler_->SetNeedsRedraw();
- client_->Reset();
-
- task_runner().RunPendingTasks(); // Run posted deadline.
- EXPECT_SINGLE_ACTION("ScheduledActionDrawAndSwapIfPossible", client_);
- EXPECT_FALSE(scheduler_->BeginImplFrameDeadlinePending());
- client_->Reset();
-}
-
-// Tests to ensure that the active frame source can successfully be changed from
-// unthrottled to throttled.
-TEST_F(SchedulerTest, SwitchFrameSourceToThrottled) {
- scheduler_settings_.throttle_frame_production = false;
- scheduler_settings_.use_external_begin_frame_source = true;
- SetUpScheduler(true);
-
- scheduler_->SetNeedsRedraw();
- EXPECT_NO_ACTION(client_);
- client_->Reset();
-
- task_runner().RunPendingTasks(); // Run posted BeginFrame.
- EXPECT_ACTION("WillBeginImplFrame", client_, 0, 1);
- EXPECT_TRUE(scheduler_->BeginImplFrameDeadlinePending());
- client_->Reset();
-
- task_runner().RunPendingTasks(); // Run posted deadline.
- EXPECT_ACTION("ScheduledActionDrawAndSwapIfPossible", client_, 0, 1);
- EXPECT_FALSE(scheduler_->BeginImplFrameDeadlinePending());
- client_->Reset();
-
- // Switch to a throttled frame source.
- scheduler_->SetThrottleFrameProduction(true);
- client_->Reset();
-
- // SetNeedsRedraw should begin the frame on the next BeginImplFrame.
- scheduler_->SetNeedsRedraw();
- task_runner().RunPendingTasks();
- EXPECT_NO_ACTION(client_);
- client_->Reset();
-
- EXPECT_SCOPED(AdvanceFrame());
- EXPECT_ACTION("WillBeginImplFrame", client_, 0, 1);
- EXPECT_TRUE(scheduler_->BeginImplFrameDeadlinePending());
- EXPECT_TRUE(scheduler_->begin_frames_expected());
- client_->Reset();
- task_runner().RunPendingTasks(); // Run posted deadline.
- EXPECT_ACTION("ScheduledActionDrawAndSwapIfPossible", client_, 0, 1);
-}
-
// Tests to ensure that we send a BeginMainFrameNotExpectedSoon when expected.
TEST_F(SchedulerTest, SendBeginMainFrameNotExpectedSoon) {
scheduler_settings_.use_external_begin_frame_source = true;
diff --git a/cc/test/fake_proxy.h b/cc/test/fake_proxy.h
index 341d541..040c12b 100644
--- a/cc/test/fake_proxy.h
+++ b/cc/test/fake_proxy.h
@@ -23,7 +23,6 @@ class FakeProxy : public Proxy {
void SetOutputSurface(OutputSurface* output_surface) override {}
void ReleaseOutputSurface() override;
void SetVisible(bool visible) override {}
- void SetThrottleFrameProduction(bool throttle) override {}
const RendererCapabilities& GetRendererCapabilities() const override;
void SetNeedsAnimate() override {}
void SetNeedsUpdateLayers() override {}
diff --git a/cc/test/proxy_impl_for_test.cc b/cc/test/proxy_impl_for_test.cc
index 457bb32..da0848b 100644
--- a/cc/test/proxy_impl_for_test.cc
+++ b/cc/test/proxy_impl_for_test.cc
@@ -79,11 +79,6 @@ void ProxyImplForTest::DidActivateSyncTree() {
test_hooks_->DidActivateSyncTree();
}
-void ProxyImplForTest::SetThrottleFrameProductionOnImpl(bool throttle) {
- test_hooks_->SetThrottleFrameProductionOnImpl(throttle);
- ProxyImpl::SetThrottleFrameProductionOnImpl(throttle);
-}
-
void ProxyImplForTest::InitializeOutputSurfaceOnImpl(
OutputSurface* output_surface) {
test_hooks_->InitializeOutputSurfaceOnImpl(output_surface);
diff --git a/cc/test/proxy_impl_for_test.h b/cc/test/proxy_impl_for_test.h
index ce28f57..4b807cc 100644
--- a/cc/test/proxy_impl_for_test.h
+++ b/cc/test/proxy_impl_for_test.h
@@ -49,7 +49,6 @@ class ProxyImplForTest : public ProxyImpl {
void ScheduledActionInvalidateOutputSurface() override;
void SendBeginMainFrameNotExpectedSoon() override;
void DidActivateSyncTree() override;
- void SetThrottleFrameProductionOnImpl(bool throttle) override;
void InitializeOutputSurfaceOnImpl(OutputSurface* output_surface) override;
void MainThreadHasStoppedFlingingOnImpl() override;
void SetInputThrottledUntilCommitOnImpl(bool is_throttled) override;
diff --git a/cc/test/scheduler_test_common.h b/cc/test/scheduler_test_common.h
index d442aca..ccc8c26 100644
--- a/cc/test/scheduler_test_common.h
+++ b/cc/test/scheduler_test_common.h
@@ -234,7 +234,9 @@ class TestScheduler : public Scheduler {
}
BeginFrameSource& frame_source() { return *frame_source_; }
- bool FrameProductionThrottled() { return throttle_frame_production_; }
+ bool FrameProductionThrottled() {
+ return settings_.throttle_frame_production;
+ }
bool MainThreadMissedLastDeadline() const {
return state_machine_.main_thread_missed_last_deadline();
diff --git a/cc/test/test_hooks.h b/cc/test/test_hooks.h
index 0a36af6..d8d9e1a 100644
--- a/cc/test/test_hooks.h
+++ b/cc/test/test_hooks.h
@@ -94,7 +94,6 @@ class TestHooks : public AnimationDelegate {
virtual void SendBeginMainFrameNotExpectedSoon() {}
// Hooks for ProxyImpl
- virtual void SetThrottleFrameProductionOnImpl(bool throttle) {}
virtual void UpdateTopControlsStateOnImpl(TopControlsState constraints,
TopControlsState current,
bool animate) {}
diff --git a/cc/trees/channel_main.h b/cc/trees/channel_main.h
index 39861e0..277507f 100644
--- a/cc/trees/channel_main.h
+++ b/cc/trees/channel_main.h
@@ -30,7 +30,6 @@ class CC_EXPORT ChannelMain {
virtual ~ChannelMain() {}
// Interface for commands sent to ProxyImpl
- virtual void SetThrottleFrameProductionOnImpl(bool throttle) = 0;
virtual void UpdateTopControlsStateOnImpl(TopControlsState constraints,
TopControlsState current,
bool animate) = 0;
diff --git a/cc/trees/layer_tree_host.cc b/cc/trees/layer_tree_host.cc
index d5f9b58..6e9d689 100644
--- a/cc/trees/layer_tree_host.cc
+++ b/cc/trees/layer_tree_host.cc
@@ -812,10 +812,6 @@ void LayerTreeHost::SetVisible(bool visible) {
proxy_->SetVisible(visible);
}
-void LayerTreeHost::SetThrottleFrameProduction(bool throttle) {
- proxy_->SetThrottleFrameProduction(throttle);
-}
-
void LayerTreeHost::StartPageScaleAnimation(const gfx::Vector2d& target_offset,
bool use_anchor,
float scale,
diff --git a/cc/trees/layer_tree_host.h b/cc/trees/layer_tree_host.h
index c985002..056326b 100644
--- a/cc/trees/layer_tree_host.h
+++ b/cc/trees/layer_tree_host.h
@@ -272,8 +272,6 @@ class CC_EXPORT LayerTreeHost : public MutatorHostClient {
void SetVisible(bool visible);
bool visible() const { return visible_; }
- void SetThrottleFrameProduction(bool throttle);
-
void StartPageScaleAnimation(const gfx::Vector2d& target_offset,
bool use_anchor,
float scale,
diff --git a/cc/trees/proxy.h b/cc/trees/proxy.h
index f4d7bec..cb7152d 100644
--- a/cc/trees/proxy.h
+++ b/cc/trees/proxy.h
@@ -48,8 +48,6 @@ class CC_EXPORT Proxy {
virtual void SetVisible(bool visible) = 0;
- virtual void SetThrottleFrameProduction(bool throttle) = 0;
-
virtual const RendererCapabilities& GetRendererCapabilities() const = 0;
virtual void SetNeedsAnimate() = 0;
diff --git a/cc/trees/proxy_impl.cc b/cc/trees/proxy_impl.cc
index 46df9ec..3f5a01e 100644
--- a/cc/trees/proxy_impl.cc
+++ b/cc/trees/proxy_impl.cc
@@ -106,13 +106,6 @@ ProxyImpl::~ProxyImpl() {
smoothness_priority_expiration_notifier_.Shutdown();
}
-void ProxyImpl::SetThrottleFrameProductionOnImpl(bool throttle) {
- TRACE_EVENT1("cc", "ProxyImpl::SetThrottleFrameProductionOnImplThread",
- "throttle", throttle);
- DCHECK(IsImplThread());
- scheduler_->SetThrottleFrameProduction(throttle);
-}
-
void ProxyImpl::UpdateTopControlsStateOnImpl(TopControlsState constraints,
TopControlsState current,
bool animate) {
diff --git a/cc/trees/proxy_impl.h b/cc/trees/proxy_impl.h
index 3839904..0d96643 100644
--- a/cc/trees/proxy_impl.h
+++ b/cc/trees/proxy_impl.h
@@ -31,7 +31,6 @@ class CC_EXPORT ProxyImpl : public NON_EXPORTED_BASE(LayerTreeHostImplClient),
~ProxyImpl() override;
// Virtual for testing.
- virtual void SetThrottleFrameProductionOnImpl(bool throttle);
virtual void UpdateTopControlsStateOnImpl(TopControlsState constraints,
TopControlsState current,
bool animate);
diff --git a/cc/trees/proxy_main.cc b/cc/trees/proxy_main.cc
index 4c3d4a4..63bac73 100644
--- a/cc/trees/proxy_main.cc
+++ b/cc/trees/proxy_main.cc
@@ -289,12 +289,6 @@ void ProxyMain::SetVisible(bool visible) {
channel_main_->SetVisibleOnImpl(visible);
}
-void ProxyMain::SetThrottleFrameProduction(bool throttle) {
- TRACE_EVENT1("cc", "ProxyMain::SetThrottleFrameProduction", "throttle",
- throttle);
- channel_main_->SetThrottleFrameProductionOnImpl(throttle);
-}
-
const RendererCapabilities& ProxyMain::GetRendererCapabilities() const {
DCHECK(IsMainThread());
DCHECK(!layer_tree_host_->output_surface_lost());
diff --git a/cc/trees/proxy_main.h b/cc/trees/proxy_main.h
index 63f6994..560d26b 100644
--- a/cc/trees/proxy_main.h
+++ b/cc/trees/proxy_main.h
@@ -92,7 +92,6 @@ class CC_EXPORT ProxyMain : public Proxy {
bool CommitToActiveTree() const override;
void SetOutputSurface(OutputSurface* output_surface) override;
void SetVisible(bool visible) override;
- void SetThrottleFrameProduction(bool throttle) override;
const RendererCapabilities& GetRendererCapabilities() const override;
void SetNeedsAnimate() override;
void SetNeedsUpdateLayers() override;
diff --git a/cc/trees/remote_channel_impl.cc b/cc/trees/remote_channel_impl.cc
index cc43659..4708c1e 100644
--- a/cc/trees/remote_channel_impl.cc
+++ b/cc/trees/remote_channel_impl.cc
@@ -191,10 +191,6 @@ void RemoteChannelImpl::SetVisible(bool visible) {
base::Bind(&ProxyImpl::SetVisibleOnImpl, proxy_impl_weak_ptr_, visible));
}
-void RemoteChannelImpl::SetThrottleFrameProduction(bool throttle) {
- NOTREACHED() << "Should not be called on the remote client LayerTreeHost";
-}
-
const RendererCapabilities& RemoteChannelImpl::GetRendererCapabilities() const {
NOTREACHED() << "Should not be called on the remote client LayerTreeHost";
return main().renderer_capabilities;
diff --git a/cc/trees/remote_channel_impl.h b/cc/trees/remote_channel_impl.h
index cfd411b..79e19ec 100644
--- a/cc/trees/remote_channel_impl.h
+++ b/cc/trees/remote_channel_impl.h
@@ -143,7 +143,6 @@ class CC_EXPORT RemoteChannelImpl : public ChannelImpl,
void SetOutputSurface(OutputSurface* output_surface) override;
void ReleaseOutputSurface() override;
void SetVisible(bool visible) override;
- void SetThrottleFrameProduction(bool throttle) override;
const RendererCapabilities& GetRendererCapabilities() const override;
void SetNeedsAnimate() override;
void SetNeedsUpdateLayers() override;
diff --git a/cc/trees/remote_channel_main.cc b/cc/trees/remote_channel_main.cc
index c8d304f..3aea001 100644
--- a/cc/trees/remote_channel_main.cc
+++ b/cc/trees/remote_channel_main.cc
@@ -53,8 +53,6 @@ void RemoteChannelMain::OnProtoReceived(
HandleProto(proto->to_main());
}
-void RemoteChannelMain::SetThrottleFrameProductionOnImpl(bool throttle) {}
-
void RemoteChannelMain::UpdateTopControlsStateOnImpl(
TopControlsState constraints,
TopControlsState current,
diff --git a/cc/trees/remote_channel_main.h b/cc/trees/remote_channel_main.h
index 23c2cdc..7b2b9c7 100644
--- a/cc/trees/remote_channel_main.h
+++ b/cc/trees/remote_channel_main.h
@@ -30,7 +30,6 @@ class CC_EXPORT RemoteChannelMain : public ChannelMain,
~RemoteChannelMain() override;
// ChannelMain implementation
- void SetThrottleFrameProductionOnImpl(bool throttle) override;
void UpdateTopControlsStateOnImpl(TopControlsState constraints,
TopControlsState current,
bool animate) override;
diff --git a/cc/trees/single_thread_proxy.cc b/cc/trees/single_thread_proxy.cc
index 74b59c1..2735029 100644
--- a/cc/trees/single_thread_proxy.cc
+++ b/cc/trees/single_thread_proxy.cc
@@ -118,14 +118,6 @@ void SingleThreadProxy::SetVisible(bool visible) {
scheduler_on_impl_thread_->SetVisible(layer_tree_host_impl_->visible());
}
-void SingleThreadProxy::SetThrottleFrameProduction(bool throttle) {
- TRACE_EVENT1("cc", "SingleThreadProxy::SetThrottleFrameProduction",
- "throttle", throttle);
- DebugScopedSetImplThread impl(task_runner_provider_);
- if (scheduler_on_impl_thread_)
- scheduler_on_impl_thread_->SetThrottleFrameProduction(throttle);
-}
-
void SingleThreadProxy::RequestNewOutputSurface() {
DCHECK(task_runner_provider_->IsMainThread());
DCHECK(layer_tree_host_->output_surface_lost());
diff --git a/cc/trees/single_thread_proxy.h b/cc/trees/single_thread_proxy.h
index 099c223..3b69668 100644
--- a/cc/trees/single_thread_proxy.h
+++ b/cc/trees/single_thread_proxy.h
@@ -41,7 +41,6 @@ class CC_EXPORT SingleThreadProxy : public Proxy,
void SetOutputSurface(OutputSurface* output_surface) override;
void ReleaseOutputSurface() override;
void SetVisible(bool visible) override;
- void SetThrottleFrameProduction(bool throttle) override;
const RendererCapabilities& GetRendererCapabilities() const override;
void SetNeedsAnimate() override;
void SetNeedsUpdateLayers() override;
diff --git a/cc/trees/threaded_channel.cc b/cc/trees/threaded_channel.cc
index 77e60ff..7d1d728 100644
--- a/cc/trees/threaded_channel.cc
+++ b/cc/trees/threaded_channel.cc
@@ -34,13 +34,6 @@ ThreadedChannel::~ThreadedChannel() {
DCHECK(!IsInitialized());
}
-void ThreadedChannel::SetThrottleFrameProductionOnImpl(bool throttle) {
- DCHECK(IsMainThread());
- ImplThreadTaskRunner()->PostTask(
- FROM_HERE, base::Bind(&ProxyImpl::SetThrottleFrameProductionOnImpl,
- proxy_impl_weak_ptr_, throttle));
-}
-
void ThreadedChannel::UpdateTopControlsStateOnImpl(TopControlsState constraints,
TopControlsState current,
bool animate) {
diff --git a/cc/trees/threaded_channel.h b/cc/trees/threaded_channel.h
index ab20e52..2a669d4 100644
--- a/cc/trees/threaded_channel.h
+++ b/cc/trees/threaded_channel.h
@@ -83,7 +83,6 @@ class CC_EXPORT ThreadedChannel : public ChannelMain, public ChannelImpl {
~ThreadedChannel() override;
// ChannelMain Implementation
- void SetThrottleFrameProductionOnImpl(bool throttle) override;
void UpdateTopControlsStateOnImpl(TopControlsState constraints,
TopControlsState current,
bool animate) override;
diff --git a/cc/trees/threaded_channel_unittest.cc b/cc/trees/threaded_channel_unittest.cc
index 79d1c65..81d28de 100644
--- a/cc/trees/threaded_channel_unittest.cc
+++ b/cc/trees/threaded_channel_unittest.cc
@@ -73,22 +73,6 @@ class ThreadedChannelTestInitializationAndShutdown
MULTI_THREAD_DIRECT_RENDERER_TEST_F(
ThreadedChannelTestInitializationAndShutdown);
-class ThreadedChannelTestThrottleFrameProduction : public ThreadedChannelTest {
- void BeginChannelTest() override {
- proxy()->SetThrottleFrameProduction(true);
- }
-
- void SetThrottleFrameProductionOnImpl(bool throttle) override {
- ASSERT_TRUE(throttle);
- calls_received_++;
- EndTest();
- }
-
- void AfterTest() override { EXPECT_EQ(1, calls_received_); }
-};
-
-MULTI_THREAD_DIRECT_RENDERER_TEST_F(ThreadedChannelTestThrottleFrameProduction);
-
class ThreadedChannelTestTopControlsState : public ThreadedChannelTest {
void BeginChannelTest() override {
proxy()->UpdateTopControlsState(TopControlsState::BOTH,