Skip to content

Commit

Permalink
Convert base::Bind in VideoFrameCompositor timer callbacks
Browse files Browse the repository at this point in the history
media::VideoFrameCompositor uses two base::RetainingOneShotTimers to
handle Start/StopForceBeginFrames and background rendering.
base::RepeatingCallback is correct because the timer is meant to retain
and reuse the callback after a reset.

BUG=1102651

Change-Id: I7c028cc08ba0d07c1f7e85518f9346a279313469
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2284148
Auto-Submit: Matt Reynolds <mattreynolds@chromium.org>
Reviewed-by: Chrome Cunningham <chcunningham@chromium.org>
Commit-Queue: Chrome Cunningham <chcunningham@chromium.org>
Cr-Commit-Position: refs/heads/master@{#789566}
  • Loading branch information
nondebug authored and Commit Bot committed Jul 17, 2020
1 parent bc5c2c8 commit 88bfc84
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions media/blink/video_frame_compositor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ VideoFrameCompositor::VideoFrameCompositor(
background_rendering_timer_(
FROM_HERE,
base::TimeDelta::FromMilliseconds(kBackgroundRenderingTimeoutMs),
base::Bind(&VideoFrameCompositor::BackgroundRender,
base::Unretained(this))),
base::BindRepeating(&VideoFrameCompositor::BackgroundRender,
base::Unretained(this))),
force_begin_frames_timer_(
FROM_HERE,
base::TimeDelta::FromMilliseconds(kForceBeginFramesTimeoutMs),
base::Bind(&VideoFrameCompositor::StopForceBeginFrames,
base::Unretained(this))),
base::BindRepeating(&VideoFrameCompositor::StopForceBeginFrames,
base::Unretained(this))),
submitter_(std::move(submitter)) {
if (submitter_) {
task_runner_->PostTask(
Expand Down

0 comments on commit 88bfc84

Please sign in to comment.