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

Unified Diff: cc/surfaces/display.cc

Issue 895853003: Update from https://crrev.com/314320 (Closed) Base URL: https://github.com/domokit/mojo.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 | « cc/surfaces/BUILD.gn ('k') | cc/surfaces/onscreen_display_client.h » ('j') | 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..ab1f0afcdf7790e08433b4d867c31a3d0c9eb9b4 100644
--- a/cc/surfaces/display.cc
+++ b/cc/surfaces/display.cc
@@ -4,8 +4,8 @@
#include "cc/surfaces/display.h"
-#include "base/debug/trace_event.h"
#include "base/message_loop/message_loop.h"
+#include "base/trace_event/trace_event.h"
#include "cc/debug/benchmark_instrumentation.h"
#include "cc/output/compositor_frame.h"
#include "cc/output/compositor_frame_ack.h"
@@ -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 | « cc/surfaces/BUILD.gn ('k') | cc/surfaces/onscreen_display_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698