Last Comment Bug 568719 - [D2D] New surfaces need to be cleared before use
: [D2D] New surfaces need to be cleared before use
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Graphics (show other bugs)
: Trunk
: x86 Windows 7
: -- normal (vote)
: ---
Assigned To: Bas Schouten (:bas.schouten)
:
Mentors:
Depends on:
Blocks: 567422 567433 567434 567438 567442 567447 567452 569166
  Show dependency treegraph
 
Reported: 2010-05-27 17:41 PDT by Bas Schouten (:bas.schouten)
Modified: 2010-05-30 17:43 PDT (History)
4 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Clear surfaces when created (2.68 KB, patch)
2010-05-27 17:41 PDT, Bas Schouten (:bas.schouten)
jmuizelaar: review-
Details | Diff | Splinter Review
Clear surfaces when created v2 (2.45 KB, patch)
2010-05-28 13:12 PDT, Bas Schouten (:bas.schouten)
jmuizelaar: review+
Details | Diff | Splinter Review

Description Bas Schouten (:bas.schouten) 2010-05-27 17:41:54 PDT
Created attachment 447888 [details] [diff] [review]
Clear surfaces when created

There's several bugs particularly with SVG filters that point this problem out when using NVidia drivers and Direct2D without the debug layer. The drivers can choose to reuse existing video memory, which already contains data. We need to make sure our surfaces are empty before using them.
Comment 1 Jeff Muizelaar [:jrmuizel] 2010-05-28 11:22:16 PDT
Comment on attachment 447888 [details] [diff] [review]
Clear surfaces when created

Seems like this should move into a helper function and add a comment about why it needs to be done. It also looks like this patch adds a Flush(). What's that for?
Comment 2 Bas Schouten (:bas.schouten) 2010-05-28 11:36:54 PDT
(In reply to comment #1)
> (From update of attachment 447888 [details] [diff] [review])
> Seems like this should move into a helper function and add a comment about why
> it needs to be done. It also looks like this patch adds a Flush(). What's that
> for?

I can move it into a helper function. The flush needs to go away, it serves no purpose and ended up in there by accident.
Comment 3 Bas Schouten (:bas.schouten) 2010-05-28 13:12:15 PDT
Created attachment 448074 [details] [diff] [review]
Clear surfaces when created v2

Fixed review comments.
Comment 4 Jeff Muizelaar [:jrmuizel] 2010-05-28 14:08:24 PDT
Comment on attachment 448074 [details] [diff] [review]
Clear surfaces when created v2

The comment should include why we need to clear surface. It does not need to include "This clears a D2D surface", that is obvious from the function name.
Comment 5 Bas Schouten (:bas.schouten) 2010-05-28 18:17:34 PDT
Pushed http://hg.mozilla.org/mozilla-central/rev/d8a36dd3fc3c.

Note You need to log in before you can comment on or make changes to this bug.