2019-11-26 20:04:19 +01:00
|
|
|
diff --git content/browser/renderer_host/input/fling_scheduler.cc content/browser/renderer_host/input/fling_scheduler.cc
|
2023-02-27 19:52:38 +01:00
|
|
|
index 431df5d50debe..0fcc9ea8fbb1a 100644
|
2019-11-26 20:04:19 +01:00
|
|
|
--- content/browser/renderer_host/input/fling_scheduler.cc
|
|
|
|
+++ content/browser/renderer_host/input/fling_scheduler.cc
|
2020-03-04 01:29:39 +01:00
|
|
|
@@ -68,6 +68,9 @@ void FlingScheduler::ProgressFlingOnBeginFrameIfneeded(
|
2019-11-26 20:04:19 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
ui::Compositor* FlingScheduler::GetCompositor() {
|
|
|
|
+ if (compositor_) {
|
|
|
|
+ return compositor_;
|
|
|
|
+ }
|
2023-02-27 19:52:38 +01:00
|
|
|
if (!host_->GetView()) {
|
|
|
|
return nullptr;
|
|
|
|
}
|
2019-11-26 20:04:19 +01:00
|
|
|
diff --git content/browser/renderer_host/input/fling_scheduler_base.h content/browser/renderer_host/input/fling_scheduler_base.h
|
2022-09-26 21:30:45 +02:00
|
|
|
index afefe3cd83dee..6668463247644 100644
|
2019-11-26 20:04:19 +01:00
|
|
|
--- content/browser/renderer_host/input/fling_scheduler_base.h
|
|
|
|
+++ content/browser/renderer_host/input/fling_scheduler_base.h
|
|
|
|
@@ -7,12 +7,23 @@
|
|
|
|
|
|
|
|
#include "content/browser/renderer_host/input/fling_controller.h"
|
|
|
|
|
|
|
|
+namespace ui {
|
|
|
|
+class Compositor;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
namespace content {
|
|
|
|
|
|
|
|
class FlingSchedulerBase : public FlingControllerSchedulerClient {
|
|
|
|
public:
|
|
|
|
virtual void ProgressFlingOnBeginFrameIfneeded(
|
|
|
|
base::TimeTicks current_time) = 0;
|
|
|
|
+
|
|
|
|
+ void SetCompositor(ui::Compositor* compositor) {
|
|
|
|
+ compositor_ = compositor;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+protected:
|
|
|
|
+ ui::Compositor* compositor_ = nullptr;
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace content
|
|
|
|
diff --git content/browser/renderer_host/render_widget_host_impl.cc content/browser/renderer_host/render_widget_host_impl.cc
|
2023-04-26 21:55:59 +02:00
|
|
|
index e45129c031d9c..2d2392117a8a0 100644
|
2019-11-26 20:04:19 +01:00
|
|
|
--- content/browser/renderer_host/render_widget_host_impl.cc
|
|
|
|
+++ content/browser/renderer_host/render_widget_host_impl.cc
|
2023-04-26 21:55:59 +02:00
|
|
|
@@ -3152,6 +3152,11 @@ void RenderWidgetHostImpl::OnInvalidInputEventSource() {
|
2020-06-09 19:48:00 +02:00
|
|
|
GetProcess(), bad_message::INPUT_ROUTER_INVALID_EVENT_SOURCE);
|
2019-11-26 20:04:19 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
+void RenderWidgetHostImpl::SetCompositorForFlingScheduler(ui::Compositor* compositor)
|
|
|
|
+{
|
|
|
|
+ fling_scheduler_->SetCompositor(compositor);
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
void RenderWidgetHostImpl::AddPendingUserActivation(
|
|
|
|
const WebInputEvent& event) {
|
2020-03-04 01:29:39 +01:00
|
|
|
if ((base::FeatureList::IsEnabled(
|
2019-11-26 20:04:19 +01:00
|
|
|
diff --git content/browser/renderer_host/render_widget_host_impl.h content/browser/renderer_host/render_widget_host_impl.h
|
2023-04-26 21:55:59 +02:00
|
|
|
index d93a3647c1150..423e2ced1d572 100644
|
2019-11-26 20:04:19 +01:00
|
|
|
--- content/browser/renderer_host/render_widget_host_impl.h
|
|
|
|
+++ content/browser/renderer_host/render_widget_host_impl.h
|
2023-04-26 21:55:59 +02:00
|
|
|
@@ -796,6 +796,7 @@ class CONTENT_EXPORT RenderWidgetHostImpl
|
2020-03-04 01:29:39 +01:00
|
|
|
|
2019-11-26 20:04:19 +01:00
|
|
|
void ProgressFlingIfNeeded(base::TimeTicks current_time);
|
|
|
|
void StopFling();
|
|
|
|
+ void SetCompositorForFlingScheduler(ui::Compositor* compositor);
|
|
|
|
|
|
|
|
// The RenderWidgetHostImpl will keep showing the old page (for a while) after
|
|
|
|
// navigation until the first frame of the new page arrives. This reduces
|