diff options
author | Ben Murdoch <benm@google.com> | 2011-06-02 12:07:03 +0100 |
---|---|---|
committer | Ben Murdoch <benm@google.com> | 2011-06-10 10:47:21 +0100 |
commit | 2daae5fd11344eaa88a0d92b0f6d65f8d2255c00 (patch) | |
tree | e4964fbd1cb70599f7718ff03e50ea1dab33890b /Source/WebCore/platform/graphics/opengl/Extensions3DOpenGL.cpp | |
parent | 87bdf0060a247bfbe668342b87e0874182e0ffa9 (diff) | |
download | external_webkit-2daae5fd11344eaa88a0d92b0f6d65f8d2255c00.zip external_webkit-2daae5fd11344eaa88a0d92b0f6d65f8d2255c00.tar.gz external_webkit-2daae5fd11344eaa88a0d92b0f6d65f8d2255c00.tar.bz2 |
Merge WebKit at r84325: Initial merge by git.
Change-Id: Ic1a909300ecc0a13ddc6b4e784371d2ac6e3d59b
Diffstat (limited to 'Source/WebCore/platform/graphics/opengl/Extensions3DOpenGL.cpp')
-rw-r--r-- | Source/WebCore/platform/graphics/opengl/Extensions3DOpenGL.cpp | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGL.cpp b/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGL.cpp index e09534e..4c7164e 100644 --- a/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGL.cpp +++ b/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGL.cpp @@ -35,6 +35,8 @@ #if PLATFORM(MAC) #include "ANGLE/ShaderLang.h" #include <OpenGL/gl.h> +#elif PLATFORM(GTK) +#include "OpenGLShims.h" #endif namespace WebCore { @@ -116,6 +118,17 @@ void Extensions3DOpenGL::ensureEnabled(const String& name) #endif } +bool Extensions3DOpenGL::isEnabled(const String& name) +{ +#if PLATFORM(MAC) + if (name == "GL_OES_standard_derivatives") { + ANGLEWebKitBridge& compiler = m_context->m_compiler; + return compiler.getResources().OES_standard_derivatives; + } +#endif + return supports(name); +} + int Extensions3DOpenGL::getGraphicsResetStatusARB() { return GraphicsContext3D::NO_ERROR; @@ -134,7 +147,7 @@ void Extensions3DOpenGL::renderbufferStorageMultisample(unsigned long target, un Platform3DObject Extensions3DOpenGL::createVertexArrayOES() { m_context->makeContextCurrent(); -#if defined GL_APPLE_vertex_array_object && GL_APPLE_vertex_array_object +#if !PLATFORM(GTK) && defined(GL_APPLE_vertex_array_object) && GL_APPLE_vertex_array_object GLuint array = 0; glGenVertexArraysAPPLE(1, &array); return array; @@ -149,7 +162,7 @@ void Extensions3DOpenGL::deleteVertexArrayOES(Platform3DObject array) return; m_context->makeContextCurrent(); -#if defined GL_APPLE_vertex_array_object && GL_APPLE_vertex_array_object +#if !PLATFORM(GTK) && defined(GL_APPLE_vertex_array_object) && GL_APPLE_vertex_array_object glDeleteVertexArraysAPPLE(1, &array); #endif } @@ -160,7 +173,7 @@ GC3Dboolean Extensions3DOpenGL::isVertexArrayOES(Platform3DObject array) return GL_FALSE; m_context->makeContextCurrent(); -#if defined GL_APPLE_vertex_array_object && GL_APPLE_vertex_array_object +#if !PLATFORM(GTK) && defined(GL_APPLE_vertex_array_object) && GL_APPLE_vertex_array_object return glIsVertexArrayAPPLE(array); #else return GL_FALSE; @@ -173,7 +186,7 @@ void Extensions3DOpenGL::bindVertexArrayOES(Platform3DObject array) return; m_context->makeContextCurrent(); -#if defined GL_APPLE_vertex_array_object && GL_APPLE_vertex_array_object +#if !PLATFORM(GTK) && defined(GL_APPLE_vertex_array_object) && GL_APPLE_vertex_array_object glBindVertexArrayAPPLE(array); #endif } |