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

Side by Side Diff: tools/gpu/gl/egl/CreatePlatformGLTestContext_egl.cpp

Issue 2391113002: Use void* again for PlatformFence (Closed)
Patch Set: Use uint64_t for PlatformFence 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 unified diff | Download patch
« no previous file with comments | « tools/gpu/gl/GLTestContext.cpp ('k') | tools/gpu/vk/VkTestContext.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 #include "gl/GLTestContext.h" 8 #include "gl/GLTestContext.h"
9 9
10 #define GL_GLEXT_PROTOTYPES 10 #define GL_GLEXT_PROTOTYPES
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 eglsync, 313 eglsync,
314 EGL_SYNC_FLUSH_COMMANDS_BIT_KHR, 314 EGL_SYNC_FLUSH_COMMANDS_BIT_KHR,
315 EGL_FOREVER_KHR); 315 EGL_FOREVER_KHR);
316 } 316 }
317 317
318 void EGLFenceSync::deleteFence(sk_gpu_test::PlatformFence platformFence) const { 318 void EGLFenceSync::deleteFence(sk_gpu_test::PlatformFence platformFence) const {
319 EGLSyncKHR eglsync = reinterpret_cast<EGLSyncKHR>(platformFence); 319 EGLSyncKHR eglsync = reinterpret_cast<EGLSyncKHR>(platformFence);
320 eglDestroySyncKHR(fDisplay, eglsync); 320 eglDestroySyncKHR(fDisplay, eglsync);
321 } 321 }
322 322
323 GR_STATIC_ASSERT(sizeof(EGLSyncKHR) <= sizeof(sk_gpu_test::PlatformFence));
324
323 } // anonymous namespace 325 } // anonymous namespace
324 326
325 namespace sk_gpu_test { 327 namespace sk_gpu_test {
326 GLTestContext *CreatePlatformGLTestContext(GrGLStandard forcedGpuAPI, 328 GLTestContext *CreatePlatformGLTestContext(GrGLStandard forcedGpuAPI,
327 GLTestContext *shareContext) { 329 GLTestContext *shareContext) {
328 SkASSERT(!shareContext); 330 SkASSERT(!shareContext);
329 if (shareContext) { 331 if (shareContext) {
330 return nullptr; 332 return nullptr;
331 } 333 }
332 EGLGLTestContext *ctx = new EGLGLTestContext(forcedGpuAPI); 334 EGLGLTestContext *ctx = new EGLGLTestContext(forcedGpuAPI);
333 if (!ctx->isValid()) { 335 if (!ctx->isValid()) {
334 delete ctx; 336 delete ctx;
335 return nullptr; 337 return nullptr;
336 } 338 }
337 return ctx; 339 return ctx;
338 } 340 }
339 } // namespace sk_gpu_test 341 } // namespace sk_gpu_test
340
OLDNEW
« 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