Bug 87032

Summary: Restore WebGL's framebuffer binding after DrawingBuffer's prepareBackBuffer()
Product: WebKit Reporter: Zhenyao Mo <zmo>
Component: WebGLAssignee: Zhenyao Mo <zmo>
Status: RESOLVED FIXED    
Severity: Normal CC: cc-bugs, gman, jamesr, kbr, twiz, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch jamesr: review+

Description Zhenyao Mo 2012-05-21 11:19:42 PDT
This is regressed again.  Last time I added restoreFramebufferBinding(), now this function is no longer called anywhere, and apparently that caused the binding to be lost.
Comment 1 Zhenyao Mo 2012-05-21 11:39:24 PDT
Created attachment 143066 [details]
Patch
Comment 2 Zhenyao Mo 2012-05-21 11:40:25 PDT
Please review.  Once this lands and webkit rolls, I'll make sure to enable related webgl conformance tests in chromium immediately.
Comment 3 James Robinson 2012-05-21 11:48:08 PDT
Comment on attachment 143066 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=143066&action=review

> Source/WebCore/platform/graphics/chromium/DrawingBufferChromium.cpp:138
>      if (multisample())
>          bind();
> +
> +    restoreFramebufferBinding();

Something here is clearly wrong.  line 136 is binding m_multisampleFBO ? m_multisampleFBO : m_fbo.  Line 138 is binding m_framebufferBinding.  We should make up our mind and just bind one.
Comment 4 Zhenyao Mo 2012-05-21 13:04:56 PDT
Created attachment 143083 [details]
Patch
Comment 5 Zhenyao Mo 2012-05-21 13:05:18 PDT
Revised, please have another look.
Comment 6 James Robinson 2012-05-21 13:16:37 PDT
Comment on attachment 143083 [details]
Patch

Thanks, that does look better.
Comment 7 Kenneth Russell 2012-05-21 13:49:33 PDT
Comment on attachment 143083 [details]
Patch

Looks fine to me too.
Comment 8 Zhenyao Mo 2012-05-21 14:00:26 PDT
Committed r117814: <http://trac.webkit.org/changeset/117814>