Closed
Bug 995832
Opened 9 years ago
Closed 9 years ago
Make DrawTargetSkia::DrawSurface accept any surface type
Categories
(Core :: Graphics, defect)
Tracking
()
RESOLVED
FIXED
mozilla31
People
(Reporter: jwatt, Assigned: jwatt)
References
Details
Attachments
(1 file)
1.05 KB,
patch
|
gw280
:
review+
|
Details | Diff | Splinter Review |
The latest Try failure I'm debugging with the patch for bug 950372 is failures on the tests under: https://mxr.mozilla.org/mozilla-central/source/image/test/reftest/encoders-lossless/ This test loads a PNG in an <img> and then paints that <img> to a canvas using: CanvasRenderingContext2D::DrawImage(const HTMLImageOrCanvasOrVideoElement& image, ...) Under that DrawImage function we call RasterImage::GetFrame() and then it passes the SourceSurface to DrawTargetSkia::DrawSurface. It turns out the reason the tests fail is because RasterImage::GetFrame now returns a SourceSurfaceCairo and DrawTargetSkia::DrawSurface just silently returns if the passed in SourceSurface isn't of type SurfaceType::SKIA or SurfaceType::DATA. I think DrawTargetSkia::DrawSurface should call GetDataSurface on the surface that is passed in if it's not of these types.
![]() |
Assignee | |
Comment 1•9 years ago
|
||
Attachment #8405935 -
Flags: review?(gwright)
Comment 2•9 years ago
|
||
I wanted to do this before but Bas stopped me and said that we intentionally don't want backends to inter-operate. Instead you should extract that data and wrap it into a data surface and pass that in.
Comment 3•9 years ago
|
||
Comment on attachment 8405935 [details] [diff] [review] patch Review of attachment 8405935 [details] [diff] [review]: ----------------------------------------------------------------- Looks ok. Not sure I'm a fan of re-using the "aSurface" pointer like that, but otherwise no issues.
Attachment #8405935 -
Flags: review?(gwright) → review+
![]() |
Assignee | |
Comment 4•9 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/44e4463a8eeb
Comment 5•9 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/44e4463a8eeb
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla31
You need to log in
before you can comment on or make changes to this bug.
Description
•