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

Side by Side Diff: cc/thread_proxy.cc

Issue 12540003: CrOS: Set max frames pending for UI from command line. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase 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 | Annotate | Revision Log
« no previous file with comments | « cc/output_surface.h ('k') | chrome/browser/chromeos/login/chrome_restart_request.cc » ('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/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 1103 matching lines...) Expand 10 before | Expand all | Expand 10 after
1114 TRACE_EVENT0("cc", "ThreadProxy::InitializeRendererOnImplThread"); 1114 TRACE_EVENT0("cc", "ThreadProxy::InitializeRendererOnImplThread");
1115 DCHECK(IsImplThread()); 1115 DCHECK(IsImplThread());
1116 DCHECK(output_surface_before_initialization_on_impl_thread_.get()); 1116 DCHECK(output_surface_before_initialization_on_impl_thread_.get());
1117 *initialize_succeeded = layer_tree_host_impl_->InitializeRenderer( 1117 *initialize_succeeded = layer_tree_host_impl_->InitializeRenderer(
1118 output_surface_before_initialization_on_impl_thread_.Pass()); 1118 output_surface_before_initialization_on_impl_thread_.Pass());
1119 if (*initialize_succeeded) { 1119 if (*initialize_succeeded) {
1120 *capabilities = layer_tree_host_impl_->GetRendererCapabilities(); 1120 *capabilities = layer_tree_host_impl_->GetRendererCapabilities();
1121 scheduler_on_impl_thread_->setSwapBuffersCompleteSupported( 1121 scheduler_on_impl_thread_->setSwapBuffersCompleteSupported(
1122 capabilities->using_swap_complete_callback); 1122 capabilities->using_swap_complete_callback);
1123 1123
1124 int maxFramesPending = FrameRateController::kDefaultMaxFramesPending; 1124 int maxFramesPending = layer_tree_host_impl_->output_surface()->
1125 capabilities().max_frames_pending;
1126 if (maxFramesPending <= 0)
1127 maxFramesPending = FrameRateController::kDefaultMaxFramesPending;
1125 if (layer_tree_host_impl_->output_surface()->capabilities(). 1128 if (layer_tree_host_impl_->output_surface()->capabilities().
1126 has_parent_compositor) 1129 has_parent_compositor)
1127 maxFramesPending = 1; 1130 maxFramesPending = 1;
1128 scheduler_on_impl_thread_->setMaxFramesPending(maxFramesPending); 1131 scheduler_on_impl_thread_->setMaxFramesPending(maxFramesPending);
1129 } 1132 }
1130 1133
1131 completion->signal(); 1134 completion->signal();
1132 } 1135 }
1133 1136
1134 void ThreadProxy::LayerTreeHostClosedOnImplThread(CompletionEvent* completion) { 1137 void ThreadProxy::LayerTreeHostClosedOnImplThread(CompletionEvent* completion) {
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
1313 } 1316 }
1314 1317
1315 void ThreadProxy::RenewTreePriorityOnImplThread() { 1318 void ThreadProxy::RenewTreePriorityOnImplThread() {
1316 DCHECK(renew_tree_priority_on_impl_thread_pending_); 1319 DCHECK(renew_tree_priority_on_impl_thread_pending_);
1317 renew_tree_priority_on_impl_thread_pending_ = false; 1320 renew_tree_priority_on_impl_thread_pending_ = false;
1318 1321
1319 RenewTreePriority(); 1322 RenewTreePriority();
1320 } 1323 }
1321 1324
1322 } // namespace cc 1325 } // namespace cc
OLDNEW
« no previous file with comments | « cc/output_surface.h ('k') | chrome/browser/chromeos/login/chrome_restart_request.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698