| 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 "gpu/gles2_conform_support/egl/display.h" | |
| 6 | |
| 7 extern "C" { | 5 extern "C" { |
| 8 #if defined(GLES2_CONFORM_SUPPORT_ONLY) | 6 #if defined(GLES2_CONFORM_SUPPORT_ONLY) |
| 9 #include "gpu/gles2_conform_support/gtf/gtf_stubs.h" | 7 #include "gpu/gles2_conform_support/gtf/gtf_stubs.h" |
| 10 #else | 8 #else |
| 11 #include "third_party/gles2_conform/GTF_ES/glsl/GTF/Source/eglNative.h" | 9 #include "third_party/gles2_conform/GTF_ES/glsl/GTF/Source/eglNative.h" |
| 12 #endif | 10 #endif |
| 13 | 11 |
| 14 GTFbool GTFNativeCreateDisplay(EGLNativeDisplayType *pNativeDisplay) { | 12 GTFbool GTFNativeCreateDisplay(EGLNativeDisplayType *pNativeDisplay) { |
| 15 *pNativeDisplay = EGL_DEFAULT_DISPLAY; | 13 *pNativeDisplay = EGL_DEFAULT_DISPLAY; |
| 16 return GTFtrue; | 14 return GTFtrue; |
| 17 } | 15 } |
| 18 | 16 |
| 19 void GTFNativeDestroyDisplay(EGLNativeDisplayType nativeDisplay) { | 17 void GTFNativeDestroyDisplay(EGLNativeDisplayType nativeDisplay) { |
| 20 // Nothing to destroy since we are using EGL_DEFAULT_DISPLAY | 18 // Nothing to destroy since we are using EGL_DEFAULT_DISPLAY |
| 21 } | 19 } |
| 22 | 20 |
| 23 GTFbool GTFNativeCreateWindow(EGLNativeDisplayType nativeDisplay, | 21 GTFbool GTFNativeCreateWindow(EGLNativeDisplayType nativeDisplay, |
| 24 EGLDisplay eglDisplay, EGLConfig eglConfig, | 22 EGLDisplay eglDisplay, EGLConfig eglConfig, |
| 25 const char* title, int width, int height, | 23 const char* title, int width, int height, |
| 26 EGLNativeWindowType *pNativeWindow) { | 24 EGLNativeWindowType *pNativeWindow) { |
| 27 egl::Display* display = static_cast<egl::Display*>(eglDisplay); | 25 // GTF should use EGL pbuffer interface directly. |
| 28 display->SetCreateOffscreen(width, height); | 26 return GTFfalse; |
| 29 return GTFtrue; | |
| 30 } | 27 } |
| 31 | 28 |
| 32 void GTFNativeDestroyWindow(EGLNativeDisplayType nativeDisplay, | 29 void GTFNativeDestroyWindow(EGLNativeDisplayType nativeDisplay, |
| 33 EGLNativeWindowType nativeWindow) { | 30 EGLNativeWindowType nativeWindow) { |
| 34 } | 31 } |
| 35 | 32 |
| 36 EGLImageKHR GTFCreateEGLImage(int width, int height, | 33 EGLImageKHR GTFCreateEGLImage(int width, int height, |
| 37 GLenum format, GLenum type) { | 34 GLenum format, GLenum type) { |
| 38 return (EGLImageKHR)NULL; | 35 return (EGLImageKHR)NULL; |
| 39 } | 36 } |
| 40 | 37 |
| 41 void GTFDestroyEGLImage(EGLImageKHR image) { | 38 void GTFDestroyEGLImage(EGLImageKHR image) { |
| 42 } | 39 } |
| 43 | 40 |
| 44 } // extern "C" | 41 } // extern "C" |
| 45 | 42 |
| OLD | NEW |