Bug 58956 - WebGL context drawing buffer may not be cleared if FBO bound
Summary: WebGL context drawing buffer may not be cleared if FBO bound
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebGL (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: John Bauman
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-19 18:17 PDT by John Bauman
Modified: 2011-04-21 23:08 PDT (History)
3 users (show)

See Also:


Attachments
Patch (5.31 KB, patch)
2011-04-19 21:24 PDT, John Bauman
no flags Details | Formatted Diff | Diff
Patch (5.28 KB, patch)
2011-04-21 16:42 PDT, John Bauman
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description John Bauman 2011-04-19 18:17:40 PDT
Currently, we don't clear the drawing buffer after compositing while an FBO is bound to the context. This is normally ok, as the drawing buffer will be cleared when it's bound and something happens to it, but it will cause any texImage2D/drawImage/toDataURL from the canvas to see the old contents.
Comment 1 John Bauman 2011-04-19 21:24:07 PDT
Created attachment 90302 [details]
Patch
Comment 2 Zhenyao Mo 2011-04-20 10:40:27 PDT
Comment on attachment 90302 [details]
Patch

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

Looks good.

> Source/WebCore/html/canvas/WebGLRenderingContext.h:454
> +    bool m_depthMask;

Please use GC3Dboolean instead of bool.
Comment 3 Kenneth Russell 2011-04-20 13:34:47 PDT
Comment on attachment 90302 [details]
Patch

Looks good overall. Could you please submit a revised patch addressing Mo's feedback?
Comment 4 John Bauman 2011-04-21 16:42:29 PDT
Created attachment 90632 [details]
Patch
Comment 5 Kenneth Russell 2011-04-21 16:45:39 PDT
Comment on attachment 90632 [details]
Patch

Looks good.
Comment 6 WebKit Commit Bot 2011-04-21 23:07:11 PDT
The commit-queue encountered the following flaky tests while processing attachment 90632 [details]:

http/tests/xmlhttprequest/encode-request-url-2.html bug 51765 (author: ap@webkit.org)
The commit-queue is continuing to process your patch.
Comment 7 WebKit Commit Bot 2011-04-21 23:08:38 PDT
Comment on attachment 90632 [details]
Patch

Clearing flags on attachment: 90632

Committed r84602: <http://trac.webkit.org/changeset/84602>
Comment 8 WebKit Commit Bot 2011-04-21 23:08:43 PDT
All reviewed patches have been landed.  Closing bug.