summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordpranke@chromium.org <dpranke@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-19 06:35:21 +0000
committerdpranke@chromium.org <dpranke@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-19 06:35:21 +0000
commit3c0edf1d82131458b0aa7c5115a53e62a6421f21 (patch)
tree1ea30c39763a51a590e0d0abb47080447f18fed1
parent6954b285be656e38ed8462c8b296c3a8576193e8 (diff)
downloadchromium_src-3c0edf1d82131458b0aa7c5115a53e62a6421f21.zip
chromium_src-3c0edf1d82131458b0aa7c5115a53e62a6421f21.tar.gz
chromium_src-3c0edf1d82131458b0aa7c5115a53e62a6421f21.tar.bz2
Revert r118525 / Re-land r118240 - the build failure was a flake.
This change re-enables building gles2_c_lib as a component. TBR=gman@chromium.org BUG=107735 TEST=waterfall stays green Review URL: https://chromiumcodereview.appspot.com/9150022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@118263 0039d316-1c4b-4281-b951-d872f2087c98
-rwxr-xr-xgpu/command_buffer/build_gles2_cmd_buffer.py6
-rw-r--r--gpu/command_buffer/client/gles2_c_lib.cc9
-rw-r--r--gpu/command_buffer/client/gles2_c_lib_autogen.h6
-rw-r--r--gpu/command_buffer/client/gles2_c_lib_export.h26
-rw-r--r--gpu/command_buffer/client/gles2_cmd_helper_autogen.h2
-rw-r--r--gpu/command_buffer/client/gles2_implementation_autogen.h4
-rw-r--r--gpu/command_buffer/client/gles2_lib.h14
-rw-r--r--gpu/command_buffer/common/gles2_cmd_format_autogen.h8
-rw-r--r--gpu/command_buffer/common/gles2_cmd_format_test_autogen.h6
-rw-r--r--gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h6
-rw-r--r--gpu/command_buffer/service/gles2_cmd_decoder_autogen.h7
-rw-r--r--gpu/demos/demos.gyp3
-rw-r--r--gpu/gles2_conform_support/gles2_conform_support.gyp3
-rw-r--r--gpu/gpu.gyp15
-rw-r--r--ppapi/ppapi_proxy.gypi3
-rw-r--r--third_party/khronos/GLES2/gl2.h2
-rw-r--r--third_party/khronos/GLES2/gl2ext.h2
-rw-r--r--third_party/khronos/GLES2/gl2platform.h14
-rw-r--r--webkit/gpu/webkit_gpu.gypi7
19 files changed, 99 insertions, 44 deletions
diff --git a/gpu/command_buffer/build_gles2_cmd_buffer.py b/gpu/command_buffer/build_gles2_cmd_buffer.py
index e39e95d..258031f 100755
--- a/gpu/command_buffer/build_gles2_cmd_buffer.py
+++ b/gpu/command_buffer/build_gles2_cmd_buffer.py
@@ -15,7 +15,7 @@ _SIZE_OF_UINT32 = 4
_SIZE_OF_COMMAND_HEADER = 4
_FIRST_SPECIFIC_COMMAND_ID = 256
-_LICENSE = """// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+_LICENSE = """// Copyright (c) 2012 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.
@@ -201,7 +201,7 @@ GL_APICALL void GL_APIENTRY glVertexAttribPointer (GLuint indx, GLintVer
GL_APICALL void GL_APIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei height);
GL_APICALL void GL_APIENTRY glBlitFramebufferEXT (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenumBlitFilter filter);
GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleEXT (GLenumRenderBufferTarget target, GLsizei samples, GLenumRenderBufferFormat internalformat, GLsizei width, GLsizei height);
-GL_APICALL void GL_APIENTRY glTexStorage2DEXT (GLenumTextureTarget target, GLsizei levels, GLintTextureInternalFormatStorage internalFormat, GLsizei width, GLsizei height);
+GL_APICALL void GL_APIENTRY glTexStorage2DEXT (GLenumTextureTarget target, GLsizei levels, GLenumTextureInternalFormatStorage internalFormat, GLsizei width, GLsizei height);
// Non-GL commands.
GL_APICALL void GL_APIENTRY glSwapBuffers (void);
GL_APICALL GLuint GL_APIENTRY glGetMaxValueInBufferCHROMIUM (GLidBuffer buffer_id, GLsizei count, GLenumGetMaxIndexType type, GLuint offset);
@@ -6022,7 +6022,7 @@ class GLGenerator(object):
"""Writes the GLES2 c lib implementation."""
file = CHeaderWriter(
filename,
- "// These functions emluate GLES2 over command buffers.\n")
+ "// These functions emulate GLES2 over command buffers.\n")
for func in self.original_functions:
func.WriteGLES2CLibImplementation(file)
diff --git a/gpu/command_buffer/client/gles2_c_lib.cc b/gpu/command_buffer/client/gles2_c_lib.cc
index 4e853c2..0bed5f8 100644
--- a/gpu/command_buffer/client/gles2_c_lib.cc
+++ b/gpu/command_buffer/client/gles2_c_lib.cc
@@ -1,12 +1,17 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 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.
-// These functions emluate GLES2 over command buffers for C.
+// These functions emulate GLES2 over command buffers for C.
#include <assert.h>
#include "../client/gles2_lib.h"
+#ifndef GL_GLEXT_PROTOTYPES
+#define GL_GLEXT_PROTOTYPES
+#endif
+#include <GLES2/gl2ext.h>
+
extern "C" {
// Include the auto-generated part of this file. We split this because it means
// we can easily edit the non-auto generated parts right here in this file
diff --git a/gpu/command_buffer/client/gles2_c_lib_autogen.h b/gpu/command_buffer/client/gles2_c_lib_autogen.h
index 76dc082..9cef90b 100644
--- a/gpu/command_buffer/client/gles2_c_lib_autogen.h
+++ b/gpu/command_buffer/client/gles2_c_lib_autogen.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 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.
@@ -6,7 +6,7 @@
// gpu/command_buffer/build_gles2_cmd_buffer.py
// DO NOT EDIT!
-// These functions emluate GLES2 over command buffers.
+// These functions emulate GLES2 over command buffers.
#ifndef GPU_COMMAND_BUFFER_CLIENT_GLES2_C_LIB_AUTOGEN_H_
#define GPU_COMMAND_BUFFER_CLIENT_GLES2_C_LIB_AUTOGEN_H_
@@ -515,7 +515,7 @@ void GLES2RenderbufferStorageMultisampleEXT(
target, samples, internalformat, width, height);
}
void GLES2TexStorage2DEXT(
- GLenum target, GLsizei levels, GLint internalFormat, GLsizei width,
+ GLenum target, GLsizei levels, GLenum internalFormat, GLsizei width,
GLsizei height) {
gles2::GetGLContext()->TexStorage2DEXT(
target, levels, internalFormat, width, height);
diff --git a/gpu/command_buffer/client/gles2_c_lib_export.h b/gpu/command_buffer/client/gles2_c_lib_export.h
new file mode 100644
index 0000000..bccad52
--- /dev/null
+++ b/gpu/command_buffer/client/gles2_c_lib_export.h
@@ -0,0 +1,26 @@
+// Copyright (c) 2012 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.
+
+#ifndef GPU_COMMAND_BUFFER_CLIENT_GLES2_C_LIB_EXPORT_H_
+#define GPU_COMMAND_BUFFER_CLIENT_GLES2_C_LIB_EXPORT_H_
+#pragma once
+
+#if defined(COMPONENT_BUILD)
+#if defined(WIN32)
+
+#if defined(GLES2_C_LIB_IMPLEMENTATION)
+#define GLES2_C_LIB_EXPORT __declspec(dllexport)
+#else
+#define GLES2_C_LIB_EXPORT __declspec(dllimport)
+#endif // defined(GLES2_C_LIB_IMPLEMENTATION)
+
+#else // defined(WIN32)
+#define GLES2_C_LIB_EXPORT __attribute__((visibility("default")))
+#endif
+
+#else // defined(COMPONENT_BUILD)
+#define GLES2_C_LIB_EXPORT
+#endif
+
+#endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_C_LIB_EXPORT_H_
diff --git a/gpu/command_buffer/client/gles2_cmd_helper_autogen.h b/gpu/command_buffer/client/gles2_cmd_helper_autogen.h
index 9ba4763..e01be22 100644
--- a/gpu/command_buffer/client/gles2_cmd_helper_autogen.h
+++ b/gpu/command_buffer/client/gles2_cmd_helper_autogen.h
@@ -1516,7 +1516,7 @@
}
void TexStorage2DEXT(
- GLenum target, GLsizei levels, GLint internalFormat, GLsizei width,
+ GLenum target, GLsizei levels, GLenum internalFormat, GLsizei width,
GLsizei height) {
gles2::TexStorage2DEXT* c = GetCmdSpace<gles2::TexStorage2DEXT>();
if (c) {
diff --git a/gpu/command_buffer/client/gles2_implementation_autogen.h b/gpu/command_buffer/client/gles2_implementation_autogen.h
index f039b98..6686a0a 100644
--- a/gpu/command_buffer/client/gles2_implementation_autogen.h
+++ b/gpu/command_buffer/client/gles2_implementation_autogen.h
@@ -1390,10 +1390,10 @@ void RenderbufferStorageMultisampleEXT(
}
void TexStorage2DEXT(
- GLenum target, GLsizei levels, GLint internalFormat, GLsizei width,
+ GLenum target, GLsizei levels, GLenum internalFormat, GLsizei width,
GLsizei height) {
GPU_CLIENT_SINGLE_THREAD_CHECK();
- GPU_CLIENT_LOG("[" << this << "] glTexStorage2DEXT(" << GLES2Util::GetStringTextureTarget(target) << ", " << levels << ", " << internalFormat << ", " << width << ", " << height << ")"); // NOLINT
+ GPU_CLIENT_LOG("[" << this << "] glTexStorage2DEXT(" << GLES2Util::GetStringTextureTarget(target) << ", " << levels << ", " << GLES2Util::GetStringTextureInternalFormatStorage(internalFormat) << ", " << width << ", " << height << ")"); // NOLINT
if (levels < 0) {
SetGLError(GL_INVALID_VALUE, "glTexStorage2DEXT: levels < 0");
return;
diff --git a/gpu/command_buffer/client/gles2_lib.h b/gpu/command_buffer/client/gles2_lib.h
index 799cd4e..75ab989 100644
--- a/gpu/command_buffer/client/gles2_lib.h
+++ b/gpu/command_buffer/client/gles2_lib.h
@@ -1,27 +1,29 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 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.
-// These functions emluate GLES2 over command buffers.
+// These functions emulate GLES2 over command buffers.
#ifndef GPU_COMMAND_BUFFER_CLIENT_GLES2_LIB_H_
#define GPU_COMMAND_BUFFER_CLIENT_GLES2_LIB_H_
+#include "gpu/command_buffer/client/gles2_c_lib_export.h"
+
#include "../client/gles2_implementation.h"
namespace gles2 {
// Initialize the GLES2 library.
-void Initialize();
+GLES2_C_LIB_EXPORT void Initialize();
// Terminate the GLES2 library.
-void Terminate();
+GLES2_C_LIB_EXPORT void Terminate();
// Get the current GL context.
-gpu::gles2::GLES2Implementation* GetGLContext();
+GLES2_C_LIB_EXPORT gpu::gles2::GLES2Implementation* GetGLContext();
// Set the current GL context.
-void SetGLContext(gpu::gles2::GLES2Implementation* impl);
+GLES2_C_LIB_EXPORT void SetGLContext(gpu::gles2::GLES2Implementation* impl);
} // namespace gles2
diff --git a/gpu/command_buffer/common/gles2_cmd_format_autogen.h b/gpu/command_buffer/common/gles2_cmd_format_autogen.h
index fd82bea..b86740f 100644
--- a/gpu/command_buffer/common/gles2_cmd_format_autogen.h
+++ b/gpu/command_buffer/common/gles2_cmd_format_autogen.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 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.
@@ -8482,7 +8482,7 @@ struct TexStorage2DEXT {
}
void Init(
- GLenum _target, GLsizei _levels, GLint _internalFormat, GLsizei _width,
+ GLenum _target, GLsizei _levels, GLenum _internalFormat, GLsizei _width,
GLsizei _height) {
SetHeader();
target = _target;
@@ -8493,7 +8493,7 @@ struct TexStorage2DEXT {
}
void* Set(
- void* cmd, GLenum _target, GLsizei _levels, GLint _internalFormat,
+ void* cmd, GLenum _target, GLsizei _levels, GLenum _internalFormat,
GLsizei _width, GLsizei _height) {
static_cast<ValueType*>(
cmd)->Init(_target, _levels, _internalFormat, _width, _height);
@@ -8503,7 +8503,7 @@ struct TexStorage2DEXT {
gpu::CommandHeader header;
uint32 target;
int32 levels;
- int32 internalFormat;
+ uint32 internalFormat;
int32 width;
int32 height;
};
diff --git a/gpu/command_buffer/common/gles2_cmd_format_test_autogen.h b/gpu/command_buffer/common/gles2_cmd_format_test_autogen.h
index 1873878..b7d8705 100644
--- a/gpu/command_buffer/common/gles2_cmd_format_test_autogen.h
+++ b/gpu/command_buffer/common/gles2_cmd_format_test_autogen.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 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.
@@ -3303,7 +3303,7 @@ TEST_F(GLES2FormatTest, TexStorage2DEXT) {
&cmd,
static_cast<GLenum>(11),
static_cast<GLsizei>(12),
- static_cast<GLint>(13),
+ static_cast<GLenum>(13),
static_cast<GLsizei>(14),
static_cast<GLsizei>(15));
EXPECT_EQ(static_cast<uint32>(TexStorage2DEXT::kCmdId),
@@ -3311,7 +3311,7 @@ TEST_F(GLES2FormatTest, TexStorage2DEXT) {
EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u);
EXPECT_EQ(static_cast<GLenum>(11), cmd.target);
EXPECT_EQ(static_cast<GLsizei>(12), cmd.levels);
- EXPECT_EQ(static_cast<GLint>(13), cmd.internalFormat);
+ EXPECT_EQ(static_cast<GLenum>(13), cmd.internalFormat);
EXPECT_EQ(static_cast<GLsizei>(14), cmd.width);
EXPECT_EQ(static_cast<GLsizei>(15), cmd.height);
CheckBytesWrittenMatchesExpectedSize(
diff --git a/gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h b/gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h
index 8433c1d..1ce0b87 100644
--- a/gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h
+++ b/gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 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.
@@ -205,7 +205,7 @@ static GLES2Util::EnumToString enum_to_string_table[] = {
{ 0x00000400, "GL_STENCIL_BUFFER_BIT", },
{ 0x800A, "GL_FUNC_SUBTRACT", },
{ 0x8E2C, "GL_DEPTH_COMPONENT16_NONLINEAR_NV", },
- { 0x889F, "GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING", },
+ { 0x8508, "GL_DECR_WRAP", },
{ 0x8006, "GL_FUNC_ADD", },
{ 0x8007, "GL_MIN_EXT", },
{ 0x8004, "GL_ONE_MINUS_CONSTANT_ALPHA", },
@@ -465,7 +465,7 @@ static GLES2Util::EnumToString enum_to_string_table[] = {
{ 0x8CE4, "GL_COLOR_ATTACHMENT4_NV", },
{ 0x8CD6, "GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT", },
{ 0x8872, "GL_MAX_TEXTURE_IMAGE_UNITS", },
- { 0x8508, "GL_DECR_WRAP", },
+ { 0x889F, "GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING", },
{ 0x8507, "GL_INCR_WRAP", },
{ 0x8895, "GL_ELEMENT_ARRAY_BUFFER_BINDING", },
{ 0x8894, "GL_ARRAY_BUFFER_BINDING", },
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_autogen.h b/gpu/command_buffer/service/gles2_cmd_decoder_autogen.h
index 5c06a57..d36f425 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder_autogen.h
+++ b/gpu/command_buffer/service/gles2_cmd_decoder_autogen.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 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.
@@ -2546,7 +2546,7 @@ error::Error GLES2DecoderImpl::HandleTexStorage2DEXT(
uint32 immediate_data_size, const gles2::TexStorage2DEXT& c) {
GLenum target = static_cast<GLenum>(c.target);
GLsizei levels = static_cast<GLsizei>(c.levels);
- GLint internalFormat = static_cast<GLint>(c.internalFormat);
+ GLenum internalFormat = static_cast<GLenum>(c.internalFormat);
GLsizei width = static_cast<GLsizei>(c.width);
GLsizei height = static_cast<GLsizei>(c.height);
if (!validators_->texture_target.IsValid(target)) {
@@ -2559,8 +2559,7 @@ error::Error GLES2DecoderImpl::HandleTexStorage2DEXT(
}
if (!validators_->texture_internal_format_storage.IsValid(internalFormat)) {
SetGLError(
- GL_INVALID_VALUE,
- "glTexStorage2DEXT: internalFormat GL_INVALID_VALUE");
+ GL_INVALID_ENUM, "glTexStorage2DEXT: internalFormat GL_INVALID_ENUM");
return error::kNoError;
}
if (width < 0) {
diff --git a/gpu/demos/demos.gyp b/gpu/demos/demos.gyp
index 6292564..59800c8c 100644
--- a/gpu/demos/demos.gyp
+++ b/gpu/demos/demos.gyp
@@ -1,4 +1,4 @@
-# Copyright (c) 2011 The Chromium Authors. All rights reserved.
+# Copyright (c) 2012 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.
@@ -41,6 +41,7 @@
'gpu_demo_framework',
'../gpu.gyp:command_buffer_client',
'../gpu.gyp:command_buffer_service',
+ '../gpu.gyp:gles2_implementation',
'../../base/base.gyp:base',
'../../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
'../../ui/ui.gyp:ui',
diff --git a/gpu/gles2_conform_support/gles2_conform_support.gyp b/gpu/gles2_conform_support/gles2_conform_support.gyp
index c9881d7..2341657 100644
--- a/gpu/gles2_conform_support/gles2_conform_support.gyp
+++ b/gpu/gles2_conform_support/gles2_conform_support.gyp
@@ -1,4 +1,4 @@
-# Copyright (c) 2011 The Chromium Authors. All rights reserved.
+# Copyright (c) 2012 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.
@@ -31,6 +31,7 @@
'type': 'static_library',
'dependencies': [
'<(DEPTH)/base/base.gyp:base',
+ '<(DEPTH)/gpu/gpu.gyp:gles2_implementation',
'<(DEPTH)/gpu/gpu.gyp:command_buffer_service',
],
'include_dirs': ['<(DEPTH)/third_party/khronos'],
diff --git a/gpu/gpu.gyp b/gpu/gpu.gyp
index 983285a..bc2395d 100644
--- a/gpu/gpu.gyp
+++ b/gpu/gpu.gyp
@@ -11,6 +11,7 @@
'gles2_c_lib_source_files': [
'command_buffer/client/gles2_c_lib.cc',
'command_buffer/client/gles2_c_lib_autogen.h',
+ 'command_buffer/client/gles2_c_lib_export.h',
'command_buffer/client/gles2_lib.h',
'command_buffer/client/gles2_lib.cc',
],
@@ -141,11 +142,15 @@
# Stub to expose gles2_implemenation in C instead of C++.
# so GLES2 C programs can work with no changes.
'target_name': 'gles2_c_lib',
- 'type': 'static_library',
+ 'type': '<(component)',
'dependencies': [
'../base/base.gyp:base',
+ '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
'gles2_implementation',
],
+ 'defines': [
+ 'GLES2_C_LIB_IMPLEMENTATION',
+ ],
'sources': [
'<@(gles2_c_lib_source_files)',
],
@@ -154,11 +159,14 @@
# Same as gles2_c_lib except with no parameter checking. Required for
# OpenGL ES 2.0 conformance tests.
'target_name': 'gles2_c_lib_nocheck',
- 'type': 'static_library',
+ 'type': '<(component)',
'defines': [
+ 'GLES2_C_LIB_IMPLEMENTATION',
'GLES2_CONFORMANCE_TESTS=1',
],
'dependencies': [
+ '../base/base.gyp:base',
+ '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
'gles2_implementation_client_side_arrays_no_check',
],
'sources': [
@@ -289,6 +297,9 @@
'gles2_implementation_client_side_arrays',
'gles2_cmd_helper',
],
+ 'defines': [
+ 'GLES2_C_LIB_IMPLEMENTATION',
+ ],
'sources': [
'<@(gles2_c_lib_source_files)',
'command_buffer/client/cmd_buffer_helper_test.cc',
diff --git a/ppapi/ppapi_proxy.gypi b/ppapi/ppapi_proxy.gypi
index 8731cbf..bd50b3b 100644
--- a/ppapi/ppapi_proxy.gypi
+++ b/ppapi/ppapi_proxy.gypi
@@ -1,4 +1,4 @@
-# Copyright (c) 2011 The Chromium Authors. All rights reserved.
+# Copyright (c) 2012 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.
@@ -10,6 +10,7 @@
'dependencies': [
'../base/base.gyp:base',
'../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
+ '../gpu/gpu.gyp:gles2_implementation',
'../gpu/gpu.gyp:gpu_ipc',
'../ipc/ipc.gyp:ipc',
'../skia/skia.gyp:skia',
diff --git a/third_party/khronos/GLES2/gl2.h b/third_party/khronos/GLES2/gl2.h
index 39aa414..34d06ac 100644
--- a/third_party/khronos/GLES2/gl2.h
+++ b/third_party/khronos/GLES2/gl2.h
@@ -486,8 +486,6 @@ typedef khronos_ssize_t GLsizeiptr;
/*-------------------------------------------------------------------------
* GL core functions.
*-----------------------------------------------------------------------*/
-#undef GL_APICALL
-#define GL_APICALL
#undef GL_APIENTRY
#define GL_APIENTRY
diff --git a/third_party/khronos/GLES2/gl2ext.h b/third_party/khronos/GLES2/gl2ext.h
index ad13aa3..60b8566 100644
--- a/third_party/khronos/GLES2/gl2ext.h
+++ b/third_party/khronos/GLES2/gl2ext.h
@@ -1398,7 +1398,7 @@ typedef void (GL_APIENTRYP PFNGLGETPROGRAMINFOCHROMIUM) ();
#ifdef GL_GLEXT_PROTOTYPES
#define glEnableFeatureCHROMIUM GLES2_GET_FUN(EnableFeatureCHROMIUM)
#if !defined(GLES2_USE_CPP_BINDINGS)
-GL_APICALL void GL_APIENTRY glEnableFeatureCHROMIUM (const GLchar *feature);
+GL_APICALL GLboolean GL_APIENTRY glEnableFeatureCHROMIUM (const GLchar *feature);
#endif
#else
typedef void (GL_APIENTRYP PFNGLENABLEFEATURECHROMIUM) (const GLchar *feature);
diff --git a/third_party/khronos/GLES2/gl2platform.h b/third_party/khronos/GLES2/gl2platform.h
index c9fa3c4..f1c8520 100644
--- a/third_party/khronos/GLES2/gl2platform.h
+++ b/third_party/khronos/GLES2/gl2platform.h
@@ -19,8 +19,18 @@
#include <KHR/khrplatform.h>
-#ifndef GL_APICALL
-#define GL_APICALL KHRONOS_APICALL
+#if defined(COMPONENT_BUILD)
+#if defined(WIN32)
+#if defined(GLES2_C_LIB_IMPLEMENTATION)
+#define GL_APICALL __declspec(dllexport)
+#else
+#define GL_APICALL __declspec(dllimport)
+#endif /* defined(GLES2_C_LIB_IMPLEMENTATION) */
+#else /* defined(WIN32) */
+#define GL_APICALL __attribute__((visibility("default")))
+#endif
+#else
+# define GL_APICALL
#endif
#ifndef GL_APIENTRY
diff --git a/webkit/gpu/webkit_gpu.gypi b/webkit/gpu/webkit_gpu.gypi
index a342636..d828760 100644
--- a/webkit/gpu/webkit_gpu.gypi
+++ b/webkit/gpu/webkit_gpu.gypi
@@ -10,9 +10,10 @@
'variables': { 'enable_wexit_time_destructors': 1, },
'dependencies': [
'<(DEPTH)/base/base.gyp:base',
- '<(DEPTH)/gpu/gpu.gyp:command_buffer_service',
- '<(DEPTH)/gpu/gpu.gyp:command_buffer_client',
- '<(DEPTH)/gpu/gpu.gyp:gles2_c_lib',
+ '<(DEPTH)/gpu/gpu.gyp:command_buffer_service',
+ '<(DEPTH)/gpu/gpu.gyp:command_buffer_client',
+ '<(DEPTH)/gpu/gpu.gyp:gles2_c_lib',
+ '<(DEPTH)/gpu/gpu.gyp:gles2_implementation',
'<(DEPTH)/third_party/angle/src/build_angle.gyp:translator_glsl',
'<(DEPTH)/ui/gfx/gl/gl.gyp:gl',
],