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

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

Issue 1693953002: Minor WebGL 2 bug fixes for gl-object-get-calls test to pass (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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/WebGL2RenderingContextBase.idl » ('j') | 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 1c7f34570322ee4737cf3f6f674b437f6157b753..8651e08af3bece2e375089647a77af31d9e21061 100644
--- a/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp
+++ b/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp
@@ -2419,6 +2419,11 @@ GLuint WebGL2RenderingContextBase::getUniformBlockIndex(WebGLProgram* program, c
bool WebGL2RenderingContextBase::validateUniformBlockIndex(const char* functionName, WebGLProgram* program, GLuint blockIndex)
{
+ ASSERT(program);
+ if (!program->linkStatus()) {
+ synthesizeGLError(GL_INVALID_OPERATION, functionName, "program not linked");
+ return false;
+ }
GLint activeUniformBlocks = 0;
webContext()->getProgramiv(objectOrZero(program), GL_ACTIVE_UNIFORM_BLOCKS, &activeUniformBlocks);
if (blockIndex >= static_cast<GLuint>(activeUniformBlocks)) {
@@ -3143,9 +3148,9 @@ ScriptValue WebGL2RenderingContextBase::getFramebufferAttachmentParameter(Script
if (missingImage) {
switch (pname) {
case GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE:
- return WebGLAny(scriptState, GL_FRAMEBUFFER_DEFAULT);
+ return WebGLAny(scriptState, GL_NONE);
default:
- synthesizeGLError(GL_INVALID_ENUM, kFunctionName, "invalid parameter name");
+ synthesizeGLError(GL_INVALID_OPERATION, kFunctionName, "invalid parameter name");
return ScriptValue::createNull(scriptState);
}
}
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698