Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(948)

Unified Diff: third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp

Issue 2749653003: Prototype HTMLVideoElement properties for WebGL texImage2D (Closed)
Patch Set: rebase Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 23a80094105494a3923bc6624f3127b21f2d1eb8..3982dddc41d4fd2a2963f8324dfcbaff0c419407 100644
--- a/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
+++ b/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
@@ -5293,6 +5293,7 @@ void WebGLRenderingContextBase::texImageHelperHTMLVideoElement(
if (video->copyVideoTextureToPlatformTexture(contextGL(), texture->object(),
m_unpackPremultiplyAlpha,
m_unpackFlipY)) {
+ texture->updateLastUploadedVideo(video->webMediaPlayer());
return;
}
@@ -5321,6 +5322,7 @@ void WebGLRenderingContextBase::texImageHelperHTMLVideoElement(
texture->object(), internalformat, type, level,
m_unpackPremultiplyAlpha, m_unpackFlipY, IntPoint(0, 0),
IntRect(0, 0, video->videoWidth(), video->videoHeight()))) {
+ texture->updateLastUploadedVideo(video->webMediaPlayer());
return;
}
}
@@ -5337,8 +5339,10 @@ void WebGLRenderingContextBase::texImageHelperHTMLVideoElement(
contextGL(), level, convertTexInternalFormat(internalformat, type),
format, type, xoffset, yoffset, zoffset, m_unpackFlipY,
m_unpackPremultiplyAlpha &&
- m_unpackColorspaceConversion == GL_NONE))
+ m_unpackColorspaceConversion == GL_NONE)) {
+ texture->updateLastUploadedVideo(video->webMediaPlayer());
return;
+ }
}
RefPtr<Image> image = videoFrameToImage(video);
@@ -5349,6 +5353,7 @@ void WebGLRenderingContextBase::texImageHelperHTMLVideoElement(
WebGLImageConversion::HtmlDomVideo, m_unpackFlipY,
m_unpackPremultiplyAlpha, sourceImageRect, depth,
unpackImageHeight);
+ texture->updateLastUploadedVideo(video->webMediaPlayer());
}
void WebGLRenderingContextBase::texImageBitmapByGPU(ImageBitmap* bitmap,

Powered by Google App Engine
This is Rietveld 408576698