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

Side by Side Diff: cc/surfaces/display_scheduler.cc

Issue 1205483004: cc: Remove unnecessary task runner refptrs from schedulers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove_begin_frame_source_constructor
Patch Set: fix surfaces_scheduler compile error 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
« no previous file with comments | « cc/surfaces/display_scheduler.h ('k') | cc/surfaces/display_scheduler_unittest.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/surfaces/display_scheduler.h" 5 #include "cc/surfaces/display_scheduler.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/stl_util.h" 9 #include "base/stl_util.h"
10 #include "base/trace_event/trace_event.h" 10 #include "base/trace_event/trace_event.h"
11 #include "cc/output/output_surface.h" 11 #include "cc/output/output_surface.h"
12 12
13 namespace cc { 13 namespace cc {
14 14
15 DisplayScheduler::DisplayScheduler( 15 DisplayScheduler::DisplayScheduler(DisplaySchedulerClient* client,
16 DisplaySchedulerClient* client, 16 BeginFrameSource* begin_frame_source,
17 BeginFrameSource* begin_frame_source, 17 base::SingleThreadTaskRunner* task_runner,
18 scoped_refptr<base::SingleThreadTaskRunner> task_runner, 18 int max_pending_swaps)
19 int max_pending_swaps)
20 : client_(client), 19 : client_(client),
21 begin_frame_source_(begin_frame_source), 20 begin_frame_source_(begin_frame_source),
22 task_runner_(task_runner), 21 task_runner_(task_runner),
23 output_surface_lost_(false), 22 output_surface_lost_(false),
24 root_surface_resources_locked_(true), 23 root_surface_resources_locked_(true),
25 inside_begin_frame_deadline_interval_(false), 24 inside_begin_frame_deadline_interval_(false),
26 needs_draw_(false), 25 needs_draw_(false),
27 entire_display_damaged_(false), 26 entire_display_damaged_(false),
28 all_active_child_surfaces_ready_to_draw_(false), 27 all_active_child_surfaces_ready_to_draw_(false),
29 pending_swaps_(0), 28 pending_swaps_(0),
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 } 277 }
279 278
280 void DisplayScheduler::DidSwapBuffersComplete() { 279 void DisplayScheduler::DidSwapBuffersComplete() {
281 pending_swaps_--; 280 pending_swaps_--;
282 TRACE_EVENT1("cc", "DisplayScheduler::DidSwapBuffersComplete", 281 TRACE_EVENT1("cc", "DisplayScheduler::DidSwapBuffersComplete",
283 "pending_frames", pending_swaps_); 282 "pending_frames", pending_swaps_);
284 ScheduleBeginFrameDeadline(); 283 ScheduleBeginFrameDeadline();
285 } 284 }
286 285
287 } // namespace cc 286 } // namespace cc
OLDNEW
« no previous file with comments | « cc/surfaces/display_scheduler.h ('k') | cc/surfaces/display_scheduler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698