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
This commit is contained in:
csmartdalton 2016-10-04 14:24:23 -07:00 committed by Commit bot
parent 777ee88129
commit 024229a38d
4 changed files with 6 additions and 2 deletions

View File

@ -12,7 +12,7 @@
namespace sk_gpu_test {
using PlatformFence = intptr_t;
using PlatformFence = uint64_t;
static constexpr PlatformFence kInvalidPlatformFence = 0;
/*

View File

@ -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);

View File

@ -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

View File

@ -103,6 +103,8 @@ private:
typedef sk_gpu_test::FenceSync INHERITED;
};
GR_STATIC_ASSERT(sizeof(VkFence) <= sizeof(sk_gpu_test::PlatformFence));
// TODO: Implement swap buffers and finish
class VkTestContextImpl : public sk_gpu_test::VkTestContext {
public: