| OLD | NEW |
| 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/trees/thread_proxy.h" | 5 #include "cc/trees/thread_proxy.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 commit_requested_(false), | 70 commit_requested_(false), |
| 71 commit_request_sent_to_impl_thread_(false), | 71 commit_request_sent_to_impl_thread_(false), |
| 72 created_offscreen_context_provider_(false), | 72 created_offscreen_context_provider_(false), |
| 73 layer_tree_host_(layer_tree_host), | 73 layer_tree_host_(layer_tree_host), |
| 74 started_(false), | 74 started_(false), |
| 75 textures_acquired_(true), | 75 textures_acquired_(true), |
| 76 in_composite_and_readback_(false), | 76 in_composite_and_readback_(false), |
| 77 manage_tiles_pending_(false), | 77 manage_tiles_pending_(false), |
| 78 weak_factory_on_impl_thread_(this), | 78 weak_factory_on_impl_thread_(this), |
| 79 weak_factory_(this), | 79 weak_factory_(this), |
| 80 frame_did_draw_(false), |
| 80 begin_frame_sent_to_main_thread_completion_event_on_impl_thread_(NULL), | 81 begin_frame_sent_to_main_thread_completion_event_on_impl_thread_(NULL), |
| 81 readback_request_on_impl_thread_(NULL), | 82 readback_request_on_impl_thread_(NULL), |
| 82 commit_completion_event_on_impl_thread_(NULL), | 83 commit_completion_event_on_impl_thread_(NULL), |
| 83 completion_event_for_commit_held_on_tree_activation_(NULL), | 84 completion_event_for_commit_held_on_tree_activation_(NULL), |
| 84 texture_acquisition_completion_event_on_impl_thread_(NULL), | 85 texture_acquisition_completion_event_on_impl_thread_(NULL), |
| 85 next_frame_is_newly_committed_frame_on_impl_thread_(false), | 86 next_frame_is_newly_committed_frame_on_impl_thread_(false), |
| 86 throttle_frame_production_( | 87 throttle_frame_production_(layer_tree_host->settings() |
| 87 layer_tree_host->settings().throttle_frame_production), | 88 .throttle_frame_production), |
| 88 begin_frame_scheduling_enabled_( | 89 begin_frame_scheduling_enabled_(layer_tree_host->settings() |
| 89 layer_tree_host->settings().begin_frame_scheduling_enabled), | 90 .begin_frame_scheduling_enabled), |
| 90 using_synchronous_renderer_compositor_( | 91 using_synchronous_renderer_compositor_( |
| 91 layer_tree_host->settings().using_synchronous_renderer_compositor), | 92 layer_tree_host->settings().using_synchronous_renderer_compositor), |
| 92 inside_draw_(false), | 93 inside_draw_(false), |
| 93 can_cancel_commit_(true), | 94 can_cancel_commit_(true), |
| 94 defer_commits_(false), | 95 defer_commits_(false), |
| 95 input_throttled_until_commit_(false), | 96 input_throttled_until_commit_(false), |
| 96 renew_tree_priority_on_impl_thread_pending_(false), | 97 renew_tree_priority_on_impl_thread_pending_(false), |
| 97 draw_duration_history_(kDurationHistorySize), | 98 draw_duration_history_(kDurationHistorySize), |
| 98 begin_frame_to_commit_duration_history_(kDurationHistorySize), | 99 begin_frame_to_commit_duration_history_(kDurationHistorySize), |
| 99 commit_to_activate_duration_history_(kDurationHistorySize) { | 100 commit_to_activate_duration_history_(kDurationHistorySize) { |
| (...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 386 Proxy::MainThreadTaskRunner()->PostTask( | 387 Proxy::MainThreadTaskRunner()->PostTask( |
| 387 FROM_HERE, | 388 FROM_HERE, |
| 388 base::Bind(&ThreadProxy::DidCompleteSwapBuffers, main_thread_weak_ptr_)); | 389 base::Bind(&ThreadProxy::DidCompleteSwapBuffers, main_thread_weak_ptr_)); |
| 389 } | 390 } |
| 390 | 391 |
| 391 void ThreadProxy::SetNeedsBeginFrameOnImplThread(bool enable) { | 392 void ThreadProxy::SetNeedsBeginFrameOnImplThread(bool enable) { |
| 392 DCHECK(IsImplThread()); | 393 DCHECK(IsImplThread()); |
| 393 TRACE_EVENT1("cc", "ThreadProxy::SetNeedsBeginFrameOnImplThread", | 394 TRACE_EVENT1("cc", "ThreadProxy::SetNeedsBeginFrameOnImplThread", |
| 394 "enable", enable); | 395 "enable", enable); |
| 395 layer_tree_host_impl_->SetNeedsBeginFrame(enable); | 396 layer_tree_host_impl_->SetNeedsBeginFrame(enable); |
| 397 UpdateBackgroundAnimateTicking(); |
| 396 } | 398 } |
| 397 | 399 |
| 398 void ThreadProxy::BeginFrameOnImplThread(const BeginFrameArgs& args) { | 400 void ThreadProxy::BeginFrameOnImplThread(const BeginFrameArgs& args) { |
| 399 DCHECK(IsImplThread()); | 401 DCHECK(IsImplThread()); |
| 400 TRACE_EVENT0("cc", "ThreadProxy::BeginFrameOnImplThread"); | 402 TRACE_EVENT0("cc", "ThreadProxy::BeginFrameOnImplThread"); |
| 403 |
| 404 base::TimeTicks monotonic_time = |
| 405 layer_tree_host_impl_->CurrentFrameTimeTicks(); |
| 406 base::Time wall_clock_time = layer_tree_host_impl_->CurrentFrameTime(); |
| 407 if (layer_tree_host_impl_->active_tree()->root_layer()) |
| 408 layer_tree_host_impl_->Animate(monotonic_time, wall_clock_time); |
| 409 |
| 410 // Reinitialize for the current frame. |
| 411 frame_did_draw_ = false; |
| 412 |
| 401 scheduler_on_impl_thread_->BeginFrame(args); | 413 scheduler_on_impl_thread_->BeginFrame(args); |
| 402 } | 414 } |
| 403 | 415 |
| 416 void ThreadProxy::DidBeginFrameDeadlineOnImplThread() { |
| 417 // Do not start animations if we skip drawing the frame to avoid |
| 418 // checkerboarding. |
| 419 if (layer_tree_host_impl_->active_tree()->root_layer()) { |
| 420 layer_tree_host_impl_->UpdateAnimationState( |
| 421 frame_did_draw_ || !layer_tree_host_impl_->CanDraw()); |
| 422 } |
| 423 layer_tree_host_impl_->ResetCurrentFrameTimeForNextFrame(); |
| 424 } |
| 425 |
| 404 void ThreadProxy::OnCanDrawStateChanged(bool can_draw) { | 426 void ThreadProxy::OnCanDrawStateChanged(bool can_draw) { |
| 405 DCHECK(IsImplThread()); | 427 DCHECK(IsImplThread()); |
| 406 TRACE_EVENT1( | 428 TRACE_EVENT1( |
| 407 "cc", "ThreadProxy::OnCanDrawStateChanged", "can_draw", can_draw); | 429 "cc", "ThreadProxy::OnCanDrawStateChanged", "can_draw", can_draw); |
| 408 scheduler_on_impl_thread_->SetCanDraw(can_draw); | 430 scheduler_on_impl_thread_->SetCanDraw(can_draw); |
| 409 UpdateBackgroundAnimateTicking(); | 431 UpdateBackgroundAnimateTicking(); |
| 410 } | 432 } |
| 411 | 433 |
| 412 void ThreadProxy::NotifyReadyToActivate() { | 434 void ThreadProxy::NotifyReadyToActivate() { |
| 413 TRACE_EVENT0("cc", "ThreadProxy::NotifyReadyToActivate"); | 435 TRACE_EVENT0("cc", "ThreadProxy::NotifyReadyToActivate"); |
| (...skipping 529 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 943 commit_completion_event_on_impl_thread_ = NULL; | 965 commit_completion_event_on_impl_thread_ = NULL; |
| 944 } else { | 966 } else { |
| 945 commit_completion_event_on_impl_thread_->Signal(); | 967 commit_completion_event_on_impl_thread_->Signal(); |
| 946 commit_completion_event_on_impl_thread_ = NULL; | 968 commit_completion_event_on_impl_thread_ = NULL; |
| 947 } | 969 } |
| 948 | 970 |
| 949 commit_complete_time_ = base::TimeTicks::HighResNow(); | 971 commit_complete_time_ = base::TimeTicks::HighResNow(); |
| 950 begin_frame_to_commit_duration_history_.InsertSample( | 972 begin_frame_to_commit_duration_history_.InsertSample( |
| 951 commit_complete_time_ - begin_frame_sent_to_main_thread_time_); | 973 commit_complete_time_ - begin_frame_sent_to_main_thread_time_); |
| 952 | 974 |
| 975 // The commit may have added animations, requiring us to start |
| 976 // background ticking. |
| 977 UpdateBackgroundAnimateTicking(); |
| 978 |
| 953 // SetVisible kicks off the next scheduler action, so this must be last. | 979 // SetVisible kicks off the next scheduler action, so this must be last. |
| 954 scheduler_on_impl_thread_->SetVisible(layer_tree_host_impl_->visible()); | 980 scheduler_on_impl_thread_->SetVisible(layer_tree_host_impl_->visible()); |
| 955 } | 981 } |
| 956 | 982 |
| 957 void ThreadProxy::ScheduledActionUpdateVisibleTiles() { | 983 void ThreadProxy::ScheduledActionUpdateVisibleTiles() { |
| 958 DCHECK(IsImplThread()); | 984 DCHECK(IsImplThread()); |
| 959 TRACE_EVENT0("cc", "ThreadProxy::ScheduledActionUpdateVisibleTiles"); | 985 TRACE_EVENT0("cc", "ThreadProxy::ScheduledActionUpdateVisibleTiles"); |
| 960 layer_tree_host_impl_->UpdateVisibleTiles(); | 986 layer_tree_host_impl_->UpdateVisibleTiles(); |
| 961 } | 987 } |
| 962 | 988 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 984 result.did_swap = false; | 1010 result.did_swap = false; |
| 985 DCHECK(IsImplThread()); | 1011 DCHECK(IsImplThread()); |
| 986 DCHECK(layer_tree_host_impl_.get()); | 1012 DCHECK(layer_tree_host_impl_.get()); |
| 987 if (!layer_tree_host_impl_) | 1013 if (!layer_tree_host_impl_) |
| 988 return result; | 1014 return result; |
| 989 | 1015 |
| 990 DCHECK(layer_tree_host_impl_->renderer()); | 1016 DCHECK(layer_tree_host_impl_->renderer()); |
| 991 if (!layer_tree_host_impl_->renderer()) | 1017 if (!layer_tree_host_impl_->renderer()) |
| 992 return result; | 1018 return result; |
| 993 | 1019 |
| 994 base::TimeTicks monotonic_time = | |
| 995 layer_tree_host_impl_->CurrentFrameTimeTicks(); | |
| 996 base::Time wall_clock_time = layer_tree_host_impl_->CurrentFrameTime(); | |
| 997 | |
| 998 // TODO(enne): This should probably happen post-animate. | |
| 999 if (layer_tree_host_impl_->pending_tree()) | |
| 1000 layer_tree_host_impl_->pending_tree()->UpdateDrawProperties(); | |
| 1001 layer_tree_host_impl_->Animate(monotonic_time, wall_clock_time); | |
| 1002 UpdateBackgroundAnimateTicking(); | |
| 1003 | |
| 1004 base::TimeTicks start_time = base::TimeTicks::HighResNow(); | 1020 base::TimeTicks start_time = base::TimeTicks::HighResNow(); |
| 1005 base::TimeDelta draw_duration_estimate = DrawDurationEstimate(); | 1021 base::TimeDelta draw_duration_estimate = DrawDurationEstimate(); |
| 1006 base::AutoReset<bool> mark_inside(&inside_draw_, true); | 1022 base::AutoReset<bool> mark_inside(&inside_draw_, true); |
| 1007 | 1023 |
| 1008 // This method is called on a forced draw, regardless of whether we are able | 1024 // This method is called on a forced draw, regardless of whether we are able |
| 1009 // to produce a frame, as the calling site on main thread is blocked until its | 1025 // to produce a frame, as the calling site on main thread is blocked until its |
| 1010 // request completes, and we signal completion here. If CanDraw() is false, we | 1026 // request completes, and we signal completion here. If CanDraw() is false, we |
| 1011 // will indicate success=false to the caller, but we must still signal | 1027 // will indicate success=false to the caller, but we must still signal |
| 1012 // completion to avoid deadlock. | 1028 // completion to avoid deadlock. |
| 1013 | 1029 |
| 1014 // We guard PrepareToDraw() with CanDraw() because it always returns a valid | 1030 // We guard PrepareToDraw() with CanDraw() because it always returns a valid |
| 1015 // frame, so can only be used when such a frame is possible. Since | 1031 // frame, so can only be used when such a frame is possible. Since |
| 1016 // DrawLayers() depends on the result of PrepareToDraw(), it is guarded on | 1032 // DrawLayers() depends on the result of PrepareToDraw(), it is guarded on |
| 1017 // CanDraw() as well. | 1033 // CanDraw() as well. |
| 1018 | 1034 |
| 1019 // readback_request_on_impl_thread_ may be for the pending tree, do | |
| 1020 // not perform the readback unless explicitly requested. | |
| 1021 bool drawing_for_readback = | 1035 bool drawing_for_readback = |
| 1022 readback_requested && !!readback_request_on_impl_thread_; | 1036 readback_requested && !!readback_request_on_impl_thread_; |
| 1023 bool can_do_readback = layer_tree_host_impl_->renderer()->CanReadPixels(); | 1037 bool can_do_readback = layer_tree_host_impl_->renderer()->CanReadPixels(); |
| 1024 | 1038 |
| 1025 LayerTreeHostImpl::FrameData frame; | 1039 LayerTreeHostImpl::FrameData frame; |
| 1026 bool draw_frame = false; | 1040 bool draw_frame = false; |
| 1027 bool start_ready_animations = true; | |
| 1028 | 1041 |
| 1029 if (layer_tree_host_impl_->CanDraw() && | 1042 if (layer_tree_host_impl_->CanDraw() && |
| 1030 (!drawing_for_readback || can_do_readback)) { | 1043 (!drawing_for_readback || can_do_readback)) { |
| 1031 // If it is for a readback, make sure we draw the portion being read back. | 1044 // If it is for a readback, make sure we draw the portion being read back. |
| 1032 gfx::Rect readback_rect; | 1045 gfx::Rect readback_rect; |
| 1033 if (drawing_for_readback) | 1046 if (drawing_for_readback) |
| 1034 readback_rect = readback_request_on_impl_thread_->rect; | 1047 readback_rect = readback_request_on_impl_thread_->rect; |
| 1035 | 1048 |
| 1036 // Do not start animations if we skip drawing the frame to avoid | |
| 1037 // checkerboarding. | |
| 1038 if (layer_tree_host_impl_->PrepareToDraw(&frame, readback_rect) || | 1049 if (layer_tree_host_impl_->PrepareToDraw(&frame, readback_rect) || |
| 1039 forced_draw) | 1050 forced_draw) |
| 1040 draw_frame = true; | 1051 draw_frame = true; |
| 1041 else | |
| 1042 start_ready_animations = false; | |
| 1043 } | 1052 } |
| 1044 | 1053 |
| 1054 frame_did_draw_ = draw_frame; |
| 1055 |
| 1045 if (draw_frame) { | 1056 if (draw_frame) { |
| 1046 layer_tree_host_impl_->DrawLayers( | 1057 layer_tree_host_impl_->DrawLayers( |
| 1047 &frame, | 1058 &frame, |
| 1048 scheduler_on_impl_thread_->LastBeginFrameOnImplThreadTime()); | 1059 scheduler_on_impl_thread_->LastBeginFrameOnImplThreadTime()); |
| 1049 result.did_draw = true; | 1060 result.did_draw = true; |
| 1050 } | 1061 } |
| 1051 layer_tree_host_impl_->DidDrawAllLayers(frame); | 1062 layer_tree_host_impl_->DidDrawAllLayers(frame); |
| 1052 layer_tree_host_impl_->UpdateAnimationState(start_ready_animations); | |
| 1053 | 1063 |
| 1054 // Check for a pending CompositeAndReadback. | 1064 // Check for a pending CompositeAndReadback. |
| 1055 if (drawing_for_readback) { | 1065 if (drawing_for_readback) { |
| 1056 DCHECK(!swap_requested); | 1066 DCHECK(!swap_requested); |
| 1057 result.did_readback = false; | 1067 result.did_readback = false; |
| 1058 if (draw_frame) { | 1068 if (draw_frame) { |
| 1059 layer_tree_host_impl_->Readback(readback_request_on_impl_thread_->pixels, | 1069 layer_tree_host_impl_->Readback(readback_request_on_impl_thread_->pixels, |
| 1060 readback_request_on_impl_thread_->rect); | 1070 readback_request_on_impl_thread_->rect); |
| 1061 result.did_readback = !layer_tree_host_impl_->IsContextLost(); | 1071 result.did_readback = !layer_tree_host_impl_->IsContextLost(); |
| 1062 } | 1072 } |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1178 TRACE_EVENT0("cc", "ThreadProxy::ScheduledActionDrawAndReadback"); | 1188 TRACE_EVENT0("cc", "ThreadProxy::ScheduledActionDrawAndReadback"); |
| 1179 bool forced_draw = true; | 1189 bool forced_draw = true; |
| 1180 bool swap_requested = false; | 1190 bool swap_requested = false; |
| 1181 bool readback_requested = true; | 1191 bool readback_requested = true; |
| 1182 return DrawSwapReadbackInternal( | 1192 return DrawSwapReadbackInternal( |
| 1183 forced_draw, swap_requested, readback_requested); | 1193 forced_draw, swap_requested, readback_requested); |
| 1184 } | 1194 } |
| 1185 | 1195 |
| 1186 void ThreadProxy::DidAnticipatedDrawTimeChange(base::TimeTicks time) { | 1196 void ThreadProxy::DidAnticipatedDrawTimeChange(base::TimeTicks time) { |
| 1187 if (current_resource_update_controller_on_impl_thread_) | 1197 if (current_resource_update_controller_on_impl_thread_) |
| 1188 current_resource_update_controller_on_impl_thread_ | 1198 current_resource_update_controller_on_impl_thread_->PerformMoreUpdates( |
| 1189 ->PerformMoreUpdates(time); | 1199 time); |
| 1190 layer_tree_host_impl_->ResetCurrentFrameTimeForNextFrame(); | |
| 1191 } | 1200 } |
| 1192 | 1201 |
| 1193 base::TimeDelta ThreadProxy::DrawDurationEstimate() { | 1202 base::TimeDelta ThreadProxy::DrawDurationEstimate() { |
| 1194 base::TimeDelta historical_estimate = | 1203 base::TimeDelta historical_estimate = |
| 1195 draw_duration_history_.Percentile(kDrawDurationEstimationPercentile); | 1204 draw_duration_history_.Percentile(kDrawDurationEstimationPercentile); |
| 1196 base::TimeDelta padding = base::TimeDelta::FromMicroseconds( | 1205 base::TimeDelta padding = base::TimeDelta::FromMicroseconds( |
| 1197 kDrawDurationEstimatePaddingInMicroseconds); | 1206 kDrawDurationEstimatePaddingInMicroseconds); |
| 1198 return historical_estimate + padding; | 1207 return historical_estimate + padding; |
| 1199 } | 1208 } |
| 1200 | 1209 |
| 1201 base::TimeDelta ThreadProxy::BeginFrameToCommitDurationEstimate() { | 1210 base::TimeDelta ThreadProxy::BeginFrameToCommitDurationEstimate() { |
| 1202 return begin_frame_to_commit_duration_history_.Percentile( | 1211 return begin_frame_to_commit_duration_history_.Percentile( |
| 1203 kCommitAndActivationDurationEstimationPercentile); | 1212 kCommitAndActivationDurationEstimationPercentile); |
| 1204 } | 1213 } |
| 1205 | 1214 |
| 1206 base::TimeDelta ThreadProxy::CommitToActivateDurationEstimate() { | 1215 base::TimeDelta ThreadProxy::CommitToActivateDurationEstimate() { |
| 1207 return commit_to_activate_duration_history_.Percentile( | 1216 return commit_to_activate_duration_history_.Percentile( |
| 1208 kCommitAndActivationDurationEstimationPercentile); | 1217 kCommitAndActivationDurationEstimationPercentile); |
| 1209 } | 1218 } |
| 1210 | 1219 |
| 1220 void ThreadProxy::PostBeginFrameDeadline(const base::Closure& closure, |
| 1221 base::TimeTicks deadline) { |
| 1222 base::TimeDelta delta = deadline - base::TimeTicks::Now(); |
| 1223 if (delta <= base::TimeDelta()) |
| 1224 delta = base::TimeDelta(); |
| 1225 Proxy::ImplThreadTaskRunner()->PostDelayedTask(FROM_HERE, closure, delta); |
| 1226 } |
| 1227 |
| 1211 void ThreadProxy::ReadyToFinalizeTextureUpdates() { | 1228 void ThreadProxy::ReadyToFinalizeTextureUpdates() { |
| 1212 DCHECK(IsImplThread()); | 1229 DCHECK(IsImplThread()); |
| 1213 scheduler_on_impl_thread_->FinishCommit(); | 1230 scheduler_on_impl_thread_->FinishCommit(); |
| 1214 } | 1231 } |
| 1215 | 1232 |
| 1216 void ThreadProxy::DidCommitAndDrawFrame() { | 1233 void ThreadProxy::DidCommitAndDrawFrame() { |
| 1217 DCHECK(IsMainThread()); | 1234 DCHECK(IsMainThread()); |
| 1218 if (!layer_tree_host_) | 1235 if (!layer_tree_host_) |
| 1219 return; | 1236 return; |
| 1220 layer_tree_host_->DidCommitAndDrawFrame(); | 1237 layer_tree_host_->DidCommitAndDrawFrame(); |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1271 scheduler_on_impl_thread_->HasInitializedOutputSurface(); | 1288 scheduler_on_impl_thread_->HasInitializedOutputSurface(); |
| 1272 completion->Signal(); | 1289 completion->Signal(); |
| 1273 } | 1290 } |
| 1274 | 1291 |
| 1275 void ThreadProxy::InitializeImplOnImplThread(CompletionEvent* completion) { | 1292 void ThreadProxy::InitializeImplOnImplThread(CompletionEvent* completion) { |
| 1276 TRACE_EVENT0("cc", "ThreadProxy::InitializeImplOnImplThread"); | 1293 TRACE_EVENT0("cc", "ThreadProxy::InitializeImplOnImplThread"); |
| 1277 DCHECK(IsImplThread()); | 1294 DCHECK(IsImplThread()); |
| 1278 layer_tree_host_impl_ = layer_tree_host_->CreateLayerTreeHostImpl(this); | 1295 layer_tree_host_impl_ = layer_tree_host_->CreateLayerTreeHostImpl(this); |
| 1279 const LayerTreeSettings& settings = layer_tree_host_->settings(); | 1296 const LayerTreeSettings& settings = layer_tree_host_->settings(); |
| 1280 SchedulerSettings scheduler_settings; | 1297 SchedulerSettings scheduler_settings; |
| 1298 scheduler_settings.deadline_scheduling_enabled = |
| 1299 settings.deadline_scheduling_enabled; |
| 1281 scheduler_settings.impl_side_painting = settings.impl_side_painting; | 1300 scheduler_settings.impl_side_painting = settings.impl_side_painting; |
| 1282 scheduler_settings.timeout_and_draw_when_animation_checkerboards = | 1301 scheduler_settings.timeout_and_draw_when_animation_checkerboards = |
| 1283 settings.timeout_and_draw_when_animation_checkerboards; | 1302 settings.timeout_and_draw_when_animation_checkerboards; |
| 1284 scheduler_settings.using_synchronous_renderer_compositor = | 1303 scheduler_settings.using_synchronous_renderer_compositor = |
| 1285 settings.using_synchronous_renderer_compositor; | 1304 settings.using_synchronous_renderer_compositor; |
| 1286 scheduler_settings.throttle_frame_production = | 1305 scheduler_settings.throttle_frame_production = |
| 1287 settings.throttle_frame_production; | 1306 settings.throttle_frame_production; |
| 1307 scheduler_settings.use_begin_frame_workaround_for_crbug_249806 = true; |
| 1288 scheduler_on_impl_thread_ = Scheduler::Create(this, scheduler_settings); | 1308 scheduler_on_impl_thread_ = Scheduler::Create(this, scheduler_settings); |
| 1289 scheduler_on_impl_thread_->SetVisible(layer_tree_host_impl_->visible()); | 1309 scheduler_on_impl_thread_->SetVisible(layer_tree_host_impl_->visible()); |
| 1290 | 1310 |
| 1291 impl_thread_weak_ptr_ = weak_factory_on_impl_thread_.GetWeakPtr(); | 1311 impl_thread_weak_ptr_ = weak_factory_on_impl_thread_.GetWeakPtr(); |
| 1292 completion->Signal(); | 1312 completion->Signal(); |
| 1293 } | 1313 } |
| 1294 | 1314 |
| 1295 void ThreadProxy::InitializeOutputSurfaceOnImplThread( | 1315 void ThreadProxy::InitializeOutputSurfaceOnImplThread( |
| 1296 CompletionEvent* completion, | 1316 CompletionEvent* completion, |
| 1297 scoped_ptr<OutputSurface> output_surface, | 1317 scoped_ptr<OutputSurface> output_surface, |
| (...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1517 completion_event_for_commit_held_on_tree_activation_ = NULL; | 1537 completion_event_for_commit_held_on_tree_activation_ = NULL; |
| 1518 } | 1538 } |
| 1519 | 1539 |
| 1520 UpdateBackgroundAnimateTicking(); | 1540 UpdateBackgroundAnimateTicking(); |
| 1521 | 1541 |
| 1522 commit_to_activate_duration_history_.InsertSample( | 1542 commit_to_activate_duration_history_.InsertSample( |
| 1523 base::TimeTicks::HighResNow() - commit_complete_time_); | 1543 base::TimeTicks::HighResNow() - commit_complete_time_); |
| 1524 } | 1544 } |
| 1525 | 1545 |
| 1526 } // namespace cc | 1546 } // namespace cc |
| OLD | NEW |