| Index: webkit/gpu/webgraphicscontext3d_in_process_impl.cc
|
| diff --git a/webkit/gpu/webgraphicscontext3d_in_process_impl.cc b/webkit/gpu/webgraphicscontext3d_in_process_impl.cc
|
| index 909cabe2737ce8aef5efae2d2d0433c67f508a4b..38567cd9bbc613ee97e9c6dace88a8db691ce38b 100644
|
| --- a/webkit/gpu/webgraphicscontext3d_in_process_impl.cc
|
| +++ b/webkit/gpu/webgraphicscontext3d_in_process_impl.cc
|
| @@ -1330,6 +1330,17 @@ void WebGraphicsContext3DInProcessImpl::texImage2D(
|
| WGC3Dsizei width, WGC3Dsizei height, WGC3Dint border,
|
| WGC3Denum format, WGC3Denum type, const void* pixels) {
|
| makeContextCurrent();
|
| + if (gfx::GetGLImplementation() != gfx::kGLImplementationEGLGLES2) {
|
| + if (format == GL_BGRA_EXT && internalFormat == GL_BGRA_EXT) {
|
| + internalFormat = GL_RGBA;
|
| + } else if (type == GL_FLOAT) {
|
| + if (format == GL_RGBA) {
|
| + internalFormat = GL_RGBA32F_ARB;
|
| + } else if (format == GL_RGB) {
|
| + internalFormat = GL_RGB32F_ARB;
|
| + }
|
| + }
|
| + }
|
| glTexImage2D(target, level, internalFormat,
|
| width, height, border, format, type, pixels);
|
| }
|
|
|