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

Unified Diff: ui/gl/gl_surface_ozone.cc

Issue 1564123002: GLSurfaceOzone: move the IsUDL() check after ScheduleOverlayPlanes() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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: ui/gl/gl_surface_ozone.cc
diff --git a/ui/gl/gl_surface_ozone.cc b/ui/gl/gl_surface_ozone.cc
index b9655525274a490a8b3f592da3436fccb9ceece2..67c1483ca9d5e586fd99a970619beef3d7c664c8 100644
--- a/ui/gl/gl_surface_ozone.cc
+++ b/ui/gl/gl_surface_ozone.cc
@@ -262,13 +262,14 @@ gfx::SwapResult GLSurfaceOzoneSurfaceless::SwapBuffers() {
EGLDisplay display = GetDisplay();
WaitForFence(display, fence);
eglDestroySyncKHR(display, fence);
- } else if (ozone_surface_->IsUniversalDisplayLinkDevice()) {
- glFinish();
}
unsubmitted_frames_.back()->ScheduleOverlayPlanes(widget_);
unsubmitted_frames_.back()->overlays.clear();
+ if (ozone_surface_->IsUniversalDisplayLinkDevice())
+ glFinish();
+
return ozone_surface_->OnSwapBuffers() ? gfx::SwapResult::SWAP_ACK
: gfx::SwapResult::SWAP_FAILED;
}
@@ -347,9 +348,6 @@ void GLSurfaceOzoneSurfaceless::SwapBuffersAsync(
return; // Defer frame submission until fence signals.
}
- if (ozone_surface_->IsUniversalDisplayLinkDevice())
- glFinish();
-
frame->ready = true;
SubmitFrame();
}
@@ -383,6 +381,9 @@ void GLSurfaceOzoneSurfaceless::SubmitFrame() {
return;
}
+ if (ozone_surface_->IsUniversalDisplayLinkDevice())
+ glFinish();
+
ozone_surface_->OnSwapBuffersAsync(frame->callback);
}
}
« 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