| 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) {
|
|
|