| Index: content/browser/android/in_process/synchronous_compositor_external_begin_frame_source.cc
|
| diff --git a/content/browser/android/in_process/synchronous_compositor_external_begin_frame_source.cc b/content/browser/android/in_process/synchronous_compositor_external_begin_frame_source.cc
|
| index 0c272fd358af42ff8789ad2ba672d74ed55d49b4..c860f06fba2777a6d9b330c1975f37697c829d25 100644
|
| --- a/content/browser/android/in_process/synchronous_compositor_external_begin_frame_source.cc
|
| +++ b/content/browser/android/in_process/synchronous_compositor_external_begin_frame_source.cc
|
| @@ -30,23 +30,41 @@ SynchronousCompositorExternalBeginFrameSource::
|
| DCHECK(!compositor_);
|
| }
|
|
|
| -void SynchronousCompositorExternalBeginFrameSource::BeginFrame() {
|
| +void SynchronousCompositorExternalBeginFrameSource::SendBeginFrameNow() {
|
| DCHECK(CalledOnValidThread());
|
| + DCHECK(!inside_begin_frame_);
|
| + inside_begin_frame_ = true;
|
| CallOnBeginFrame(cc::BeginFrameArgs::Create(
|
| BEGINFRAME_FROM_HERE, gfx::FrameTime::Now(), base::TimeTicks(),
|
| cc::BeginFrameArgs::DefaultInterval(), cc::BeginFrameArgs::SYNCHRONOUS));
|
| }
|
|
|
| +void SynchronousCompositorExternalBeginFrameSource::SendBeginFrame(
|
| + base::TimeTicks frame_time, base::TimeDelta vsync_period) {
|
| + DCHECK(CalledOnValidThread());
|
| + DCHECK(!inside_begin_frame_);
|
| + inside_begin_frame_ = true;
|
| + CallOnBeginFrame(cc::BeginFrameArgs::Create(
|
| + BEGINFRAME_FROM_HERE, frame_time, base::TimeTicks(), vsync_period,
|
| + cc::BeginFrameArgs::SYNCHRONOUS));
|
| +}
|
| +
|
| void SynchronousCompositorExternalBeginFrameSource::SetCompositor(
|
| SynchronousCompositorImpl* compositor) {
|
| DCHECK(CalledOnValidThread());
|
| compositor_ = compositor;
|
| }
|
|
|
| +void SynchronousCompositorExternalBeginFrameSource::DidFinishFrame(
|
| + size_t remaining_frames) {
|
| + DCHECK(CalledOnValidThread());
|
| + DCHECK(inside_begin_frame_);
|
| + inside_begin_frame_ = false;
|
| +}
|
| +
|
| void SynchronousCompositorExternalBeginFrameSource::OnNeedsBeginFramesChange(
|
| bool needs_begin_frames) {
|
| DCHECK(CalledOnValidThread());
|
| -
|
| if (compositor_)
|
| compositor_->NeedsBeginFramesChanged();
|
| }
|
|
|