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

Unified Diff: cc/surfaces/display.cc

Issue 885933002: [surfaces] use DEFAULT_MAX_FRAMES_PENDING if OutputSurface doesn't specify it. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/surfaces/display.cc
diff --git a/cc/surfaces/display.cc b/cc/surfaces/display.cc
index 72c31b5248c100b7216e746dcae353bbfc4b820a..09ab643295ed79df2a10c4f4bcd19c38d31c7815 100644
--- a/cc/surfaces/display.cc
+++ b/cc/surfaces/display.cc
@@ -198,9 +198,11 @@ SurfaceId Display::CurrentSurfaceId() {
}
int Display::GetMaxFramesPending() {
- if (!output_surface_)
- return OutputSurface::DEFAULT_MAX_FRAMES_PENDING;
- return output_surface_->capabilities().max_frames_pending;
+ 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;
+ return max_frames_pending;
}
} // namespace cc
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698