| Index: tools/gpu/gl/egl/CreatePlatformGLTestContext_egl.cpp
|
| diff --git a/tools/gpu/gl/egl/CreatePlatformGLTestContext_egl.cpp b/tools/gpu/gl/egl/CreatePlatformGLTestContext_egl.cpp
|
| index 8fdd3fea867137c8ea18562e54233d3654933a6b..edbc63200bba04fcaa14460a4870bb0575c1145d 100644
|
| --- a/tools/gpu/gl/egl/CreatePlatformGLTestContext_egl.cpp
|
| +++ b/tools/gpu/gl/egl/CreatePlatformGLTestContext_egl.cpp
|
| @@ -20,20 +20,20 @@
|
| namespace {
|
|
|
| // TODO: Share this class with ANGLE if/when it gets support for EGL_KHR_fence_sync.
|
| -class EGLFenceSync : public sk_gpu_test::FenceSync {
|
| +class EGLFenceSync : public SkGpuFenceSync {
|
| public:
|
| static EGLFenceSync* CreateIfSupported(EGLDisplay);
|
|
|
| - sk_gpu_test::PlatformFence SK_WARN_UNUSED_RESULT insertFence() const override;
|
| - bool waitFence(sk_gpu_test::PlatformFence fence) const override;
|
| - void deleteFence(sk_gpu_test::PlatformFence fence) const override;
|
| + SkPlatformGpuFence SK_WARN_UNUSED_RESULT insertFence() const override;
|
| + bool waitFence(SkPlatformGpuFence fence) const override;
|
| + void deleteFence(SkPlatformGpuFence fence) const override;
|
|
|
| private:
|
| EGLFenceSync(EGLDisplay display) : fDisplay(display) {}
|
|
|
| EGLDisplay fDisplay;
|
|
|
| - typedef sk_gpu_test::FenceSync INHERITED;
|
| + typedef SkGpuFenceSync INHERITED;
|
| };
|
|
|
| class EGLGLTestContext : public sk_gpu_test::GLTestContext {
|
| @@ -301,13 +301,12 @@
|
| return new EGLFenceSync(display);
|
| }
|
|
|
| -sk_gpu_test::PlatformFence EGLFenceSync::insertFence() const {
|
| - EGLSyncKHR eglsync = eglCreateSyncKHR(fDisplay, EGL_SYNC_FENCE_KHR, nullptr);
|
| - return reinterpret_cast<sk_gpu_test::PlatformFence>(eglsync);
|
| -}
|
| -
|
| -bool EGLFenceSync::waitFence(sk_gpu_test::PlatformFence platformFence) const {
|
| - EGLSyncKHR eglsync = reinterpret_cast<EGLSyncKHR>(platformFence);
|
| +SkPlatformGpuFence EGLFenceSync::insertFence() const {
|
| + return eglCreateSyncKHR(fDisplay, EGL_SYNC_FENCE_KHR, nullptr);
|
| +}
|
| +
|
| +bool EGLFenceSync::waitFence(SkPlatformGpuFence platformFence) const {
|
| + EGLSyncKHR eglsync = static_cast<EGLSyncKHR>(platformFence);
|
| return EGL_CONDITION_SATISFIED_KHR ==
|
| eglClientWaitSyncKHR(fDisplay,
|
| eglsync,
|
| @@ -315,8 +314,8 @@
|
| EGL_FOREVER_KHR);
|
| }
|
|
|
| -void EGLFenceSync::deleteFence(sk_gpu_test::PlatformFence platformFence) const {
|
| - EGLSyncKHR eglsync = reinterpret_cast<EGLSyncKHR>(platformFence);
|
| +void EGLFenceSync::deleteFence(SkPlatformGpuFence platformFence) const {
|
| + EGLSyncKHR eglsync = static_cast<EGLSyncKHR>(platformFence);
|
| eglDestroySyncKHR(fDisplay, eglsync);
|
| }
|
|
|
|
|