Make nsWindowsShellService's WriteBitmap act on a Moz2D SourceSurface instead of a Thebes gfxASurface

RESOLVED FIXED in mozilla30

Status

()

defect
RESOLVED FIXED
6 years ago
5 years ago

People

(Reporter: jwatt, Assigned: jwatt)

Tracking

(Blocks 2 bugs)

Trunk
mozilla30
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 2 obsolete attachments)

Assignee

Description

6 years ago
As part of converting imgIContainer::GetFrame to return a Moz2D SourceSurface instead of a Thebes gfxASurface, we should nsWindowsShellService's WriteBitmap function act on a Moz2D SourceSurface instead of a Thebes gfxASurface.
Assignee

Comment 1

6 years ago
Posted patch patch (obsolete) — Splinter Review
Not tested yet. May need some tweaks to get the rows and bytes written out in the correct order.
Assignee

Updated

6 years ago
Blocks: 950372
Assignee

Comment 2

5 years ago
Posted patch patch (obsolete) — Splinter Review
I had some trouble with linking, but this works.
Attachment #8347637 - Attachment is obsolete: true
Attachment #8385801 - Flags: review?(matt.woodrow)
Assignee

Comment 3

5 years ago
Posted patch patchSplinter Review
Attachment #8385801 - Attachment is obsolete: true
Attachment #8385801 - Flags: review?(matt.woodrow)
Attachment #8385805 - Flags: review?(matt.woodrow)
Comment on attachment 8385805 [details] [diff] [review]
patch

Review of attachment 8385805 [details] [diff] [review]:
-----------------------------------------------------------------

::: browser/components/shell/src/nsWindowsShellService.cpp
@@ +764,4 @@
>  
> +  RefPtr<DataSourceSurface> dataSurface =
> +    thebesImageSurface->CopyToB8G8R8A8DataSourceSurface();
> +  NS_ENSURE_TRUE(dataSurface, NS_ERROR_FAILURE);

You could use Factory::CreateWrappingDataSourceSurface here instead of making an actual copy. I guess it doesn't matter much if GetFrame is about to change to return a SourceSurface.
Attachment #8385805 - Flags: review?(matt.woodrow) → review+
https://hg.mozilla.org/mozilla-central/rev/012f4e24dba1
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla30
You need to log in before you can comment on or make changes to this bug.