Closed
Bug 995832
Opened 11 years ago
Closed 11 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•11 years ago
|
||
Attachment #8405935 -
Flags: review?(gwright)
Comment 2•11 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•11 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•11 years ago
|
||
Comment 5•11 years ago
|
||
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla31
You need to log in
before you can comment on or make changes to this bug.
Description
•