OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include <EGL/egl.h> | 5 #include <EGL/egl.h> |
6 #include <EGL/eglext.h> | 6 #include <EGL/eglext.h> |
7 #include <gdk/gdkx.h> | 7 #include <gdk/gdkx.h> |
8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
9 | 9 |
10 extern "C" { | 10 extern "C" { |
11 #if defined(GLES2_CONFORM_SUPPORT_ONLY) | 11 #if defined(GLES2_CONFORM_SUPPORT_ONLY) |
12 #include "gpu/gles2_conform_support/gtf/gtf_stubs.h" | 12 #include "gpu/gles2_conform_support/gtf/gtf_stubs.h" |
13 #else | 13 #else |
14 #include "third_party/gles2_conform/GTF_ES/glsl/GTF/Source/eglNative.h" | 14 #include "third_party/gles2_conform/GTF_ES/glsl/GTF/Source/eglNative.h" |
15 #endif | 15 #endif |
16 } | |
17 | 16 |
18 | 17 |
19 GTFbool GTFNativeCreateDisplay(EGLNativeDisplayType *pNativeDisplay) { | 18 GTFbool GTFNativeCreateDisplay(EGLNativeDisplayType *pNativeDisplay) { |
20 int argc = 0; | 19 int argc = 0; |
21 char **argv = NULL; | 20 char **argv = NULL; |
22 gtk_init(&argc, &argv); | 21 gtk_init(&argc, &argv); |
23 *pNativeDisplay = GDK_DISPLAY();; | 22 *pNativeDisplay = GDK_DISPLAY();; |
24 return *pNativeDisplay ? GTFtrue : GTFfalse; | 23 return *pNativeDisplay ? GTFtrue : GTFfalse; |
25 } | 24 } |
26 | 25 |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 return static_cast<EGLImageKHR>(NULL); | 111 return static_cast<EGLImageKHR>(NULL); |
113 } | 112 } |
114 | 113 |
115 void GTFDestroyEGLImage(EGLImageKHR image) { | 114 void GTFDestroyEGLImage(EGLImageKHR image) { |
116 PFNEGLDESTROYIMAGEKHRPROC egl_destroy_image_khr_; | 115 PFNEGLDESTROYIMAGEKHRPROC egl_destroy_image_khr_; |
117 egl_destroy_image_khr_ = reinterpret_cast<PFNEGLDESTROYIMAGEKHRPROC> | 116 egl_destroy_image_khr_ = reinterpret_cast<PFNEGLDESTROYIMAGEKHRPROC> |
118 (eglGetProcAddress("eglDestroyImageKHR")); | 117 (eglGetProcAddress("eglDestroyImageKHR")); |
119 | 118 |
120 egl_destroy_image_khr_(eglGetCurrentDisplay(), image); | 119 egl_destroy_image_khr_(eglGetCurrentDisplay(), image); |
121 } | 120 } |
| 121 |
| 122 } // extern "C" |
| 123 |
OLD | NEW |