OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 | 7 |
8 extern "C" { | 8 extern "C" { |
9 #if defined(GLES2_CONFORM_SUPPORT_ONLY) | 9 #if defined(GLES2_CONFORM_SUPPORT_ONLY) |
10 #include "gpu/gles2_conform_support/gtf/gtf_stubs.h" | 10 #include "gpu/gles2_conform_support/gtf/gtf_stubs.h" |
11 #else | 11 #else |
12 #include "third_party/gles2_conform/GTF_ES/glsl/GTF/Source/eglNative.h" | 12 #include "third_party/gles2_conform/GTF_ES/glsl/GTF/Source/eglNative.h" // nogn
check |
13 #endif | 13 #endif |
14 | 14 |
15 EGLImageKHR GTFCreateEGLImage(int width, int height, | 15 EGLImageKHR GTFCreateEGLImage(int width, int height, |
16 GLenum format, GLenum type) { | 16 GLenum format, GLenum type) { |
17 PFNEGLCREATEIMAGEKHRPROC egl_create_image_khr_; | 17 PFNEGLCREATEIMAGEKHRPROC egl_create_image_khr_; |
18 egl_create_image_khr_ = reinterpret_cast<PFNEGLCREATEIMAGEKHRPROC> | 18 egl_create_image_khr_ = reinterpret_cast<PFNEGLCREATEIMAGEKHRPROC> |
19 (eglGetProcAddress("eglCreateImageKHR")); | 19 (eglGetProcAddress("eglCreateImageKHR")); |
20 | 20 |
21 static const EGLint attrib[] = { | 21 static const EGLint attrib[] = { |
22 EGL_IMAGE_PRESERVED_KHR, EGL_TRUE, | 22 EGL_IMAGE_PRESERVED_KHR, EGL_TRUE, |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 | 65 |
66 void GTFDestroyEGLImage(EGLImageKHR image) { | 66 void GTFDestroyEGLImage(EGLImageKHR image) { |
67 PFNEGLDESTROYIMAGEKHRPROC egl_destroy_image_khr_; | 67 PFNEGLDESTROYIMAGEKHRPROC egl_destroy_image_khr_; |
68 egl_destroy_image_khr_ = reinterpret_cast<PFNEGLDESTROYIMAGEKHRPROC> | 68 egl_destroy_image_khr_ = reinterpret_cast<PFNEGLDESTROYIMAGEKHRPROC> |
69 (eglGetProcAddress("eglDestroyImageKHR")); | 69 (eglGetProcAddress("eglDestroyImageKHR")); |
70 | 70 |
71 egl_destroy_image_khr_(eglGetCurrentDisplay(), image); | 71 egl_destroy_image_khr_(eglGetCurrentDisplay(), image); |
72 } | 72 } |
73 | 73 |
74 } // extern "C" | 74 } // extern "C" |
OLD | NEW |