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

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

Issue 2506863002: implement tex(Sub)Image2D/3D for HTMLVideoElement (Closed)
Patch Set: roll webgl Created 4 years, 1 month 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/WebGL2RenderingContextBase.cpp
diff --git a/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp b/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp
index f77bcb688a47cceaab10999ce1ebbd2297786db2..b0e2964258793aae49e26a5b08765d1102333868 100644
--- a/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp
+++ b/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp
@@ -1363,7 +1363,9 @@ void WebGL2RenderingContextBase::texImage2D(GLenum target,
GLenum type,
HTMLVideoElement* video,
ExceptionState& exceptionState) {
- // TODO(zmo): To be implemented.
+ texImageHelperHTMLVideoElement(
+ TexImage2D, target, level, internalformat, format, type, 0, 0, 0, video,
+ getTextureSourceSubRectangle(width, height), 1, 0, exceptionState);
}
void WebGL2RenderingContextBase::texImage2D(GLenum target,
@@ -1486,10 +1488,9 @@ void WebGL2RenderingContextBase::texSubImage2D(GLenum target,
GLenum type,
HTMLImageElement* image,
ExceptionState& exceptionState) {
- texImageHelperHTMLImageElement(TexSubImage2D, target, level, 0, format, type,
- xoffset, yoffset, 0, image,
- getTextureSourceSubRectangle(width, height), 1,
- m_unpackImageHeight, exceptionState);
+ texImageHelperHTMLImageElement(
+ TexSubImage2D, target, level, 0, format, type, xoffset, yoffset, 0, image,
+ getTextureSourceSubRectangle(width, height), 1, 0, exceptionState);
}
void WebGL2RenderingContextBase::texSubImage2D(GLenum target,
@@ -1518,7 +1519,9 @@ void WebGL2RenderingContextBase::texSubImage2D(GLenum target,
GLenum type,
HTMLVideoElement* video,
ExceptionState& exceptionState) {
- // TODO(zmo): To be implemented.
+ texImageHelperHTMLVideoElement(
+ TexSubImage2D, target, level, 0, format, type, xoffset, yoffset, 0, video,
+ getTextureSourceSubRectangle(width, height), 1, 0, exceptionState);
}
void WebGL2RenderingContextBase::texSubImage2D(GLenum target,
@@ -1748,7 +1751,10 @@ void WebGL2RenderingContextBase::texImage3D(GLenum target,
GLenum type,
HTMLVideoElement* video,
ExceptionState& exceptionState) {
- // TODO(zmo): To be implemented.
+ texImageHelperHTMLVideoElement(TexImage3D, target, level, internalformat,
+ format, type, 0, 0, 0, video,
+ getTextureSourceSubRectangle(width, height),
+ depth, m_unpackImageHeight, exceptionState);
}
void WebGL2RenderingContextBase::texImage3D(GLenum target,
@@ -1882,7 +1888,10 @@ void WebGL2RenderingContextBase::texSubImage3D(GLenum target,
GLenum type,
HTMLVideoElement* video,
ExceptionState& exceptionState) {
- // TODO(zmo): To be implemented.
+ texImageHelperHTMLVideoElement(TexSubImage3D, target, level, 0, format, type,
+ xoffset, yoffset, zoffset, video,
+ getTextureSourceSubRectangle(width, height),
+ depth, m_unpackImageHeight, exceptionState);
}
void WebGL2RenderingContextBase::texSubImage3D(GLenum target,
@@ -1907,20 +1916,6 @@ void WebGL2RenderingContextBase::texSubImage3D(GLenum target,
GLint zoffset,
GLenum format,
GLenum type,
- HTMLVideoElement* video,
- ExceptionState& exceptionState) {
- texImageHelperHTMLVideoElement(TexSubImage3D, target, level, 0, format, type,
- xoffset, yoffset, zoffset, video,
- exceptionState);
-}
-
-void WebGL2RenderingContextBase::texSubImage3D(GLenum target,
- GLint level,
- GLint xoffset,
- GLint yoffset,
- GLint zoffset,
- GLenum format,
- GLenum type,
ImageBitmap* bitmap,
ExceptionState& exceptionState) {
texImageHelperImageBitmap(TexSubImage3D, target, level, 0, format, type,

Powered by Google App Engine
This is Rietveld 408576698