summaryrefslogtreecommitdiff
path: root/chromium/components/viz/service/frame_sinks/frame_sink_manager_impl.h
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/components/viz/service/frame_sinks/frame_sink_manager_impl.h')
-rw-r--r--chromium/components/viz/service/frame_sinks/frame_sink_manager_impl.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/chromium/components/viz/service/frame_sinks/frame_sink_manager_impl.h b/chromium/components/viz/service/frame_sinks/frame_sink_manager_impl.h
index 833d23c839e..7c7c2791d4a 100644
--- a/chromium/components/viz/service/frame_sinks/frame_sink_manager_impl.h
+++ b/chromium/components/viz/service/frame_sinks/frame_sink_manager_impl.h
@@ -87,6 +87,7 @@ class VIZ_SERVICE_EXPORT FrameSinkManagerImpl
DebugRendererSettings debug_renderer_settings;
base::ProcessId host_process_id = base::kNullProcessId;
raw_ptr<HintSessionFactory> hint_session_factory = nullptr;
+ size_t max_uncommitted_frames = 0;
};
explicit FrameSinkManagerImpl(const InitParams& params);
@@ -152,6 +153,8 @@ class VIZ_SERVICE_EXPORT FrameSinkManagerImpl
const DebugRendererSettings& debug_settings) override;
void Throttle(const std::vector<FrameSinkId>& ids,
base::TimeDelta interval) override;
+ void StartThrottlingAllFrameSinks(base::TimeDelta interval) override;
+ void StopThrottlingAllFrameSinks() override;
void DestroyFrameSinkBundle(const FrameSinkBundleId& id);
@@ -394,9 +397,16 @@ class VIZ_SERVICE_EXPORT FrameSinkManagerImpl
// Ids of the frame sinks that have been requested to throttle.
std::vector<FrameSinkId> frame_sink_ids_to_throttle_;
- // The throttling interval which defines how often BeginFrames are sent.
+ // The throttling interval which defines how often BeginFrames are sent for
+ // frame sinks in `frame_sink_ids_to_throttle_`, if
+ // `global_throttle_interval_` is unset or if this interval is longer than
+ // `global_throttle_interval_`.
base::TimeDelta throttle_interval_ = BeginFrameArgs::DefaultInterval();
+ // If present, the throttling interval which defines the upper bound of how
+ // often BeginFrames are sent for all current and future frame sinks.
+ absl::optional<base::TimeDelta> global_throttle_interval_ = absl::nullopt;
+
base::flat_map<uint32_t, base::ScopedClosureRunner> cached_back_buffers_;
THREAD_CHECKER(thread_checker_);