Closed Bug 979905 Opened 9 years ago Closed 9 years ago

Make VectorImage use a Moz2D backed gfxContext

Categories

(Core :: Graphics, defect)

29 Branch
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla30

People

(Reporter: jwatt, Assigned: jwatt)

References

(Blocks 2 open bugs)

Details

Attachments

(1 file, 2 obsolete files)

We should make VectorImage use a Moz2D backed gfxContext.

Working out the issues that we'll encounter trying to do this will smooth the path for converting imgIContainer::GetFrame to return a Moz2D SourceSurface instead of a Thebes gfxASurface (bug 950372).
Attached patch patch (obsolete) — Splinter Review
Waiting on Try to see exactly what fails as a result of this.
Comment on attachment 8386144 [details] [diff] [review]
patch

Surprisingly this seems to pass Try without causing any annoying slightly-different-pixel-value failures. \o/
Attachment #8386144 - Attachment description: WIP → patch
Attachment #8386144 - Flags: review?(matt.woodrow)
Comment on attachment 8386144 [details] [diff] [review]
patch

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

::: image/src/VectorImage.cpp
@@ +680,5 @@
>  
> +  RefPtr<DataSourceSurface> dataSurface =
> +    Factory::CreateDataSourceSurface(IntSize(imageIntSize.width,
> +                                             imageIntSize.height),
> +                                     SurfaceFormat::B8G8R8A8);

Leave the code to create a gfxImageSurface here, and use CreateDrawTargetForData around that data instead.
Attached patch patch (obsolete) — Splinter Review
Attachment #8386144 - Attachment is obsolete: true
Attachment #8386144 - Flags: review?(matt.woodrow)
Attachment #8386445 - Flags: review?(matt.woodrow)
Attached patch patchSplinter Review
Attachment #8386445 - Attachment is obsolete: true
Attachment #8386445 - Flags: review?(matt.woodrow)
Attachment #8386447 - Flags: review?(matt.woodrow)
Attachment #8386447 - Flags: review?(matt.woodrow) → review+
https://hg.mozilla.org/mozilla-central/rev/c6c037057c02
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla30
You need to log in before you can comment on or make changes to this bug.