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

Unified Diff: cc/surfaces/onscreen_display_client.cc

Issue 1435133004: cc: Clean up max frames/swaps pending usage. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/scheduler/scheduler_unittest.cc ('k') | cc/surfaces/surface_display_output_surface.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/surfaces/onscreen_display_client.cc
diff --git a/cc/surfaces/onscreen_display_client.cc b/cc/surfaces/onscreen_display_client.cc
index 067f443da38560ca2527c09708bd9015213d8a62..06828b05321f62fb885e980b2a3df7fd2042f73a 100644
--- a/cc/surfaces/onscreen_display_client.cc
+++ b/cc/surfaces/onscreen_display_client.cc
@@ -35,10 +35,7 @@ OnscreenDisplayClient::~OnscreenDisplayClient() {
}
bool OnscreenDisplayClient::Initialize() {
- int max_frames_pending =
- output_surface_ ? output_surface_->capabilities().max_frames_pending : 0;
- if (max_frames_pending <= 0)
- max_frames_pending = OutputSurface::DEFAULT_MAX_FRAMES_PENDING;
+ DCHECK(output_surface_);
BeginFrameSource* frame_source;
if (disable_display_vsync_) {
@@ -51,8 +48,9 @@ bool OnscreenDisplayClient::Initialize() {
frame_source = synthetic_frame_source_.get();
}
- scheduler_.reset(new DisplayScheduler(
- display_.get(), frame_source, task_runner_.get(), max_frames_pending));
+ scheduler_.reset(
+ new DisplayScheduler(display_.get(), frame_source, task_runner_.get(),
+ output_surface_->capabilities().max_frames_pending));
return display_->Initialize(output_surface_.Pass(), scheduler_.get());
}
« no previous file with comments | « cc/scheduler/scheduler_unittest.cc ('k') | cc/surfaces/surface_display_output_surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698