| 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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 created_offscreen_context_provider_(false), | 73 created_offscreen_context_provider_(false), |
| 74 layer_tree_host_(layer_tree_host), | 74 layer_tree_host_(layer_tree_host), |
| 75 started_(false), | 75 started_(false), |
| 76 textures_acquired_(true), | 76 textures_acquired_(true), |
| 77 in_composite_and_readback_(false), | 77 in_composite_and_readback_(false), |
| 78 manage_tiles_pending_(false), | 78 manage_tiles_pending_(false), |
| 79 commit_waits_for_activation_(false), | 79 commit_waits_for_activation_(false), |
| 80 inside_commit_(false), | 80 inside_commit_(false), |
| 81 weak_factory_on_impl_thread_(this), | 81 weak_factory_on_impl_thread_(this), |
| 82 weak_factory_(this), | 82 weak_factory_(this), |
| 83 frame_did_draw_(false), |
| 83 begin_frame_sent_to_main_thread_completion_event_on_impl_thread_(NULL), | 84 begin_frame_sent_to_main_thread_completion_event_on_impl_thread_(NULL), |
| 84 readback_request_on_impl_thread_(NULL), | 85 readback_request_on_impl_thread_(NULL), |
| 85 commit_completion_event_on_impl_thread_(NULL), | 86 commit_completion_event_on_impl_thread_(NULL), |
| 86 completion_event_for_commit_held_on_tree_activation_(NULL), | 87 completion_event_for_commit_held_on_tree_activation_(NULL), |
| 87 texture_acquisition_completion_event_on_impl_thread_(NULL), | 88 texture_acquisition_completion_event_on_impl_thread_(NULL), |
| 88 next_frame_is_newly_committed_frame_on_impl_thread_(false), | 89 next_frame_is_newly_committed_frame_on_impl_thread_(false), |
| 89 throttle_frame_production_( | 90 throttle_frame_production_(layer_tree_host->settings() |
| 90 layer_tree_host->settings().throttle_frame_production), | 91 .throttle_frame_production), |
| 91 begin_frame_scheduling_enabled_( | 92 begin_frame_scheduling_enabled_(layer_tree_host->settings() |
| 92 layer_tree_host->settings().begin_frame_scheduling_enabled), | 93 .begin_frame_scheduling_enabled), |
| 93 using_synchronous_renderer_compositor_( | 94 using_synchronous_renderer_compositor_( |
| 94 layer_tree_host->settings().using_synchronous_renderer_compositor), | 95 layer_tree_host->settings().using_synchronous_renderer_compositor), |
| 95 inside_draw_(false), | 96 inside_draw_(false), |
| 96 can_cancel_commit_(true), | 97 can_cancel_commit_(true), |
| 97 defer_commits_(false), | 98 defer_commits_(false), |
| 98 input_throttled_until_commit_(false), | 99 input_throttled_until_commit_(false), |
| 99 renew_tree_priority_on_impl_thread_pending_(false), | 100 renew_tree_priority_on_impl_thread_pending_(false), |
| 100 draw_duration_history_(kDurationHistorySize), | 101 draw_duration_history_(kDurationHistorySize), |
| 101 begin_frame_to_commit_duration_history_(kDurationHistorySize), | 102 begin_frame_to_commit_duration_history_(kDurationHistorySize), |
| 102 commit_to_activate_duration_history_(kDurationHistorySize) { | 103 commit_to_activate_duration_history_(kDurationHistorySize) { |
| (...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 390 Proxy::MainThreadTaskRunner()->PostTask( | 391 Proxy::MainThreadTaskRunner()->PostTask( |
| 391 FROM_HERE, | 392 FROM_HERE, |
| 392 base::Bind(&ThreadProxy::DidCompleteSwapBuffers, main_thread_weak_ptr_)); | 393 base::Bind(&ThreadProxy::DidCompleteSwapBuffers, main_thread_weak_ptr_)); |
| 393 } | 394 } |
| 394 | 395 |
| 395 void ThreadProxy::SetNeedsBeginFrameOnImplThread(bool enable) { | 396 void ThreadProxy::SetNeedsBeginFrameOnImplThread(bool enable) { |
| 396 DCHECK(IsImplThread()); | 397 DCHECK(IsImplThread()); |
| 397 TRACE_EVENT1("cc", "ThreadProxy::SetNeedsBeginFrameOnImplThread", | 398 TRACE_EVENT1("cc", "ThreadProxy::SetNeedsBeginFrameOnImplThread", |
| 398 "enable", enable); | 399 "enable", enable); |
| 399 layer_tree_host_impl_->SetNeedsBeginFrame(enable); | 400 layer_tree_host_impl_->SetNeedsBeginFrame(enable); |
| 401 UpdateBackgroundAnimateTicking(); |
| 400 } | 402 } |
| 401 | 403 |
| 402 void ThreadProxy::BeginFrameOnImplThread(const BeginFrameArgs& args) { | 404 void ThreadProxy::BeginFrameOnImplThread(const BeginFrameArgs& args) { |
| 403 DCHECK(IsImplThread()); | 405 DCHECK(IsImplThread()); |
| 404 TRACE_EVENT0("cc", "ThreadProxy::BeginFrameOnImplThread"); | 406 TRACE_EVENT0("cc", "ThreadProxy::BeginFrameOnImplThread"); |
| 407 |
| 408 base::TimeTicks monotonic_time = |
| 409 layer_tree_host_impl_->CurrentFrameTimeTicks(); |
| 410 base::Time wall_clock_time = layer_tree_host_impl_->CurrentFrameTime(); |
| 411 if (layer_tree_host_impl_->active_tree()->root_layer()) |
| 412 layer_tree_host_impl_->Animate(monotonic_time, wall_clock_time); |
| 413 |
| 414 // Reinitialize for the current frame. |
| 415 frame_did_draw_ = false; |
| 416 |
| 405 scheduler_on_impl_thread_->BeginFrame(args); | 417 scheduler_on_impl_thread_->BeginFrame(args); |
| 406 } | 418 } |
| 407 | 419 |
| 420 void ThreadProxy::DidBeginFrameDeadlineOnImplThread() { |
| 421 // Do not start animations if we skip drawing the frame to avoid |
| 422 // checkerboarding. |
| 423 if (layer_tree_host_impl_->active_tree()->root_layer()) { |
| 424 layer_tree_host_impl_->UpdateAnimationState( |
| 425 frame_did_draw_ || !layer_tree_host_impl_->CanDraw()); |
| 426 } |
| 427 layer_tree_host_impl_->ResetCurrentFrameTimeForNextFrame(); |
| 428 } |
| 429 |
| 408 void ThreadProxy::OnCanDrawStateChanged(bool can_draw) { | 430 void ThreadProxy::OnCanDrawStateChanged(bool can_draw) { |
| 409 DCHECK(IsImplThread()); | 431 DCHECK(IsImplThread()); |
| 410 TRACE_EVENT1( | 432 TRACE_EVENT1( |
| 411 "cc", "ThreadProxy::OnCanDrawStateChanged", "can_draw", can_draw); | 433 "cc", "ThreadProxy::OnCanDrawStateChanged", "can_draw", can_draw); |
| 412 scheduler_on_impl_thread_->SetCanDraw(can_draw); | 434 scheduler_on_impl_thread_->SetCanDraw(can_draw); |
| 413 UpdateBackgroundAnimateTicking(); | 435 UpdateBackgroundAnimateTicking(); |
| 414 } | 436 } |
| 415 | 437 |
| 416 void ThreadProxy::NotifyReadyToActivate() { | 438 void ThreadProxy::NotifyReadyToActivate() { |
| 417 TRACE_EVENT0("cc", "ThreadProxy::NotifyReadyToActivate"); | 439 TRACE_EVENT0("cc", "ThreadProxy::NotifyReadyToActivate"); |
| (...skipping 544 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 962 commit_completion_event_on_impl_thread_->Signal(); | 984 commit_completion_event_on_impl_thread_->Signal(); |
| 963 commit_completion_event_on_impl_thread_ = NULL; | 985 commit_completion_event_on_impl_thread_ = NULL; |
| 964 } | 986 } |
| 965 | 987 |
| 966 commit_waits_for_activation_ = false; | 988 commit_waits_for_activation_ = false; |
| 967 | 989 |
| 968 commit_complete_time_ = base::TimeTicks::HighResNow(); | 990 commit_complete_time_ = base::TimeTicks::HighResNow(); |
| 969 begin_frame_to_commit_duration_history_.InsertSample( | 991 begin_frame_to_commit_duration_history_.InsertSample( |
| 970 commit_complete_time_ - begin_frame_sent_to_main_thread_time_); | 992 commit_complete_time_ - begin_frame_sent_to_main_thread_time_); |
| 971 | 993 |
| 994 // The commit may have added animations, requiring us to start |
| 995 // background ticking. |
| 996 UpdateBackgroundAnimateTicking(); |
| 997 |
| 972 // SetVisible kicks off the next scheduler action, so this must be last. | 998 // SetVisible kicks off the next scheduler action, so this must be last. |
| 973 scheduler_on_impl_thread_->SetVisible(layer_tree_host_impl_->visible()); | 999 scheduler_on_impl_thread_->SetVisible(layer_tree_host_impl_->visible()); |
| 974 } | 1000 } |
| 975 | 1001 |
| 976 void ThreadProxy::ScheduledActionUpdateVisibleTiles() { | 1002 void ThreadProxy::ScheduledActionUpdateVisibleTiles() { |
| 977 DCHECK(IsImplThread()); | 1003 DCHECK(IsImplThread()); |
| 978 TRACE_EVENT0("cc", "ThreadProxy::ScheduledActionUpdateVisibleTiles"); | 1004 TRACE_EVENT0("cc", "ThreadProxy::ScheduledActionUpdateVisibleTiles"); |
| 979 layer_tree_host_impl_->UpdateVisibleTiles(); | 1005 layer_tree_host_impl_->UpdateVisibleTiles(); |
| 980 } | 1006 } |
| 981 | 1007 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 1004 result.did_readback = false; | 1030 result.did_readback = false; |
| 1005 DCHECK(IsImplThread()); | 1031 DCHECK(IsImplThread()); |
| 1006 DCHECK(layer_tree_host_impl_.get()); | 1032 DCHECK(layer_tree_host_impl_.get()); |
| 1007 if (!layer_tree_host_impl_) | 1033 if (!layer_tree_host_impl_) |
| 1008 return result; | 1034 return result; |
| 1009 | 1035 |
| 1010 DCHECK(layer_tree_host_impl_->renderer()); | 1036 DCHECK(layer_tree_host_impl_->renderer()); |
| 1011 if (!layer_tree_host_impl_->renderer()) | 1037 if (!layer_tree_host_impl_->renderer()) |
| 1012 return result; | 1038 return result; |
| 1013 | 1039 |
| 1014 base::TimeTicks monotonic_time = | |
| 1015 layer_tree_host_impl_->CurrentFrameTimeTicks(); | |
| 1016 base::Time wall_clock_time = layer_tree_host_impl_->CurrentFrameTime(); | |
| 1017 | |
| 1018 // TODO(enne): This should probably happen post-animate. | |
| 1019 if (layer_tree_host_impl_->pending_tree()) | |
| 1020 layer_tree_host_impl_->pending_tree()->UpdateDrawProperties(); | |
| 1021 layer_tree_host_impl_->Animate(monotonic_time, wall_clock_time); | |
| 1022 UpdateBackgroundAnimateTicking(); | |
| 1023 | |
| 1024 base::TimeTicks start_time = base::TimeTicks::HighResNow(); | 1040 base::TimeTicks start_time = base::TimeTicks::HighResNow(); |
| 1025 base::TimeDelta draw_duration_estimate = DrawDurationEstimate(); | 1041 base::TimeDelta draw_duration_estimate = DrawDurationEstimate(); |
| 1026 base::AutoReset<bool> mark_inside(&inside_draw_, true); | 1042 base::AutoReset<bool> mark_inside(&inside_draw_, true); |
| 1027 | 1043 |
| 1028 // This method is called on a forced draw, regardless of whether we are able | 1044 // This method is called on a forced draw, regardless of whether we are able |
| 1029 // to produce a frame, as the calling site on main thread is blocked until its | 1045 // to produce a frame, as the calling site on main thread is blocked until its |
| 1030 // request completes, and we signal completion here. If CanDraw() is false, we | 1046 // request completes, and we signal completion here. If CanDraw() is false, we |
| 1031 // will indicate success=false to the caller, but we must still signal | 1047 // will indicate success=false to the caller, but we must still signal |
| 1032 // completion to avoid deadlock. | 1048 // completion to avoid deadlock. |
| 1033 | 1049 |
| 1034 // We guard PrepareToDraw() with CanDraw() because it always returns a valid | 1050 // We guard PrepareToDraw() with CanDraw() because it always returns a valid |
| 1035 // frame, so can only be used when such a frame is possible. Since | 1051 // frame, so can only be used when such a frame is possible. Since |
| 1036 // DrawLayers() depends on the result of PrepareToDraw(), it is guarded on | 1052 // DrawLayers() depends on the result of PrepareToDraw(), it is guarded on |
| 1037 // CanDraw() as well. | 1053 // CanDraw() as well. |
| 1038 | 1054 |
| 1039 // readback_request_on_impl_thread_ may be for the pending tree, do | |
| 1040 // not perform the readback unless explicitly requested. | |
| 1041 bool drawing_for_readback = | 1055 bool drawing_for_readback = |
| 1042 readback_requested && !!readback_request_on_impl_thread_; | 1056 readback_requested && !!readback_request_on_impl_thread_; |
| 1043 bool can_do_readback = layer_tree_host_impl_->renderer()->CanReadPixels(); | 1057 bool can_do_readback = layer_tree_host_impl_->renderer()->CanReadPixels(); |
| 1044 | 1058 |
| 1045 LayerTreeHostImpl::FrameData frame; | 1059 LayerTreeHostImpl::FrameData frame; |
| 1046 bool draw_frame = false; | 1060 bool draw_frame = false; |
| 1047 bool start_ready_animations = true; | |
| 1048 | 1061 |
| 1049 if (layer_tree_host_impl_->CanDraw() && | 1062 if (layer_tree_host_impl_->CanDraw() && |
| 1050 (!drawing_for_readback || can_do_readback)) { | 1063 (!drawing_for_readback || can_do_readback)) { |
| 1051 // If it is for a readback, make sure we draw the portion being read back. | 1064 // If it is for a readback, make sure we draw the portion being read back. |
| 1052 gfx::Rect readback_rect; | 1065 gfx::Rect readback_rect; |
| 1053 if (drawing_for_readback) | 1066 if (drawing_for_readback) |
| 1054 readback_rect = readback_request_on_impl_thread_->rect; | 1067 readback_rect = readback_request_on_impl_thread_->rect; |
| 1055 | 1068 |
| 1056 // Do not start animations if we skip drawing the frame to avoid | |
| 1057 // checkerboarding. | |
| 1058 if (layer_tree_host_impl_->PrepareToDraw(&frame, readback_rect) || | 1069 if (layer_tree_host_impl_->PrepareToDraw(&frame, readback_rect) || |
| 1059 forced_draw) | 1070 forced_draw) |
| 1060 draw_frame = true; | 1071 draw_frame = true; |
| 1061 else | |
| 1062 start_ready_animations = false; | |
| 1063 } | 1072 } |
| 1064 | 1073 |
| 1074 frame_did_draw_ = draw_frame; |
| 1075 |
| 1065 if (draw_frame) { | 1076 if (draw_frame) { |
| 1066 layer_tree_host_impl_->DrawLayers( | 1077 layer_tree_host_impl_->DrawLayers( |
| 1067 &frame, | 1078 &frame, |
| 1068 scheduler_on_impl_thread_->LastBeginFrameOnImplThreadTime()); | 1079 scheduler_on_impl_thread_->LastBeginFrameOnImplThreadTime()); |
| 1069 result.did_draw = true; | 1080 result.did_draw = true; |
| 1070 } | 1081 } |
| 1071 layer_tree_host_impl_->DidDrawAllLayers(frame); | 1082 layer_tree_host_impl_->DidDrawAllLayers(frame); |
| 1072 layer_tree_host_impl_->UpdateAnimationState(start_ready_animations); | |
| 1073 | 1083 |
| 1074 // Check for a pending CompositeAndReadback. | 1084 // Check for a pending CompositeAndReadback. |
| 1075 if (drawing_for_readback) { | 1085 if (drawing_for_readback) { |
| 1076 DCHECK(!swap_requested); | 1086 DCHECK(!swap_requested); |
| 1077 result.did_readback = false; | 1087 result.did_readback = false; |
| 1078 if (draw_frame && !layer_tree_host_impl_->IsContextLost()) { | 1088 if (draw_frame && !layer_tree_host_impl_->IsContextLost()) { |
| 1079 layer_tree_host_impl_->Readback(readback_request_on_impl_thread_->pixels, | 1089 layer_tree_host_impl_->Readback(readback_request_on_impl_thread_->pixels, |
| 1080 readback_request_on_impl_thread_->rect); | 1090 readback_request_on_impl_thread_->rect); |
| 1081 result.did_readback = true; | 1091 result.did_readback = true; |
| 1082 } | 1092 } |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1199 TRACE_EVENT0("cc", "ThreadProxy::ScheduledActionDrawAndReadback"); | 1209 TRACE_EVENT0("cc", "ThreadProxy::ScheduledActionDrawAndReadback"); |
| 1200 bool forced_draw = true; | 1210 bool forced_draw = true; |
| 1201 bool swap_requested = false; | 1211 bool swap_requested = false; |
| 1202 bool readback_requested = true; | 1212 bool readback_requested = true; |
| 1203 return DrawSwapReadbackInternal( | 1213 return DrawSwapReadbackInternal( |
| 1204 forced_draw, swap_requested, readback_requested); | 1214 forced_draw, swap_requested, readback_requested); |
| 1205 } | 1215 } |
| 1206 | 1216 |
| 1207 void ThreadProxy::DidAnticipatedDrawTimeChange(base::TimeTicks time) { | 1217 void ThreadProxy::DidAnticipatedDrawTimeChange(base::TimeTicks time) { |
| 1208 if (current_resource_update_controller_on_impl_thread_) | 1218 if (current_resource_update_controller_on_impl_thread_) |
| 1209 current_resource_update_controller_on_impl_thread_ | 1219 current_resource_update_controller_on_impl_thread_->PerformMoreUpdates( |
| 1210 ->PerformMoreUpdates(time); | 1220 time); |
| 1211 layer_tree_host_impl_->ResetCurrentFrameTimeForNextFrame(); | |
| 1212 } | 1221 } |
| 1213 | 1222 |
| 1214 base::TimeDelta ThreadProxy::DrawDurationEstimate() { | 1223 base::TimeDelta ThreadProxy::DrawDurationEstimate() { |
| 1215 base::TimeDelta historical_estimate = | 1224 base::TimeDelta historical_estimate = |
| 1216 draw_duration_history_.Percentile(kDrawDurationEstimationPercentile); | 1225 draw_duration_history_.Percentile(kDrawDurationEstimationPercentile); |
| 1217 base::TimeDelta padding = base::TimeDelta::FromMicroseconds( | 1226 base::TimeDelta padding = base::TimeDelta::FromMicroseconds( |
| 1218 kDrawDurationEstimatePaddingInMicroseconds); | 1227 kDrawDurationEstimatePaddingInMicroseconds); |
| 1219 return historical_estimate + padding; | 1228 return historical_estimate + padding; |
| 1220 } | 1229 } |
| 1221 | 1230 |
| 1222 base::TimeDelta ThreadProxy::BeginFrameToCommitDurationEstimate() { | 1231 base::TimeDelta ThreadProxy::BeginFrameToCommitDurationEstimate() { |
| 1223 return begin_frame_to_commit_duration_history_.Percentile( | 1232 return begin_frame_to_commit_duration_history_.Percentile( |
| 1224 kCommitAndActivationDurationEstimationPercentile); | 1233 kCommitAndActivationDurationEstimationPercentile); |
| 1225 } | 1234 } |
| 1226 | 1235 |
| 1227 base::TimeDelta ThreadProxy::CommitToActivateDurationEstimate() { | 1236 base::TimeDelta ThreadProxy::CommitToActivateDurationEstimate() { |
| 1228 return commit_to_activate_duration_history_.Percentile( | 1237 return commit_to_activate_duration_history_.Percentile( |
| 1229 kCommitAndActivationDurationEstimationPercentile); | 1238 kCommitAndActivationDurationEstimationPercentile); |
| 1230 } | 1239 } |
| 1231 | 1240 |
| 1241 void ThreadProxy::PostBeginFrameDeadline(const base::Closure& closure, |
| 1242 base::TimeTicks deadline) { |
| 1243 base::TimeDelta delta = deadline - base::TimeTicks::Now(); |
| 1244 if (delta <= base::TimeDelta()) |
| 1245 delta = base::TimeDelta(); |
| 1246 Proxy::ImplThreadTaskRunner()->PostDelayedTask(FROM_HERE, closure, delta); |
| 1247 } |
| 1248 |
| 1232 void ThreadProxy::ReadyToFinalizeTextureUpdates() { | 1249 void ThreadProxy::ReadyToFinalizeTextureUpdates() { |
| 1233 DCHECK(IsImplThread()); | 1250 DCHECK(IsImplThread()); |
| 1234 scheduler_on_impl_thread_->FinishCommit(); | 1251 scheduler_on_impl_thread_->FinishCommit(); |
| 1235 } | 1252 } |
| 1236 | 1253 |
| 1237 void ThreadProxy::DidCommitAndDrawFrame() { | 1254 void ThreadProxy::DidCommitAndDrawFrame() { |
| 1238 DCHECK(IsMainThread()); | 1255 DCHECK(IsMainThread()); |
| 1239 if (!layer_tree_host_) | 1256 if (!layer_tree_host_) |
| 1240 return; | 1257 return; |
| 1241 layer_tree_host_->DidCommitAndDrawFrame(); | 1258 layer_tree_host_->DidCommitAndDrawFrame(); |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1292 scheduler_on_impl_thread_->HasInitializedOutputSurface(); | 1309 scheduler_on_impl_thread_->HasInitializedOutputSurface(); |
| 1293 completion->Signal(); | 1310 completion->Signal(); |
| 1294 } | 1311 } |
| 1295 | 1312 |
| 1296 void ThreadProxy::InitializeImplOnImplThread(CompletionEvent* completion) { | 1313 void ThreadProxy::InitializeImplOnImplThread(CompletionEvent* completion) { |
| 1297 TRACE_EVENT0("cc", "ThreadProxy::InitializeImplOnImplThread"); | 1314 TRACE_EVENT0("cc", "ThreadProxy::InitializeImplOnImplThread"); |
| 1298 DCHECK(IsImplThread()); | 1315 DCHECK(IsImplThread()); |
| 1299 layer_tree_host_impl_ = layer_tree_host_->CreateLayerTreeHostImpl(this); | 1316 layer_tree_host_impl_ = layer_tree_host_->CreateLayerTreeHostImpl(this); |
| 1300 const LayerTreeSettings& settings = layer_tree_host_->settings(); | 1317 const LayerTreeSettings& settings = layer_tree_host_->settings(); |
| 1301 SchedulerSettings scheduler_settings; | 1318 SchedulerSettings scheduler_settings; |
| 1319 scheduler_settings.deadline_scheduling_enabled = |
| 1320 settings.deadline_scheduling_enabled; |
| 1302 scheduler_settings.impl_side_painting = settings.impl_side_painting; | 1321 scheduler_settings.impl_side_painting = settings.impl_side_painting; |
| 1303 scheduler_settings.timeout_and_draw_when_animation_checkerboards = | 1322 scheduler_settings.timeout_and_draw_when_animation_checkerboards = |
| 1304 settings.timeout_and_draw_when_animation_checkerboards; | 1323 settings.timeout_and_draw_when_animation_checkerboards; |
| 1305 scheduler_settings.maximum_number_of_failed_draws_before_draw_is_forced_ = | 1324 scheduler_settings.maximum_number_of_failed_draws_before_draw_is_forced_ = |
| 1306 settings.maximum_number_of_failed_draws_before_draw_is_forced_; | 1325 settings.maximum_number_of_failed_draws_before_draw_is_forced_; |
| 1307 scheduler_settings.using_synchronous_renderer_compositor = | 1326 scheduler_settings.using_synchronous_renderer_compositor = |
| 1308 settings.using_synchronous_renderer_compositor; | 1327 settings.using_synchronous_renderer_compositor; |
| 1309 scheduler_settings.throttle_frame_production = | 1328 scheduler_settings.throttle_frame_production = |
| 1310 settings.throttle_frame_production; | 1329 settings.throttle_frame_production; |
| 1330 scheduler_settings.use_begin_frame_workaround_for_crbug_249806 = true; |
| 1311 scheduler_on_impl_thread_ = Scheduler::Create(this, scheduler_settings); | 1331 scheduler_on_impl_thread_ = Scheduler::Create(this, scheduler_settings); |
| 1312 scheduler_on_impl_thread_->SetVisible(layer_tree_host_impl_->visible()); | 1332 scheduler_on_impl_thread_->SetVisible(layer_tree_host_impl_->visible()); |
| 1313 | 1333 |
| 1314 impl_thread_weak_ptr_ = weak_factory_on_impl_thread_.GetWeakPtr(); | 1334 impl_thread_weak_ptr_ = weak_factory_on_impl_thread_.GetWeakPtr(); |
| 1315 completion->Signal(); | 1335 completion->Signal(); |
| 1316 } | 1336 } |
| 1317 | 1337 |
| 1318 void ThreadProxy::InitializeOutputSurfaceOnImplThread( | 1338 void ThreadProxy::InitializeOutputSurfaceOnImplThread( |
| 1319 CompletionEvent* completion, | 1339 CompletionEvent* completion, |
| 1320 scoped_ptr<OutputSurface> output_surface, | 1340 scoped_ptr<OutputSurface> output_surface, |
| (...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1540 completion_event_for_commit_held_on_tree_activation_ = NULL; | 1560 completion_event_for_commit_held_on_tree_activation_ = NULL; |
| 1541 } | 1561 } |
| 1542 | 1562 |
| 1543 UpdateBackgroundAnimateTicking(); | 1563 UpdateBackgroundAnimateTicking(); |
| 1544 | 1564 |
| 1545 commit_to_activate_duration_history_.InsertSample( | 1565 commit_to_activate_duration_history_.InsertSample( |
| 1546 base::TimeTicks::HighResNow() - commit_complete_time_); | 1566 base::TimeTicks::HighResNow() - commit_complete_time_); |
| 1547 } | 1567 } |
| 1548 | 1568 |
| 1549 } // namespace cc | 1569 } // namespace cc |
| OLD | NEW |