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

Unified Diff: cc/surfaces/display.cc

Issue 578383004: Limit outstanding surface draw swaps to max_frames_pending. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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/display.h ('k') | cc/surfaces/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 105eeb2e3d46f6a64ed3c2ecd443c4ef52523f8b..cd067689a8e42557935208a48af036ac754dafb0 100644
--- a/cc/surfaces/display.cc
+++ b/cc/surfaces/display.cc
@@ -132,6 +132,14 @@ bool Display::Draw() {
return true;
}
+void Display::DidSwapBuffers() {
+ client_->DidSwapBuffers();
+}
+
+void Display::DidSwapBuffersComplete() {
+ client_->DidSwapBuffersComplete();
+}
+
void Display::OnSurfaceDamaged(SurfaceId surface) {
if (aggregator_ && aggregator_->previous_contained_surfaces().count(surface))
client_->DisplayDamaged();
@@ -141,4 +149,10 @@ SurfaceId Display::CurrentSurfaceId() {
return current_surface_id_;
}
+int Display::GetMaxFramesPending() {
+ if (!output_surface_)
+ return OutputSurface::DEFAULT_MAX_FRAMES_PENDING;
+ return output_surface_->capabilities().max_frames_pending;
+}
+
} // namespace cc
« no previous file with comments | « cc/surfaces/display.h ('k') | cc/surfaces/display_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698