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

Unified Diff: ui/ozone/platform/drm/gpu/gbm_surfaceless.cc

Issue 2864483007: gpu: Use ANDROID_native_fence_sync instead of ARM_implicit_external_sync.
Patch Set: rebase Created 3 years, 6 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 | « ui/ozone/platform/drm/gpu/gbm_surfaceless.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/ozone/platform/drm/gpu/gbm_surfaceless.cc
diff --git a/ui/ozone/platform/drm/gpu/gbm_surfaceless.cc b/ui/ozone/platform/drm/gpu/gbm_surfaceless.cc
index 7c3cba72064eaf07345776b56d1914d754098089..0a3bba5c48c6f29ece3c328c9df6801ed061ead8 100644
--- a/ui/ozone/platform/drm/gpu/gbm_surfaceless.cc
+++ b/ui/ozone/platform/drm/gpu/gbm_surfaceless.cc
@@ -35,8 +35,7 @@ GbmSurfaceless::GbmSurfaceless(GbmSurfaceFactory* surface_factory,
surface_factory_(surface_factory),
window_(std::move(window)),
widget_(widget),
- has_implicit_external_sync_(
- HasEGLExtension("EGL_ARM_implicit_external_sync")),
+ has_native_fence_sync_(HasEGLExtension("EGL_ANDROID_native_fence_sync")),
weak_factory_(this) {
surface_factory_->RegisterSurface(window_->widget(), this);
unsubmitted_frames_.push_back(base::MakeUnique<PendingFrame>());
@@ -117,7 +116,7 @@ void GbmSurfaceless::SwapBuffersAsync(const SwapCompletionCallback& callback) {
// TODO: the following should be replaced by a per surface flush as it gets
// implemented in GL drivers.
- EGLSyncKHR fence = InsertFence(has_implicit_external_sync_);
+ EGLSyncKHR fence = InsertFence(has_native_fence_sync_);
if (!fence) {
callback.Run(gfx::SwapResult::SWAP_FAILED);
return;
@@ -209,12 +208,10 @@ void GbmSurfaceless::SubmitFrame() {
}
}
-EGLSyncKHR GbmSurfaceless::InsertFence(bool implicit) {
- const EGLint attrib_list[] = {EGL_SYNC_CONDITION_KHR,
- EGL_SYNC_PRIOR_COMMANDS_IMPLICIT_EXTERNAL_ARM,
- EGL_NONE};
- return eglCreateSyncKHR(GetDisplay(), EGL_SYNC_FENCE_KHR,
- implicit ? attrib_list : NULL);
+EGLSyncKHR GbmSurfaceless::InsertFence(bool native) {
+ return eglCreateSyncKHR(
+ GetDisplay(), native ? EGL_SYNC_NATIVE_FENCE_ANDROID : EGL_SYNC_FENCE_KHR,
+ nullptr);
}
void GbmSurfaceless::FenceRetired(EGLSyncKHR fence, PendingFrame* frame) {
« no previous file with comments | « ui/ozone/platform/drm/gpu/gbm_surfaceless.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698