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

Unified Diff: ui/gl/gl_surface_ozone.cc

Issue 1570643002: GLSurfaceOzone: move the IsUDL() check after ScheduleOverlayPlanes() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2564
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 a75680c9ffae0a68cb96cd27d7ec19e952292730..3578bfa2b889cb76c5ab0c3198e15f57a5dc9952 100644
--- a/ui/gl/gl_surface_ozone.cc
+++ b/ui/gl/gl_surface_ozone.cc
@@ -283,13 +283,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;
}
@@ -358,8 +359,6 @@ bool GLSurfaceOzoneSurfaceless::SwapBuffersAsync(
base::WorkerPool::PostTaskAndReply(FROM_HERE, fence_wait_task,
fence_retired_callback, false);
return true;
- } else if (ozone_surface_->IsUniversalDisplayLinkDevice()) {
- glFinish();
}
frame->ready = true;
@@ -395,6 +394,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