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

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

Issue 1311413003: Remove duplicate formats and types validation (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 4 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/webgl/WebGLRenderingContextBase.cpp
diff --git a/Source/modules/webgl/WebGLRenderingContextBase.cpp b/Source/modules/webgl/WebGLRenderingContextBase.cpp
index 4e53c20f450f360fc3c6306714410d5e20994055..1388fc214e85a14acecf3066ecbad9fe41b014ff 100644
--- a/Source/modules/webgl/WebGLRenderingContextBase.cpp
+++ b/Source/modules/webgl/WebGLRenderingContextBase.cpp
@@ -4122,8 +4122,8 @@ void WebGLRenderingContextBase::texImage2D(GLenum target, GLint level, GLenum in
GLsizei width, GLsizei height, GLint border,
GLenum format, GLenum type, DOMArrayBufferView* pixels)
{
- if (isContextLost() || !validateTexFuncData("texImage2D", level, width, height, internalformat, format, type, pixels, NullAllowed)
- || !validateTexFunc("texImage2D", NotTexSubImage2D, SourceArrayBufferView, target, level, internalformat, width, height, border, format, type, 0, 0))
+ if (isContextLost() || !validateTexFunc("texImage2D", NotTexSubImage2D, SourceArrayBufferView, target, level, internalformat, width, height, border, format, type, 0, 0)
+ || !validateTexFuncData("texImage2D", level, width, height, internalformat, format, type, pixels, NullAllowed))
return;
void* data = pixels ? pixels->baseAddress() : 0;
Vector<uint8_t> tempData;
@@ -4448,8 +4448,8 @@ void WebGLRenderingContextBase::texSubImage2D(GLenum target, GLint level, GLint
return;
GLenum internalformat = texture->getInternalFormat(target, level);
- if (isContextLost() || !validateTexFuncData("texSubImage2D", level, width, height, internalformat, format, type, pixels, NullNotAllowed)
- || !validateTexFunc("texSubImage2D", TexSubImage2D, SourceArrayBufferView, target, level, 0, width, height, 0, format, type, xoffset, yoffset))
+ if (isContextLost() || !validateTexFunc("texSubImage2D", TexSubImage2D, SourceArrayBufferView, target, level, 0, width, height, 0, format, type, xoffset, yoffset)
+ || !validateTexFuncData("texSubImage2D", level, width, height, internalformat, format, type, pixels, NullNotAllowed))
return;
void* data = pixels->baseAddress();
Vector<uint8_t> tempData;
@@ -5531,8 +5531,6 @@ bool WebGLRenderingContextBase::validateTexFuncData(const char* functionName, GL
return false;
}
- if (!validateTexFuncFormatAndType(functionName, internalformat, format, type, level))
- return false;
if (!validateSettableTexFormat(functionName, format))
return false;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698