| Index: third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
|
| diff --git a/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp b/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
|
| index 42972294f3d78d5904bd7dc548708e646f034219..0a8867d688f78d01265dcc01fdcbae31dc319c57 100644
|
| --- a/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
|
| +++ b/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
|
| @@ -5217,9 +5217,17 @@ void WebGLRenderingContextBase::texImageHelperHTMLVideoElement(
|
| // Go through the fast path doing a GPU-GPU textures copy without a readback
|
| // to system memory if possible. Otherwise, it will fall back to the normal
|
| // SW path.
|
| - if (video->copyVideoTextureToPlatformTexture(
|
| - contextGL(), texture->object(), internalformat, type,
|
| - m_unpackPremultiplyAlpha, m_unpackFlipY)) {
|
| +
|
| + // Note that neither
|
| + // HTMLVideoElement::copyVideoTextureToPlatformTexture nor
|
| + // ImageBuffer::copyToPlatformTexture allocate the destination texture
|
| + // any more.
|
| + texImage2DBase(target, level, internalformat, video->videoWidth(),
|
| + video->videoHeight(), 0, format, type, nullptr);
|
| +
|
| + if (video->copyVideoTextureToPlatformTexture(contextGL(), texture->object(),
|
| + m_unpackPremultiplyAlpha,
|
| + m_unpackFlipY)) {
|
| return;
|
| }
|
|
|
| @@ -5243,11 +5251,6 @@ void WebGLRenderingContextBase::texImageHelperHTMLVideoElement(
|
| // This is a straight GPU-GPU copy, any necessary color space conversion
|
| // was handled in the paintCurrentFrameInContext() call.
|
|
|
| - // Note that copyToPlatformTexture no longer allocates the destination
|
| - // texture.
|
| - texImage2DBase(target, level, internalformat, video->videoWidth(),
|
| - video->videoHeight(), 0, format, type, nullptr);
|
| -
|
| if (imageBuffer->copyToPlatformTexture(
|
| functionIDToSnapshotReason(functionID), contextGL(),
|
| texture->object(), internalformat, type, level,
|
|
|