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

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

Issue 1573173002: Make WebGL's texImage2D and texSubImage2D handle cross-origin ImageBitmap (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: layout test passed :) Created 4 years, 11 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.h
diff --git a/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h b/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h
index a15a0c46362577ec9704dfe57d6d0674db3aff38..8adb6e2843280aa7c47195cda6c94bf4893e32eb 100644
--- a/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h
+++ b/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h
@@ -303,7 +303,7 @@ public:
void texImage2D(GLenum target, GLint level, GLint internalformat,
GLenum format, GLenum type, HTMLVideoElement*, ExceptionState&);
void texImage2D(GLenum target, GLint level, GLint internalformat,
- GLenum format, GLenum type, PassRefPtrWillBeRawPtr<ImageBitmap>);
+ GLenum format, GLenum type, PassRefPtrWillBeRawPtr<ImageBitmap>, ExceptionState&);
void texParameterf(GLenum target, GLenum pname, GLfloat param);
void texParameteri(GLenum target, GLenum pname, GLint param);
@@ -320,7 +320,7 @@ public:
void texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset,
GLenum format, GLenum type, HTMLVideoElement*, ExceptionState&);
void texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset,
- GLenum format, GLenum type, PassRefPtrWillBeRawPtr<ImageBitmap>);
+ GLenum format, GLenum type, PassRefPtrWillBeRawPtr<ImageBitmap>, ExceptionState&);
void uniform1f(const WebGLUniformLocation*, GLfloat x);
void uniform1fv(const WebGLUniformLocation*, const FlexibleFloat32ArrayView&);
@@ -1025,6 +1025,9 @@ protected:
// Helper function for tex{Sub}Image2D to make sure video is ready wouldn't taint Origin.
bool validateHTMLVideoElement(const char* functionName, HTMLVideoElement*, ExceptionState&);
+ // Helper function for tex{Sub}Image2D to make sure imagebitmap is ready and wouldn't taint Origin.
+ bool validateImageBitmap(const char* functionName, ImageBitmap*, ExceptionState&);
+
// Helper function to validate drawArrays(Instanced) calls
bool validateDrawArrays(const char* functionName, GLenum mode, GLint first, GLsizei count);

Powered by Google App Engine
This is Rietveld 408576698