| Index: cc/single_thread_proxy.cc
|
| diff --git a/cc/single_thread_proxy.cc b/cc/single_thread_proxy.cc
|
| index 3a64d828032bf6f77715f7e2608e561a7cf158c5..9a95a1d90bd6410f4bc3160d5f83332f813cddde 100644
|
| --- a/cc/single_thread_proxy.cc
|
| +++ b/cc/single_thread_proxy.cc
|
| @@ -55,7 +55,7 @@ bool SingleThreadProxy::CompositeAndReadback(void* pixels, gfx::Rect rect) {
|
| TRACE_EVENT0("cc", "SingleThreadProxy::compositeAndReadback");
|
| DCHECK(Proxy::IsMainThread());
|
|
|
| - if (!CommitAndComposite())
|
| + if (!CommitAndComposite(base::TimeTicks::Now()))
|
| return false;
|
|
|
| {
|
| @@ -335,8 +335,8 @@ void SingleThreadProxy::didLoseOutputSurfaceOnImplThread() {
|
|
|
| // Called by the legacy scheduling path (e.g. where render_widget does the
|
| // scheduling)
|
| -void SingleThreadProxy::CompositeImmediately() {
|
| - if (CommitAndComposite()) {
|
| +void SingleThreadProxy::CompositeImmediately(base::TimeTicks frame_begin_time) {
|
| + if (CommitAndComposite(frame_begin_time)) {
|
| layer_tree_host_impl_->swapBuffers();
|
| DidSwapFrame();
|
| }
|
| @@ -366,7 +366,7 @@ void SingleThreadProxy::ForceSerializeOnSwapBuffers() {
|
|
|
| void SingleThreadProxy::onSwapBuffersCompleteOnImplThread() { NOTREACHED(); }
|
|
|
| -bool SingleThreadProxy::CommitAndComposite() {
|
| +bool SingleThreadProxy::CommitAndComposite(base::TimeTicks frame_begin_time) {
|
| DCHECK(Proxy::IsMainThread());
|
|
|
| if (!layer_tree_host_->initializeRendererIfNeeded())
|
| @@ -392,13 +392,14 @@ bool SingleThreadProxy::CommitAndComposite() {
|
|
|
| layer_tree_host_->willCommit();
|
| DoCommit(queue.Pass());
|
| - bool result = DoComposite(offscreen_context_provider);
|
| + bool result = DoComposite(offscreen_context_provider, frame_begin_time);
|
| layer_tree_host_->didBeginFrame();
|
| return result;
|
| }
|
|
|
| bool SingleThreadProxy::DoComposite(
|
| - scoped_refptr<cc::ContextProvider> offscreen_context_provider) {
|
| + scoped_refptr<cc::ContextProvider> offscreen_context_provider,
|
| + base::TimeTicks frame_begin_time) {
|
| DCHECK(!output_surface_lost_);
|
| {
|
| DebugScopedSetImplThread impl(this);
|
| @@ -421,7 +422,7 @@ bool SingleThreadProxy::DoComposite(
|
|
|
| LayerTreeHostImpl::FrameData frame;
|
| layer_tree_host_impl_->prepareToDraw(frame);
|
| - layer_tree_host_impl_->drawLayers(frame);
|
| + layer_tree_host_impl_->drawLayers(frame, frame_begin_time);
|
| layer_tree_host_impl_->didDrawAllLayers(frame);
|
| output_surface_lost_ = layer_tree_host_impl_->isContextLost();
|
|
|
|
|