WebGL spec: 6.8 Blending With Constant Color In the WebGL API, constant color and constant alpha cannot be used together as source and destination factors in the blend function. A call to blendFunc will generate an INVALID_OPERATION error if one of the two factors is set to CONSTANT_COLOR or ONE_MINUS_CONSTANT_COLOR and the other to CONSTANT_ALPHA or ONE_MINUS_CONSTANT_ALPHA. A call to blendFuncSeparate will generate an INVALID_OPERATION error if srcRGB is set to CONSTANT_COLOR or ONE_MINUS_CONSTANT_COLOR and dstRGB is set to CONSTANT_ALPHA or ONE_MINUS_CONSTANT_ALPHA or vice versa.
Created attachment 72595 [details] patch test synched with khronos and I commented out the still failing parts.
Comment on attachment 72595 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=72595&action=review > WebCore/html/canvas/WebGLRenderingContext.cpp:372 > + && (srcRGB == GraphicsContext3D::CONSTANT_ALPHA || srcRGB == GraphicsContext3D::ONE_MINUS_CONSTANT_ALPHA))) { Please factor out this logic into a helper function or method and call it from both blendFunc and blendFuncSeparate.
Created attachment 72759 [details] revised patch: responding to kbr's review
Comment on attachment 72759 [details] revised patch: responding to kbr's review Looks good.
Committed r71185: <http://trac.webkit.org/changeset/71185>