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

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

Issue 2908313002: Revert of gpu: Use ANDROID_native_fence_sync instead of ARM_implicit_external_sync. (Closed)
Patch Set: Created 3 years, 7 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 cacd16fee13224453ab51d918d327dcb48508972..4b4913b78f7cf8d7b718e263c47cb9ca62a820b2 100644
--- a/ui/ozone/platform/drm/gpu/gbm_surfaceless.cc
+++ b/ui/ozone/platform/drm/gpu/gbm_surfaceless.cc
@@ -35,7 +35,8 @@
surface_factory_(surface_factory),
window_(std::move(window)),
widget_(widget),
- has_native_fence_sync_(HasEGLExtension("EGL_ANDROID_native_fence_sync")),
+ has_implicit_external_sync_(
+ HasEGLExtension("EGL_ARM_implicit_external_sync")),
weak_factory_(this) {
surface_factory_->RegisterSurface(window_->widget(), this);
unsubmitted_frames_.push_back(base::MakeUnique<PendingFrame>());
@@ -113,7 +114,7 @@
// TODO: the following should be replaced by a per surface flush as it gets
// implemented in GL drivers.
- EGLSyncKHR fence = InsertFence(has_native_fence_sync_);
+ EGLSyncKHR fence = InsertFence(has_implicit_external_sync_);
if (!fence) {
callback.Run(gfx::SwapResult::SWAP_FAILED);
return;
@@ -205,10 +206,12 @@
}
}
-EGLSyncKHR GbmSurfaceless::InsertFence(bool native) {
- return eglCreateSyncKHR(
- GetDisplay(), native ? EGL_SYNC_NATIVE_FENCE_ANDROID : EGL_SYNC_FENCE_KHR,
- nullptr);
+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);
}
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