[D2D] New surfaces need to be cleared before use

RESOLVED FIXED

Status

()

Core
Graphics
RESOLVED FIXED
7 years ago
7 years ago

People

(Reporter: bas, Assigned: bas)

Tracking

Trunk
x86
Windows 7
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

7 years ago
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.
Attachment #447888 - Flags: review?(jmuizelaar)
(Assignee)

Updated

7 years ago
No longer blocks: 567396
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?
Attachment #447888 - Flags: review?(jmuizelaar) → review-
(Assignee)

Comment 2

7 years ago
(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.
(Assignee)

Comment 3

7 years ago
Created attachment 448074 [details] [diff] [review]
Clear surfaces when created v2

Fixed review comments.
Attachment #447888 - Attachment is obsolete: true
Attachment #448074 - Flags: review?(jmuizelaar)
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.
Attachment #448074 - Flags: review?(jmuizelaar) → review+
(Assignee)

Comment 5

7 years ago
Pushed http://hg.mozilla.org/mozilla-central/rev/d8a36dd3fc3c.
Status: ASSIGNED → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → FIXED
(Assignee)

Updated

7 years ago
Blocks: 569166
You need to log in before you can comment on or make changes to this bug.