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

Unified Diff: src/gpu/gl/egl/SkCreatePlatformGLContext_egl.cpp

Issue 1610183002: add wait on fence without flush (Closed) Base URL: https://skia.googlesource.com/skia.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 | « src/gpu/gl/SkGLContext.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/egl/SkCreatePlatformGLContext_egl.cpp
diff --git a/src/gpu/gl/egl/SkCreatePlatformGLContext_egl.cpp b/src/gpu/gl/egl/SkCreatePlatformGLContext_egl.cpp
index 821e0402617527272e769e440de096988995319b..bf939730ca813ad209a78c1b48734de80174aba5 100644
--- a/src/gpu/gl/egl/SkCreatePlatformGLContext_egl.cpp
+++ b/src/gpu/gl/egl/SkCreatePlatformGLContext_egl.cpp
@@ -24,7 +24,7 @@ public:
static SkEGLFenceSync* CreateIfSupported(EGLDisplay);
SkPlatformGpuFence SK_WARN_UNUSED_RESULT insertFence() const override;
- bool flushAndWaitFence(SkPlatformGpuFence fence) const override;
+ bool waitFence(SkPlatformGpuFence fence, bool flush) const override;
void deleteFence(SkPlatformGpuFence fence) const override;
private:
@@ -302,12 +302,13 @@ SkPlatformGpuFence SkEGLFenceSync::insertFence() const {
return eglCreateSyncKHR(fDisplay, EGL_SYNC_FENCE_KHR, nullptr);
}
-bool SkEGLFenceSync::flushAndWaitFence(SkPlatformGpuFence platformFence) const {
+bool SkEGLFenceSync::waitFence(SkPlatformGpuFence platformFence, bool flush) const {
EGLSyncKHR eglsync = static_cast<EGLSyncKHR>(platformFence);
- return EGL_CONDITION_SATISFIED_KHR == eglClientWaitSyncKHR(fDisplay,
- eglsync,
- EGL_SYNC_FLUSH_COMMANDS_BIT_KHR,
- EGL_FOREVER_KHR);
+ return EGL_CONDITION_SATISFIED_KHR ==
+ eglClientWaitSyncKHR(fDisplay,
+ eglsync,
+ flush ? EGL_SYNC_FLUSH_COMMANDS_BIT_KHR : 0,
+ EGL_FOREVER_KHR);
}
void SkEGLFenceSync::deleteFence(SkPlatformGpuFence platformFence) const {
« no previous file with comments | « src/gpu/gl/SkGLContext.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698