Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(440)

Side by Side Diff: cc/layer_tree_host.cc

Issue 12804006: cc: Save correct frame begin time to FrameRateCounter (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase to 188402 Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/layer_tree_host.h ('k') | cc/layer_tree_host_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/layer_tree_host.h" 5 #include "cc/layer_tree_host.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after
517 proxy_->SetVisible(visible); 517 proxy_->SetVisible(visible);
518 } 518 }
519 519
520 void LayerTreeHost::StartPageScaleAnimation(gfx::Vector2d target_offset, 520 void LayerTreeHost::StartPageScaleAnimation(gfx::Vector2d target_offset,
521 bool use_anchor, 521 bool use_anchor,
522 float scale, 522 float scale,
523 base::TimeDelta duration) { 523 base::TimeDelta duration) {
524 proxy_->StartPageScaleAnimation(target_offset, use_anchor, scale, duration); 524 proxy_->StartPageScaleAnimation(target_offset, use_anchor, scale, duration);
525 } 525 }
526 526
527 void LayerTreeHost::Composite() { 527 void LayerTreeHost::Composite(base::TimeTicks frame_begin_time) {
528 if (!proxy_->HasImplThread()) 528 if (!proxy_->HasImplThread())
529 static_cast<SingleThreadProxy*>(proxy_.get())->CompositeImmediately(); 529 static_cast<SingleThreadProxy*>(proxy_.get())->CompositeImmediately(
530 frame_begin_time);
530 else 531 else
531 SetNeedsCommit(); 532 SetNeedsCommit();
532 } 533 }
533 534
534 void LayerTreeHost::ScheduleComposite() { 535 void LayerTreeHost::ScheduleComposite() {
535 client_->scheduleComposite(); 536 client_->scheduleComposite();
536 } 537 }
537 538
538 bool LayerTreeHost::InitializeRendererIfNeeded() { 539 bool LayerTreeHost::InitializeRendererIfNeeded() {
539 if (!renderer_initialized_) { 540 if (!renderer_initialized_) {
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after
939 SetAnimationEventsRecursive(events, 940 SetAnimationEventsRecursive(events,
940 layer->children()[child_index].get(), 941 layer->children()[child_index].get(),
941 wall_clock_time); 942 wall_clock_time);
942 } 943 }
943 944
944 skia::RefPtr<SkPicture> LayerTreeHost::CapturePicture() { 945 skia::RefPtr<SkPicture> LayerTreeHost::CapturePicture() {
945 return proxy_->CapturePicture(); 946 return proxy_->CapturePicture();
946 } 947 }
947 948
948 } // namespace cc 949 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layer_tree_host.h ('k') | cc/layer_tree_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698