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 "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/base/thread.h" | 10 #include "cc/base/thread.h" |
(...skipping 1107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1118 *initialize_succeeded = layer_tree_host_impl_->InitializeRenderer( | 1118 *initialize_succeeded = layer_tree_host_impl_->InitializeRenderer( |
1119 output_surface_before_initialization_on_impl_thread_.Pass()); | 1119 output_surface_before_initialization_on_impl_thread_.Pass()); |
1120 if (*initialize_succeeded) { | 1120 if (*initialize_succeeded) { |
1121 *capabilities = layer_tree_host_impl_->GetRendererCapabilities(); | 1121 *capabilities = layer_tree_host_impl_->GetRendererCapabilities(); |
1122 scheduler_on_impl_thread_->SetSwapBuffersCompleteSupported( | 1122 scheduler_on_impl_thread_->SetSwapBuffersCompleteSupported( |
1123 capabilities->using_swap_complete_callback); | 1123 capabilities->using_swap_complete_callback); |
1124 | 1124 |
1125 int maxFramesPending = layer_tree_host_impl_->output_surface()-> | 1125 int maxFramesPending = layer_tree_host_impl_->output_surface()-> |
1126 capabilities().max_frames_pending; | 1126 capabilities().max_frames_pending; |
1127 if (maxFramesPending <= 0) | 1127 if (maxFramesPending <= 0) |
1128 maxFramesPending = FrameRateController::kDefaultMaxFramesPending; | 1128 maxFramesPending = FrameRateController::DEFAULT_MAX_FRAMES_PENDING; |
1129 if (layer_tree_host_impl_->output_surface()->capabilities(). | 1129 if (layer_tree_host_impl_->output_surface()->capabilities(). |
1130 has_parent_compositor) | 1130 has_parent_compositor) |
1131 maxFramesPending = 1; | 1131 maxFramesPending = 1; |
1132 scheduler_on_impl_thread_->SetMaxFramesPending(maxFramesPending); | 1132 scheduler_on_impl_thread_->SetMaxFramesPending(maxFramesPending); |
1133 } | 1133 } |
1134 | 1134 |
1135 completion->Signal(); | 1135 completion->Signal(); |
1136 } | 1136 } |
1137 | 1137 |
1138 void ThreadProxy::LayerTreeHostClosedOnImplThread(CompletionEvent* completion) { | 1138 void ThreadProxy::LayerTreeHostClosedOnImplThread(CompletionEvent* completion) { |
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1332 base::Bind(&ThreadProxy::StartScrollbarAnimationOnImplThread, | 1332 base::Bind(&ThreadProxy::StartScrollbarAnimationOnImplThread, |
1333 impl_thread_weak_ptr_), | 1333 impl_thread_weak_ptr_), |
1334 delay); | 1334 delay); |
1335 } | 1335 } |
1336 | 1336 |
1337 void ThreadProxy::StartScrollbarAnimationOnImplThread() { | 1337 void ThreadProxy::StartScrollbarAnimationOnImplThread() { |
1338 layer_tree_host_impl_->StartScrollbarAnimation(base::TimeTicks::Now()); | 1338 layer_tree_host_impl_->StartScrollbarAnimation(base::TimeTicks::Now()); |
1339 } | 1339 } |
1340 | 1340 |
1341 } // namespace cc | 1341 } // namespace cc |
OLD | NEW |