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