| Index: Source/core/html/canvas/WebGLRenderingContextBase.cpp
|
| diff --git a/Source/core/html/canvas/WebGLRenderingContextBase.cpp b/Source/core/html/canvas/WebGLRenderingContextBase.cpp
|
| index 0cd98f6b376455e9704cdcd207c4bbf0f8d0f9e8..87d0647e0800569699f2ededda5386d997486bbd 100644
|
| --- a/Source/core/html/canvas/WebGLRenderingContextBase.cpp
|
| +++ b/Source/core/html/canvas/WebGLRenderingContextBase.cpp
|
| @@ -3826,7 +3826,7 @@ void WebGLRenderingContextBase::texImage2DCanvasByGPU(TexImageFunctionType funct
|
| GLint targetLevel = level;
|
| bool possibleDirectCopy = false;
|
| if (functionType == NotTexSubImage2D) {
|
| - possibleDirectCopy = GL_TEXTURE_2D == target && Extensions3DUtil::canUseCopyTextureCHROMIUM(internalformat, type, level);
|
| + possibleDirectCopy = Extensions3DUtil::canUseCopyTextureCHROMIUM(target, internalformat, type, level);
|
| } else if (functionType == TexSubImage2D) {
|
| possibleDirectCopy = false;
|
| }
|
| @@ -3923,8 +3923,8 @@ void WebGLRenderingContextBase::texImage2D(GLenum target, GLint level, GLenum in
|
| // Otherwise, it will fall back to the normal SW path.
|
| WebGLTexture* texture = validateTextureBinding("texImage2D", target, true);
|
| ASSERT(texture);
|
| - if (GL_TEXTURE_2D == target) {
|
| - if (video->copyVideoTextureToPlatformTexture(webContext(), texture->object(), level, internalformat, type, m_unpackPremultiplyAlpha, m_unpackFlipY)) {
|
| + if (Extensions3DUtil::canUseCopyTextureCHROMIUM(target, internalformat, type, level)) {
|
| + if (video->copyVideoTextureToPlatformTexture(webContext(), texture->object(), internalformat, type, m_unpackPremultiplyAlpha, m_unpackFlipY)) {
|
| texture->setLevelInfo(target, level, internalformat, video->videoWidth(), video->videoHeight(), 1, type);
|
| return;
|
| }
|
|
|