Commit cd189c1c authored by jbauman's avatar jbauman Committed by Commit bot

[surfaces] use DEFAULT_MAX_FRAMES_PENDING if OutputSurface doesn't specify it.

To match LTHI, change the max frames pending calculation to output DEFAULT_MAX_FRAMES_PENDING if the output surface reports 0.

Review URL: https://codereview.chromium.org/885933002

Cr-Commit-Position: refs/heads/master@{#313800}
parent 232ba71f
...@@ -198,9 +198,11 @@ SurfaceId Display::CurrentSurfaceId() { ...@@ -198,9 +198,11 @@ SurfaceId Display::CurrentSurfaceId() {
} }
int Display::GetMaxFramesPending() { int Display::GetMaxFramesPending() {
if (!output_surface_) int max_frames_pending =
return OutputSurface::DEFAULT_MAX_FRAMES_PENDING; output_surface_ ? output_surface_->capabilities().max_frames_pending : 0;
return output_surface_->capabilities().max_frames_pending; if (max_frames_pending <= 0)
max_frames_pending = OutputSurface::DEFAULT_MAX_FRAMES_PENDING;
return max_frames_pending;
} }
} // namespace cc } // namespace cc
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment