Commit 7a45dfa6 authored by Tal Pressman's avatar Tal Pressman Committed by Commit Bot

Properly set is_scroll_animator_enabled_ on RenderThreadImpl.

Before crrev.com/c/2485659, this was done in
RenderThreadImpl::CreateView, but this got lost when moving CreateView
to AgentSchedulingGroup.

Fixed: 1141547, 1141397
Change-Id: Iccf2ecab42b039640c53001544823e2b599ccbcf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2494191Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Reviewed-by: default avatarTakashi Sakamoto <tasak@google.com>
Commit-Queue: Tal Pressman <talp@chromium.org>
Cr-Commit-Position: refs/heads/master@{#820168}
parent e6f38931
......@@ -132,6 +132,8 @@ mojom::RouteProvider* AgentSchedulingGroup::GetRemoteRouteProvider() {
void AgentSchedulingGroup::CreateView(mojom::CreateViewParamsPtr params) {
RenderThreadImpl& renderer = ToImpl(render_thread_);
renderer.SetScrollAnimatorEnabled(
params->web_preferences.enable_scroll_animator, PassKey());
RenderViewImpl::Create(
*this, &renderer, std::move(params), RenderWidget::ShowCallback(),
......
......@@ -1349,6 +1349,12 @@ bool RenderThreadImpl::IsScrollAnimatorEnabled() {
return is_scroll_animator_enabled_;
}
void RenderThreadImpl::SetScrollAnimatorEnabled(
bool enable_scroll_animator,
util::PassKey<AgentSchedulingGroup>) {
is_scroll_animator_enabled_ = enable_scroll_animator;
}
std::unique_ptr<cc::UkmRecorderFactory>
RenderThreadImpl::CreateUkmRecorderFactory() {
return std::make_unique<UkmRecorderFactoryImpl>(child_process_host());
......
......@@ -200,6 +200,13 @@ class CONTENT_EXPORT RenderThreadImpl
bool IsScrollAnimatorEnabled() override;
std::unique_ptr<cc::UkmRecorderFactory> CreateUkmRecorderFactory() override;
// TODO(crbug.com/1111231): The `enable_scroll_animator` flag is currently
// being passed as part of `CreateViewParams`, despite it looking like a
// global setting. It should probably be moved to some `mojom::Renderer` API
// and this method should be removed.
void SetScrollAnimatorEnabled(bool enable_scroll_animator,
util::PassKey<AgentSchedulingGroup>);
bool IsThreadedAnimationEnabled();
scoped_refptr<base::SingleThreadTaskRunner>
GetCompositorMainThreadTaskRunner();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment