From 024229a38d86fc53801092e149d8599b2b2bc9fb Mon Sep 17 00:00:00 2001 From: csmartdalton Date: Tue, 4 Oct 2016 14:24:23 -0700 Subject: Use uint64_t for PlatformFence VkFence is 64 bit even on 32-bit platforms. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2391113002 Review-Url: https://codereview.chromium.org/2391113002 --- tools/gpu/gl/GLTestContext.cpp | 1 + tools/gpu/gl/egl/CreatePlatformGLTestContext_egl.cpp | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'tools/gpu/gl') diff --git a/tools/gpu/gl/GLTestContext.cpp b/tools/gpu/gl/GLTestContext.cpp index 1d53bbcd83..1b077d5a02 100644 --- a/tools/gpu/gl/GLTestContext.cpp +++ b/tools/gpu/gl/GLTestContext.cpp @@ -28,6 +28,7 @@ private: static constexpr GrGLbitfield GL_SYNC_FLUSH_COMMANDS_BIT = 0x00000001; typedef struct __GLsync *GLsync; + GR_STATIC_ASSERT(sizeof(GLsync) <= sizeof(sk_gpu_test::PlatformFence)); typedef GLsync (GR_GL_FUNCTION_TYPE* GLFenceSyncProc) (GrGLenum, GrGLbitfield); typedef GrGLenum (GR_GL_FUNCTION_TYPE* GLClientWaitSyncProc) (GLsync, GrGLbitfield, GrGLuint64); diff --git a/tools/gpu/gl/egl/CreatePlatformGLTestContext_egl.cpp b/tools/gpu/gl/egl/CreatePlatformGLTestContext_egl.cpp index 8fdd3fea86..06bd70f852 100644 --- a/tools/gpu/gl/egl/CreatePlatformGLTestContext_egl.cpp +++ b/tools/gpu/gl/egl/CreatePlatformGLTestContext_egl.cpp @@ -320,6 +320,8 @@ void EGLFenceSync::deleteFence(sk_gpu_test::PlatformFence platformFence) const { eglDestroySyncKHR(fDisplay, eglsync); } +GR_STATIC_ASSERT(sizeof(EGLSyncKHR) <= sizeof(sk_gpu_test::PlatformFence)); + } // anonymous namespace namespace sk_gpu_test { @@ -337,4 +339,3 @@ GLTestContext *CreatePlatformGLTestContext(GrGLStandard forcedGpuAPI, return ctx; } } // namespace sk_gpu_test - -- cgit v1.2.3