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

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

Issue 2959893002: FramebufferRenderbuffer() generates INVALID_OP if renderbuffer has never been bound. (Closed)
Patch Set: Created 3 years, 6 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 | « gpu/command_buffer/service/gles2_cmd_decoder_unittest_framebuffers.cc ('k') | 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/WebGLRenderingContextBase.cpp
diff --git a/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp b/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
index 3d05dca2b76522876991002f95137f0c932d7a91..0dfe7cf06037baf95da62d9bda336aac7d322fac 100644
--- a/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
+++ b/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
@@ -2519,9 +2519,10 @@ void WebGLRenderingContextBase::framebufferRenderbuffer(
"invalid target");
return;
}
- if (buffer && !buffer->Validate(ContextGroup(), this)) {
+ if (buffer && (!buffer->HasEverBeenBound() ||
+ !buffer->Validate(ContextGroup(), this))) {
SynthesizeGLError(GL_INVALID_OPERATION, "framebufferRenderbuffer",
- "no buffer or buffer not from this context");
+ "buffer never bound or buffer not from this context");
return;
}
// Don't allow the default framebuffer to be mutated; all current
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder_unittest_framebuffers.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698