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

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

Issue 2370703003: Validate internalformat/format/type for uploading DOM elements to texture (Closed)
Patch Set: fix some nits Created 4 years, 2 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 e0f4e8ec0abc1202cf33aa7cda7efe3329afaa51..8e4a210338214763eee6a6e64e14e5f582f358b1 100644
--- a/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h
+++ b/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h
@@ -916,6 +916,7 @@ class MODULES_EXPORT WebGLRenderingContextBase : public CanvasRenderingContext {
Vector<GLenum> m_syntheticErrors;
bool m_isWebGL2FormatsTypesAdded;
+ bool m_isWebGL2TexImageSourceFormatsTypesAdded;
bool m_isWebGL2InternalFormatsCopyTexImageAdded;
bool m_isOESTextureFloatFormatsTypesAdded;
bool m_isOESTextureHalfFloatFormatsTypesAdded;
@@ -923,9 +924,12 @@ class MODULES_EXPORT WebGLRenderingContextBase : public CanvasRenderingContext {
bool m_isEXTsRGBFormatsTypesAdded;
std::set<GLenum> m_supportedInternalFormats;
+ std::set<GLenum> m_supportedTexImageSourceInternalFormats;
std::set<GLenum> m_supportedInternalFormatsCopyTexImage;
std::set<GLenum> m_supportedFormats;
+ std::set<GLenum> m_supportedTexImageSourceFormats;
std::set<GLenum> m_supportedTypes;
+ std::set<GLenum> m_supportedTexImageSourceTypes;
// Helpers for getParameter and others
ScriptValue getBooleanParameter(ScriptState*, GLenum);
@@ -1057,7 +1061,17 @@ class MODULES_EXPORT WebGLRenderingContextBase : public CanvasRenderingContext {
WebGLTexture* validateTexture2DBinding(const char* functionName,
GLenum target);
- // Helper function to check input internalformat/format/type for functions {copy}Tex{Sub}Image.
+ void addExtensionSupportedFormatsTypes();
+
+ // Helper function to check input internalformat/format/type for functions Tex{Sub}Image taking TexImageSource source data.
+ // Generates GL error and returns false if parameters are invalid.
+ bool validateTexImageSourceFormatAndType(const char* functionName,
+ TexImageFunctionType,
+ GLenum internalformat,
+ GLenum format,
+ GLenum type);
+
+ // Helper function to check input internalformat/format/type for functions Tex{Sub}Image.
// Generates GL error and returns false if parameters are invalid.
bool validateTexFuncFormatAndType(const char* functionName,
TexImageFunctionType,
@@ -1144,6 +1158,7 @@ class MODULES_EXPORT WebGLRenderingContextBase : public CanvasRenderingContext {
// Generates GL error and returns false if parameters are invalid.
bool validateTexFuncParameters(const char* functionName,
TexImageFunctionType,
+ TexFuncValidationSourceType,
GLenum target,
GLint level,
GLenum internalformat,
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698