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

Side by Side Diff: cc/thread_proxy.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
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/thread_proxy.h" 5 #include "cc/thread_proxy.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "cc/context_provider.h" 10 #include "cc/context_provider.h"
(...skipping 898 matching lines...) Expand 10 before | Expand all | Expand 10 after
909 // We guard prepareToDraw() with canDraw() because it always returns a valid 909 // We guard prepareToDraw() with canDraw() because it always returns a valid
910 // frame, so can only be used when such a frame is possible. Since 910 // frame, so can only be used when such a frame is possible. Since
911 // drawLayers() depends on the result of prepareToDraw(), it is guarded on 911 // drawLayers() depends on the result of prepareToDraw(), it is guarded on
912 // canDraw() as well. 912 // canDraw() as well.
913 913
914 LayerTreeHostImpl::FrameData frame; 914 LayerTreeHostImpl::FrameData frame;
915 bool draw_frame = 915 bool draw_frame =
916 layer_tree_host_impl_->CanDraw() && 916 layer_tree_host_impl_->CanDraw() &&
917 (layer_tree_host_impl_->PrepareToDraw(&frame) || forced_draw); 917 (layer_tree_host_impl_->PrepareToDraw(&frame) || forced_draw);
918 if (draw_frame) { 918 if (draw_frame) {
919 layer_tree_host_impl_->DrawLayers(&frame); 919 layer_tree_host_impl_->DrawLayers(
920 &frame,
921 scheduler_on_impl_thread_->lastVSyncTime());
920 result.didDraw = true; 922 result.didDraw = true;
921 } 923 }
922 layer_tree_host_impl_->DidDrawAllLayers(frame); 924 layer_tree_host_impl_->DidDrawAllLayers(frame);
923 925
924 // Check for tree activation. 926 // Check for tree activation.
925 if (completion_event_for_commit_held_on_tree_activation_ && 927 if (completion_event_for_commit_held_on_tree_activation_ &&
926 !layer_tree_host_impl_->pending_tree()) { 928 !layer_tree_host_impl_->pending_tree()) {
927 TRACE_EVENT_INSTANT0("cc", "ReleaseCommitbyActivation"); 929 TRACE_EVENT_INSTANT0("cc", "ReleaseCommitbyActivation");
928 DCHECK(layer_tree_host_impl_->settings().implSidePainting); 930 DCHECK(layer_tree_host_impl_->settings().implSidePainting);
929 completion_event_for_commit_held_on_tree_activation_->signal(); 931 completion_event_for_commit_held_on_tree_activation_->signal();
(...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after
1316 } 1318 }
1317 1319
1318 void ThreadProxy::RenewTreePriorityOnImplThread() { 1320 void ThreadProxy::RenewTreePriorityOnImplThread() {
1319 DCHECK(renew_tree_priority_on_impl_thread_pending_); 1321 DCHECK(renew_tree_priority_on_impl_thread_pending_);
1320 renew_tree_priority_on_impl_thread_pending_ = false; 1322 renew_tree_priority_on_impl_thread_pending_ = false;
1321 1323
1322 RenewTreePriority(); 1324 RenewTreePriority();
1323 } 1325 }
1324 1326
1325 } // namespace cc 1327 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/layer_tree_test_common.cc ('k') | content/browser/renderer_host/compositor_impl_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698