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

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

Issue 2501243002: Fix a minor bug in compressedTex{Sub}Image in blink. (Closed)
Patch Set: 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
« 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: 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 7f0237550d6fe1a8e62abe9492834d8600182d88..925955027403e515b051b401ae221e564600ef06 100644
--- a/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp
+++ b/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp
@@ -2010,6 +2010,7 @@ void WebGL2RenderingContextBase::compressedTexImage2D(
} else if (srcLengthOverride > data->byteLength() - srcOffset) {
synthesizeGLError(GL_INVALID_VALUE, "compressedTexImage2D",
"srcLengthOverride is out of range");
+ return;
}
contextGL()->CompressedTexImage2D(
target, level, internalformat, width, height, border, srcLengthOverride,
@@ -2056,6 +2057,7 @@ void WebGL2RenderingContextBase::compressedTexSubImage2D(
} else if (srcLengthOverride > data->byteLength() - srcOffset) {
synthesizeGLError(GL_INVALID_VALUE, "compressedTexImage2D",
"srcLengthOverride is out of range");
+ return;
}
contextGL()->CompressedTexSubImage2D(
target, level, xoffset, yoffset, width, height, format, srcLengthOverride,
@@ -2089,6 +2091,7 @@ void WebGL2RenderingContextBase::compressedTexImage3D(
} else if (srcLengthOverride > data->byteLength() - srcOffset) {
synthesizeGLError(GL_INVALID_VALUE, "compressedTexImage3D",
"srcLengthOverride is out of range");
+ return;
}
contextGL()->CompressedTexImage3D(
target, level, internalformat, width, height, depth, border,
@@ -2125,6 +2128,7 @@ void WebGL2RenderingContextBase::compressedTexSubImage3D(
} else if (srcLengthOverride > data->byteLength() - srcOffset) {
synthesizeGLError(GL_INVALID_VALUE, "compressedTexSubImage3D",
"srcLengthOverride is out of range");
+ return;
}
contextGL()->CompressedTexSubImage3D(
target, level, xoffset, yoffset, zoffset, width, height, depth, format,
« 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