Commit 8fcd0ee5 authored by skyostil@google.com's avatar skyostil@google.com

Move GL headers from gpu to third_party/khronos

This change moves the OpenGL ES and EGL header files from gpu/ to a new third_party/khronos/ directory. The headers are also rebased to the latest upstream versions.

BUG=102824
TEST=none

Review URL: http://codereview.chromium.org/8423038

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@111170 0039d316-1c4b-4281-b951-d872f2087c98
parent 8ea26c28
......@@ -37,6 +37,7 @@ include_rules = [
"+third_party/npapi/bindings",
"+third_party/sqlite",
"+third_party/tcmalloc",
"+third_party/khronos",
# Allow inclusion of WebKit API files.
"+third_party/WebKit/Source/WebKit/chromium",
......
......@@ -16,7 +16,7 @@
#include "content/common/gpu/gpu_messages.h"
#include "content/renderer/gpu/renderer_gl_context.h"
#include "content/renderer/gpu/transport_texture_service.h"
#include "gpu/GLES2/gl2.h"
#include <GLES2/gl2.h>
TransportTextureHost::TransportTextureHost(MessageLoop* io_message_loop,
MessageLoop* render_message_loop,
......
......@@ -6,11 +6,11 @@
#include "content/renderer/gpu/webgraphicscontext3d_command_buffer_impl.h"
#include "gpu/GLES2/gl2.h"
#include "third_party/khronos/GLES2/gl2.h"
#ifndef GL_GLEXT_PROTOTYPES
#define GL_GLEXT_PROTOTYPES 1
#endif
#include "gpu/GLES2/gl2ext.h"
#include "third_party/khronos/GLES2/gl2ext.h"
#include <algorithm>
#include <set>
......
This diff is collapsed.
......@@ -33,7 +33,7 @@
'<(DEPTH)/base/base.gyp:base',
'<(DEPTH)/gpu/gpu.gyp:command_buffer_service',
],
'include_dirs': ['egl/native'],
'include_dirs': ['<(DEPTH)/third_party/khronos'],
'sources': [
'egl/config.cc',
'egl/config.h',
......@@ -44,8 +44,12 @@
'egl/surface.h',
],
'direct_dependent_settings': {
'include_dirs': ['egl/native'],
'include_dirs': ['<(DEPTH)/third_party/khronos'],
},
'defines': [
'EGLAPI=',
'EGLAPIENTRY=',
],
},
{
'target_name': 'egl_main_native',
......@@ -58,14 +62,18 @@
'dependencies': ['../../build/linux/system.gyp:gtk'],
}],
],
'include_dirs': ['egl/native'],
'include_dirs': ['<(DEPTH)/third_party/khronos'],
'sources': [
'<@(bootstrap_sources_native)',
],
'direct_dependent_settings': {
'include_dirs': ['egl/native'],
'include_dirs': ['<(DEPTH)/third_party/khronos'],
},
'defines': ['GTF_GLES20'],
'defines': [
'GTF_GLES20',
'EGLAPI=',
'EGLAPIENTRY=',
],
},
{
'target_name': 'gles2_conform_support',
......@@ -84,6 +92,8 @@
'defines': [
'GLES2_CONFORM_SUPPORT_ONLY',
'GTF_GLES20',
'EGLAPI=',
'EGLAPIENTRY=',
],
'sources': [
'<@(bootstrap_sources_native)',
......
......@@ -30,11 +30,11 @@
'target_name': 'command_buffer_common',
'type': 'static_library',
'include_dirs': [
'.',
'<(DEPTH)/third_party/khronos',
],
'all_dependent_settings': {
'include_dirs': [
'.',
'<(DEPTH)/third_party/khronos',
],
},
'dependencies': [
......@@ -90,7 +90,7 @@
'all_dependent_settings': {
'include_dirs': [
# For GLES2/gl2.h
'.',
'<(DEPTH)/third_party/khronos',
],
},
'sources': [
......@@ -112,7 +112,7 @@
'all_dependent_settings': {
'include_dirs': [
# For GLES2/gl2.h
'.',
'<(DEPTH)/third_party/khronos',
],
},
'sources': [
......@@ -152,10 +152,12 @@
'type': 'static_library',
'include_dirs': [
'..',
'<(DEPTH)/third_party/khronos',
],
'all_dependent_settings': {
'include_dirs': [
'..',
'<(DEPTH)/third_party/khronos',
],
},
'dependencies': [
......@@ -177,10 +179,12 @@
'type': 'static_library',
'include_dirs': [
'..',
'<(DEPTH)/third_party/khronos',
],
'all_dependent_settings': {
'include_dirs': [
'..',
'<(DEPTH)/third_party/khronos',
],
},
'dependencies': [
......@@ -327,6 +331,7 @@
],
'include_dirs': [
'..',
'<(DEPTH)/third_party/khronos',
],
'sources': [
'command_buffer/common/gl_mock.h',
......@@ -345,6 +350,7 @@
],
'include_dirs': [
'..',
'<(DEPTH)/third_party/khronos',
],
'sources': [
'ipc/gpu_command_buffer_traits.cc',
......
......@@ -12,7 +12,7 @@ Dir('.').addRepository(Dir('#/../gpu'))
# client GPU command buffer sources.
env.Append(CPPPATH=
['${SOURCE_ROOT}/native_client/src/shared/ppapi_proxy/untrusted',
'$SOURCE_ROOT/gpu'])
'$SOURCE_ROOT/third_party/khronos', '$SOURCE_ROOT/gpu'])
env.Append(CPPDEFINES=['XP_UNIX'])
env.FilterOut(CCFLAGS=['-Wswitch-enum'])
......
......@@ -80,6 +80,7 @@
'build_newlib': 1,
'include_dirs': [
'<(DEPTH)/gpu',
'<(DEPTH)/third_party/khronos',
'<(DEPTH)/ppapi/native_client/src/shared/ppapi_proxy/untrusted',
],
'sources': [
......
......@@ -25,7 +25,7 @@
*/
/* Platform-specific types and definitions for egl.h
* $Revision: 9724 $ on $Date: 2009-12-02 02:05:33 -0800 (Wed, 02 Dec 2009) $
* $Revision: 12306 $ on $Date: 2010-08-25 09:51:28 -0700 (Wed, 25 Aug 2010) $
*
* Adopters may modify khrplatform.h and this file to suit their platform.
* You are encouraged to submit all modifications to the Khronos group so that
......@@ -47,11 +47,11 @@
*/
#ifndef EGLAPI
#define EGLAPI //KHRONOS_APICALL
#define EGLAPI KHRONOS_APICALL
#endif
#ifndef EGLAPIENTRY
#define EGLAPIENTRY //KHRONOS_APIENTRY
#define EGLAPIENTRY KHRONOS_APIENTRY
#endif
#define EGLAPIENTRYP EGLAPIENTRY*
......@@ -60,6 +60,11 @@
* Windows Device Context. They must be defined in platform-specific
* code below. The EGL-prefixed versions of Native*Type are the same
* types, renamed in EGL 1.3 so all types in the API start with "EGL".
*
* Khronos STRONGLY RECOMMENDS that you use the default definitions
* provided below, since these changes affect both binary and source
* portability of applications using EGL running on different EGL
* implementations.
*/
#if defined(_WIN32) || defined(__VC32__) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) /* Win32 and WinCE */
......@@ -88,13 +93,6 @@ typedef Display *EGLNativeDisplayType;
typedef Pixmap EGLNativePixmapType;
typedef Window EGLNativeWindowType;
#elif defined(__APPLE__)
// TODO(gman): these are place holders.
typedef void *EGLNativeDisplayType;
typedef int EGLNativePixmapType;
typedef int EGLNativeWindowType;
#else
#error "Platform not recognized"
#endif
......
#ifndef __gl2platform_h_
#define __gl2platform_h_
/* $Revision: 7173 $ on $Date:: 2009-01-09 11:18:21 -0800 #$ */
/* $Revision: 10602 $ on $Date:: 2010-03-04 22:35:34 -0800 #$ */
/*
* This document is licensed under the SGI Free Software B License Version
......@@ -9,7 +9,6 @@
*/
/* Platform-specific types and definitions for OpenGL ES 2.X gl2.h
* Last modified on 2008/12/19
*
* Adopters may modify khrplatform.h and this file to suit their platform.
* You are encouraged to submit all modifications to the Khronos group so that
......@@ -24,6 +23,8 @@
#define GL_APICALL KHRONOS_APICALL
#endif
#ifndef GL_APIENTRY
#define GL_APIENTRY KHRONOS_APIENTRY
#endif
#endif /* __gl2platform_h_ */
......@@ -26,7 +26,7 @@
/* Khronos platform-specific types and definitions.
*
* $Revision: 7820 $ on $Date: 2009-04-03 13:46:26 -0700 (Fri, 03 Apr 2009) $
* $Revision: 9356 $ on $Date: 2009-10-21 02:52:25 -0700 (Wed, 21 Oct 2009) $
*
* Adopters may modify this file to suit their platform. Adopters are
* encouraged to submit platform specific modifications to the Khronos
......
Name: Khronos header files
Short Name: khronos_headers
URL: http://www.khronos.org/registry
Version: unknown
Date: 2011-11-01
License: MIT/X11 (BSD like) for {EGL,KHR}/*, SGI Free Software License B for GLES2/*
Security Critical: no
Description:
This package contains header files for the EGL and OpenGL ES 2.0 APIs from
Khronos. They are used for compiling code against these APIs as well as for
generating the GL binding initialization logic.
Local Modifications:
GLES2/gl2.h
- Added macros for C++ binding generation.
- Added GL_CONTEXT_LOST constant.
GLES2/gl2ext.h
- Added Chromium and Angle extensions.
......@@ -473,9 +473,9 @@ GLX_FUNCTIONS = [
FUNCTION_SETS = [
[GL_FUNCTIONS, 'gl', ['../../../third_party/mesa/MesaLib/include/GL/glext.h',
'../../../gpu/GLES2/gl2ext.h']],
'../../../third_party/khronos/GLES2/gl2ext.h']],
[OSMESA_FUNCTIONS, 'osmesa', []],
[EGL_FUNCTIONS, 'egl', ['../../../gpu/EGL/eglext.h']],
[EGL_FUNCTIONS, 'egl', ['../../../third_party/khronos/EGL/eglext.h']],
[WGL_FUNCTIONS, 'wgl', [
'../../../third_party/mesa/MesaLib/include/GL/wglext.h']],
[GLX_FUNCTIONS, 'glx', [
......
......@@ -89,11 +89,11 @@
'action_name': 'generate_gl_bindings',
'inputs': [
'generate_bindings.py',
'../../../gpu/GLES2/gl2ext.h',
'../../../gpu/EGL/eglext.h',
'../../../third_party/mesa/MesaLib/include/GL/glext.h',
'../../../third_party/mesa/MesaLib/include/GL/glxext.h',
'../../../third_party/mesa/MesaLib/include/GL/wglext.h',
'<(DEPTH)/third_party/khronos/GLES2/gl2ext.h',
'<(DEPTH)/third_party/khronos/EGL/eglext.h',
'<(DEPTH)/third_party/mesa/MesaLib/include/GL/glext.h',
'<(DEPTH)/third_party/mesa/MesaLib/include/GL/glxext.h',
'<(DEPTH)/third_party/mesa/MesaLib/include/GL/wglext.h',
],
'outputs': [
'<(gl_binding_output_dir)/gl_bindings_autogen_egl.cc',
......
......@@ -21,7 +21,7 @@ include_rules = [
"+gpu/command_buffer/client",
"+gpu/command_buffer/common",
"+gpu/command_buffer/service",
"+gpu/GLES2",
"+third_party/khronos/GLES2",
# TODO(brettw) - review these; move up if it's ok, or remove the dependency
"+crypto",
......
......@@ -8,9 +8,8 @@
#ifndef GL_GLEXT_PROTOTYPES
#define GL_GLEXT_PROTOTYPES
#endif
#include "gpu/GLES2/gl2.h"
#include "gpu/GLES2/gl2ext.h"
#include "third_party/khronos/GLES2/gl2.h"
#include "third_party/khronos/GLES2/gl2ext.h"
#include "third_party/skia/include/gpu/GrGLInterface.h"
namespace webkit_glue {
......@@ -119,4 +118,3 @@ GrGLInterface* CreateCommandBufferSkiaGLBinding() {
}
} // namespace webkit_glue
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment