diff options
author | alokp@chromium.org <alokp@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-13 20:09:58 +0000 |
---|---|---|
committer | alokp@chromium.org <alokp@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-13 20:09:58 +0000 |
commit | 1c9526e0650a91e412d815417634c9f193b1a4d5 (patch) | |
tree | 989046f0d01a9154987bb21fa65f736580d8df16 /third_party/mesa | |
parent | ca488e19c17583ada1af51e2e27393981e4be772 (diff) | |
download | chromium_src-1c9526e0650a91e412d815417634c9f193b1a4d5.zip chromium_src-1c9526e0650a91e412d815417634c9f193b1a4d5.tar.gz chromium_src-1c9526e0650a91e412d815417634c9f193b1a4d5.tar.bz2 |
Added facility to compile Mesa EGL implementation. Fixed a few issues so that it can be compiled against standard EGL 1.4 headers.
Review URL: http://codereview.chromium.org/5750002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69040 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'third_party/mesa')
-rw-r--r-- | third_party/mesa/MesaLib/src/egl/main/eglconfig.c | 4 | ||||
-rw-r--r-- | third_party/mesa/MesaLib/src/egl/main/eglconfig.h | 2 | ||||
-rw-r--r-- | third_party/mesa/README.chromium | 3 | ||||
-rw-r--r-- | third_party/mesa/mesa.gypi | 68 |
4 files changed, 77 insertions, 0 deletions
diff --git a/third_party/mesa/MesaLib/src/egl/main/eglconfig.c b/third_party/mesa/MesaLib/src/egl/main/eglconfig.c index 01e7144..ca28b5f 100644 --- a/third_party/mesa/MesaLib/src/egl/main/eglconfig.c +++ b/third_party/mesa/MesaLib/src/egl/main/eglconfig.c @@ -212,9 +212,11 @@ static const struct { ATTRIB_CRITERION_IGNORE, 0 }, +#ifdef EGL_NOK_texture_from_pixmap { EGL_Y_INVERTED_NOK, ATTRIB_TYPE_BOOLEAN, ATTRIB_CRITERION_EXACT, EGL_DONT_CARE }, +#endif }; @@ -489,8 +491,10 @@ _eglIsConfigAttribValid(_EGLConfig *conf, EGLint attr) case EGL_MATCH_NATIVE_PIXMAP: #endif return EGL_FALSE; +#ifdef EGL_NOK_texture_from_pixmap case EGL_Y_INVERTED_NOK: return conf->Display->Extensions.NOK_texture_from_pixmap; +#endif default: break; } diff --git a/third_party/mesa/MesaLib/src/egl/main/eglconfig.h b/third_party/mesa/MesaLib/src/egl/main/eglconfig.h index 0ad58cf..5eda345 100644 --- a/third_party/mesa/MesaLib/src/egl/main/eglconfig.h +++ b/third_party/mesa/MesaLib/src/egl/main/eglconfig.h @@ -49,8 +49,10 @@ _eglIndexConfig(const _EGLConfig *conf, EGLint key) return key - _EGL_CONFIG_FIRST_ATTRIB; switch (key) { +#ifdef EGL_NOK_texture_from_pixmap case EGL_Y_INVERTED_NOK: return _EGL_CONFIG_FIRST_EXTRA_ATTRIB; +#endif default: return -1; } diff --git a/third_party/mesa/README.chromium b/third_party/mesa/README.chromium index 0392a31..a405e3c 100644 --- a/third_party/mesa/README.chromium +++ b/third_party/mesa/README.chromium @@ -70,3 +70,6 @@ Later modifications (see chromium.patch): - Changed querymatrix.c to understand availability of fpclassify on Linux. + +- Guarded all usage of EGL_Y_INVERTED_NOK with EGL_NOK_texture_from_pixmap + so that it can be compiled against standard EGL 1.4 headers. diff --git a/third_party/mesa/mesa.gypi b/third_party/mesa/mesa.gypi new file mode 100644 index 0000000..c3f06cf --- /dev/null +++ b/third_party/mesa/mesa.gypi @@ -0,0 +1,68 @@ +# Copyright (c) 2010 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +{ + 'variables': { + # + # Mesa EGL implementation has a pluggable architecture. The core consists + # of an API dispatcher which routes all eglFooBar() API calls to a + # pluggable driver. mesa_egl_sources contains the API dispatcher source + # files. These sources when compiled with driver sources will produce + # EGL library. + # + # Note that we cannot compile the API dispatcher into a static library + # because they need to include EGL headers which might be driver specific. + # + 'mesa_egl_sources': [ + '<(DEPTH)/third_party/mesa/MesaLib/src/egl/main/eglapi.c', + '<(DEPTH)/third_party/mesa/MesaLib/src/egl/main/eglapi.h', + '<(DEPTH)/third_party/mesa/MesaLib/src/egl/main/eglarray.c', + '<(DEPTH)/third_party/mesa/MesaLib/src/egl/main/eglarray.h', + '<(DEPTH)/third_party/mesa/MesaLib/src/egl/main/eglcompiler.h', + '<(DEPTH)/third_party/mesa/MesaLib/src/egl/main/eglconfig.c', + '<(DEPTH)/third_party/mesa/MesaLib/src/egl/main/eglconfig.h', + '<(DEPTH)/third_party/mesa/MesaLib/src/egl/main/eglcontext.c', + '<(DEPTH)/third_party/mesa/MesaLib/src/egl/main/eglcontext.h', + '<(DEPTH)/third_party/mesa/MesaLib/src/egl/main/eglcurrent.c', + '<(DEPTH)/third_party/mesa/MesaLib/src/egl/main/eglcurrent.h', + '<(DEPTH)/third_party/mesa/MesaLib/src/egl/main/egldefines.h', + '<(DEPTH)/third_party/mesa/MesaLib/src/egl/main/egldisplay.c', + '<(DEPTH)/third_party/mesa/MesaLib/src/egl/main/egldisplay.h', + # + # Do not include egldriver.c which dynamically loads a driver at + # runtime. We will statically bake our driver with the API dispatcher. + # + # '<(DEPTH)/third_party/mesa/MesaLib/src/egl/main/egldriver.c', + # + '<(DEPTH)/third_party/mesa/MesaLib/src/egl/main/egldriver.h', + '<(DEPTH)/third_party/mesa/MesaLib/src/egl/main/eglglobals.c', + '<(DEPTH)/third_party/mesa/MesaLib/src/egl/main/eglglobals.h', + '<(DEPTH)/third_party/mesa/MesaLib/src/egl/main/eglimage.c', + '<(DEPTH)/third_party/mesa/MesaLib/src/egl/main/eglimage.h', + '<(DEPTH)/third_party/mesa/MesaLib/src/egl/main/egllog.c', + '<(DEPTH)/third_party/mesa/MesaLib/src/egl/main/egllog.h', + '<(DEPTH)/third_party/mesa/MesaLib/src/egl/main/eglmisc.c', + '<(DEPTH)/third_party/mesa/MesaLib/src/egl/main/eglmisc.h', + '<(DEPTH)/third_party/mesa/MesaLib/src/egl/main/eglmode.c', + '<(DEPTH)/third_party/mesa/MesaLib/src/egl/main/eglmode.h', + '<(DEPTH)/third_party/mesa/MesaLib/src/egl/main/eglmutex.h', + '<(DEPTH)/third_party/mesa/MesaLib/src/egl/main/eglscreen.c', + '<(DEPTH)/third_party/mesa/MesaLib/src/egl/main/eglscreen.h', + '<(DEPTH)/third_party/mesa/MesaLib/src/egl/main/eglstring.c', + '<(DEPTH)/third_party/mesa/MesaLib/src/egl/main/eglstring.h', + '<(DEPTH)/third_party/mesa/MesaLib/src/egl/main/eglsurface.c', + '<(DEPTH)/third_party/mesa/MesaLib/src/egl/main/eglsurface.h', + '<(DEPTH)/third_party/mesa/MesaLib/src/egl/main/eglsync.c', + '<(DEPTH)/third_party/mesa/MesaLib/src/egl/main/eglsync.h', + '<(DEPTH)/third_party/mesa/MesaLib/src/egl/main/egltypedefs.h', + ], + }, +} + +# Local Variables: +# tab-width:2 +# indent-tabs-mode:nil +# End: +# vim: set expandtab tabstop=2 shiftwidth=2: + |