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

Unified Diff: tools/gpu/gl/egl/CreatePlatformGLTestContext_egl.cpp

Issue 2383383002: Move GPU fences into sk_gpu_test (Closed)
Patch Set: fix for windowsx Created 4 years, 2 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 | « tools/gpu/gl/GLTestContext.cpp ('k') | tools/gpu/vk/VkTestContext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 edbc63200bba04fcaa14460a4870bb0575c1145d..8fdd3fea867137c8ea18562e54233d3654933a6b 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 SkGpuFenceSync {
+class EGLFenceSync : public sk_gpu_test::FenceSync {
public:
static EGLFenceSync* CreateIfSupported(EGLDisplay);
- SkPlatformGpuFence SK_WARN_UNUSED_RESULT insertFence() const override;
- bool waitFence(SkPlatformGpuFence fence) const override;
- void deleteFence(SkPlatformGpuFence fence) const override;
+ 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;
private:
EGLFenceSync(EGLDisplay display) : fDisplay(display) {}
EGLDisplay fDisplay;
- typedef SkGpuFenceSync INHERITED;
+ typedef sk_gpu_test::FenceSync INHERITED;
};
class EGLGLTestContext : public sk_gpu_test::GLTestContext {
@@ -301,12 +301,13 @@ EGLFenceSync* EGLFenceSync::CreateIfSupported(EGLDisplay display) {
return new EGLFenceSync(display);
}
-SkPlatformGpuFence EGLFenceSync::insertFence() const {
- return eglCreateSyncKHR(fDisplay, EGL_SYNC_FENCE_KHR, nullptr);
+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(SkPlatformGpuFence platformFence) const {
- EGLSyncKHR eglsync = static_cast<EGLSyncKHR>(platformFence);
+bool EGLFenceSync::waitFence(sk_gpu_test::PlatformFence platformFence) const {
+ EGLSyncKHR eglsync = reinterpret_cast<EGLSyncKHR>(platformFence);
return EGL_CONDITION_SATISFIED_KHR ==
eglClientWaitSyncKHR(fDisplay,
eglsync,
@@ -314,8 +315,8 @@ bool EGLFenceSync::waitFence(SkPlatformGpuFence platformFence) const {
EGL_FOREVER_KHR);
}
-void EGLFenceSync::deleteFence(SkPlatformGpuFence platformFence) const {
- EGLSyncKHR eglsync = static_cast<EGLSyncKHR>(platformFence);
+void EGLFenceSync::deleteFence(sk_gpu_test::PlatformFence platformFence) const {
+ EGLSyncKHR eglsync = reinterpret_cast<EGLSyncKHR>(platformFence);
eglDestroySyncKHR(fDisplay, eglsync);
}
« no previous file with comments | « tools/gpu/gl/GLTestContext.cpp ('k') | tools/gpu/vk/VkTestContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698