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

Side by Side Diff: cc/scheduler/scheduler.cc

Issue 1165853002: Pipe impl_latency_takes_priority_ to the RenderScheduler. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Made the flag default Created 5 years, 6 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/scheduler/scheduler.h" 5 #include "cc/scheduler/scheduler.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 TRACE_EVENT1("cc,benchmark", "Scheduler::BeginFrame", "args", args.AsValue()); 347 TRACE_EVENT1("cc,benchmark", "Scheduler::BeginFrame", "args", args.AsValue());
348 348
349 // Trace this begin frame time through the Chrome stack 349 // Trace this begin frame time through the Chrome stack
350 TRACE_EVENT_FLOW_BEGIN0( 350 TRACE_EVENT_FLOW_BEGIN0(
351 TRACE_DISABLED_BY_DEFAULT("cc.debug.scheduler.frames"), "BeginFrameArgs", 351 TRACE_DISABLED_BY_DEFAULT("cc.debug.scheduler.frames"), "BeginFrameArgs",
352 args.frame_time.ToInternalValue()); 352 args.frame_time.ToInternalValue());
353 353
354 // TODO(brianderson): Adjust deadline in the DisplayScheduler. 354 // TODO(brianderson): Adjust deadline in the DisplayScheduler.
355 BeginFrameArgs adjusted_args(args); 355 BeginFrameArgs adjusted_args(args);
356 adjusted_args.deadline -= EstimatedParentDrawTime(); 356 adjusted_args.deadline -= EstimatedParentDrawTime();
357 adjusted_args.on_critical_path = !ImplLatencyTakesPriority();
brianderson 2015/06/09 01:12:42 Depending on how the Renderer scheduler uses this
Sami 2015/06/09 09:47:34 When this flag is false, the renderer scheduler is
brianderson 2015/06/10 01:13:35 Hmm, probably not. It's more of an in-between prio
357 358
358 // Deliver BeginFrames to children. 359 // Deliver BeginFrames to children.
359 // TODO(brianderson): Move this responsibility to the DisplayScheduler. 360 // TODO(brianderson): Move this responsibility to the DisplayScheduler.
360 if (state_machine_.children_need_begin_frames()) 361 if (state_machine_.children_need_begin_frames())
361 client_->SendBeginFramesToChildren(adjusted_args); 362 client_->SendBeginFramesToChildren(adjusted_args);
362 363
363 if (settings_.using_synchronous_renderer_compositor) { 364 if (settings_.using_synchronous_renderer_compositor) {
364 BeginImplFrameSynchronous(adjusted_args); 365 BeginImplFrameSynchronous(adjusted_args);
365 return true; 366 return true;
366 } 367 }
(...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after
820 } 821 }
821 822
822 bool Scheduler::IsBeginMainFrameSentOrStarted() const { 823 bool Scheduler::IsBeginMainFrameSentOrStarted() const {
823 return (state_machine_.commit_state() == 824 return (state_machine_.commit_state() ==
824 SchedulerStateMachine::COMMIT_STATE_BEGIN_MAIN_FRAME_SENT || 825 SchedulerStateMachine::COMMIT_STATE_BEGIN_MAIN_FRAME_SENT ||
825 state_machine_.commit_state() == 826 state_machine_.commit_state() ==
826 SchedulerStateMachine::COMMIT_STATE_BEGIN_MAIN_FRAME_STARTED); 827 SchedulerStateMachine::COMMIT_STATE_BEGIN_MAIN_FRAME_STARTED);
827 } 828 }
828 829
829 } // namespace cc 830 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698