diff options
author | Andras Becsi <andras.becsi@digia.com> | 2014-03-18 13:16:26 +0100 |
---|---|---|
committer | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2014-03-20 15:55:39 +0100 |
commit | 3f0f86b0caed75241fa71c95a5d73bc0164348c5 (patch) | |
tree | 92b9fb00f2e9e90b0be2262093876d4f43b6cd13 /chromium/ui/gl/gl_gl_api_implementation.cc | |
parent | e90d7c4b152c56919d963987e2503f9909a666d2 (diff) | |
download | qtwebengine-chromium-3f0f86b0caed75241fa71c95a5d73bc0164348c5.tar.gz |
Update to new stable branch 1750
This also includes an updated ninja and chromium dependencies
needed on Windows.
Change-Id: Icd597d80ed3fa4425933c9f1334c3c2e31291c42
Reviewed-by: Zoltan Arvai <zarvai@inf.u-szeged.hu>
Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
Diffstat (limited to 'chromium/ui/gl/gl_gl_api_implementation.cc')
-rw-r--r-- | chromium/ui/gl/gl_gl_api_implementation.cc | 31 |
1 files changed, 28 insertions, 3 deletions
diff --git a/chromium/ui/gl/gl_gl_api_implementation.cc b/chromium/ui/gl/gl_gl_api_implementation.cc index 03d13029da5..eade3cedaf5 100644 --- a/chromium/ui/gl/gl_gl_api_implementation.cc +++ b/chromium/ui/gl/gl_gl_api_implementation.cc @@ -26,7 +26,7 @@ static TraceGLApi* g_trace_gl; namespace { -static inline GLenum GetTexInternalFormat(GLenum internal_format) { +static inline GLenum GetInternalFormat(GLenum internal_format) { if (gfx::GetGLImplementation() != gfx::kGLImplementationEGLGLES2) { if (internal_format == GL_BGRA_EXT || internal_format == GL_BGRA8_EXT) return GL_RGBA8; @@ -38,7 +38,7 @@ static inline GLenum GetTexInternalFormat(GLenum internal_format) { static inline GLenum GetTexInternalFormat(GLenum internal_format, GLenum format, GLenum type) { - GLenum gl_internal_format = GetTexInternalFormat(internal_format); + GLenum gl_internal_format = GetInternalFormat(internal_format); if (gfx::GetGLImplementation() == gfx::kGLImplementationEGLGLES2) return gl_internal_format; @@ -120,11 +120,30 @@ static void GL_BINDING_CALL CustomTexSubImage2D( static void GL_BINDING_CALL CustomTexStorage2DEXT( GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height) { - GLenum gl_internal_format = GetTexInternalFormat(internalformat); + GLenum gl_internal_format = GetInternalFormat(internalformat); return g_driver_gl.orig_fn.glTexStorage2DEXTFn( target, levels, gl_internal_format, width, height); } +static void GL_BINDING_CALL CustomRenderbufferStorageEXT( + GLenum target, GLenum internalformat, GLsizei width, GLsizei height) { + GLenum gl_internal_format = GetInternalFormat(internalformat); + return g_driver_gl.orig_fn.glRenderbufferStorageEXTFn( + target, gl_internal_format, width, height); +} + +// The ANGLE and IMG variants of glRenderbufferStorageMultisample currently do +// not support BGRA render buffers so only the EXT one is customized. If +// GL_CHROMIUM_renderbuffer_format_BGRA8888 support is added to ANGLE then the +// ANGLE version should also be customized. +static void GL_BINDING_CALL CustomRenderbufferStorageMultisampleEXT( + GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, + GLsizei height) { + GLenum gl_internal_format = GetInternalFormat(internalformat); + return g_driver_gl.orig_fn.glRenderbufferStorageMultisampleEXTFn( + target, samples, gl_internal_format, width, height); +} + } // anonymous namespace void DriverGL::Initialize() { @@ -140,6 +159,12 @@ void DriverGL::InitializeExtensions(GLContext* context) { reinterpret_cast<glTexSubImage2DProc>(CustomTexSubImage2D); fn.glTexStorage2DEXTFn = reinterpret_cast<glTexStorage2DEXTProc>(CustomTexStorage2DEXT); + fn.glRenderbufferStorageEXTFn = + reinterpret_cast<glRenderbufferStorageEXTProc>( + CustomRenderbufferStorageEXT); + fn.glRenderbufferStorageMultisampleEXTFn = + reinterpret_cast<glRenderbufferStorageMultisampleEXTProc>( + CustomRenderbufferStorageMultisampleEXT); } void InitializeGLBindingsGL() { |