Closed Bug 948470 Opened 11 years ago Closed 11 years ago

the surface format of a SourceSurface is not always the one of its DataSurface

Categories

(Core :: Graphics, defect)

x86_64
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla29

People

(Reporter: nical, Assigned: nical)

References

Details

(Whiteboard: [qa-])

Attachments

(1 file)

I ran into this with the following code // with a D2D DrawTarget dt which format is A8 RefPtr<SourceSurface> snapshot = dt->Snapshot(); // snapshot is A8 RefPtr<DataSourceSurface> dataSurface = snapshot->GetDataSurface(); // BGRA Visual studio tells me that the types of the objects are: dt: D2DDrawTarget snapshot: SourceSurfaceD2DDrawTarget dataSurface: DataSourceSurfaceD2DDrawTarget I don't know if we can assume that GetDataSurface returns something with the same format, or if it is okay to return a surface BGRA from an A8 one, but in my own selfish use case it triggers very slow code paths.
Summary: the surface format of a SourceSurface is not aways the one of its DataSurface → the surface format of a SourceSurface is not always the one of its DataSurface
Assignee: nobody → nical.bugzilla
Attachment #8349645 - Flags: review?(bas)
This seems like a nice invariant to have. If there aren't technical reasons to need different formats, then we should definitely do this.
Attachment #8349645 - Flags: review?(bas) → review+
Blocks: 938591
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla29
Whiteboard: [qa-]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: