| Summary: | SVGRenderingContext::createImageBuffer is not retina (2x) compatible (affects <mask>) | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Timothy Hatcher <timothy> | ||||
| Component: | SVG | Assignee: | Nobody <webkit-unassigned> | ||||
| Status: | RESOLVED INVALID | ||||||
| Severity: | Normal | CC: | dino, sabouhallawa, simon.fraser, thaddee.tyl, webkit-bug-importer, zimmermann | ||||
| Priority: | P2 | Keywords: | InRadar | ||||
| Version: | 528+ (Nightly build) | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| See Also: | https://bugs.webkit.org/show_bug.cgi?id=166750 | ||||||
| Bug Depends on: | |||||||
| Bug Blocks: | 151737 | ||||||
| Attachments: |
|
||||||
|
Description
Timothy Hatcher
2014-08-05 12:02:45 PDT
Created attachment 297130 [details]
Test case: the two circles should look identical.
I would like to point out that this is not just an issue for Retina screens; it also affects zoomed in pages (either manually or through CSS).
I do not think we currently have a problem in SVGRenderingContext::createImageBuffer() when calling ImageBuffer::create(). Yes, we are still sending resolutionScale = 1 to ImageBuffer::create() but this is correct. We send absoluteTransform = zooming_factor * device_scaling to SVGRenderingContext::createImageBuffer() which uses it to scale the ImageBuffer bitmap and to transform its context accordingly. So the caller (RenderSVGResourceMasker::applyResource() in this case) can still draw using logical units on the ImageBuffer. Regarding the new test case, I think it is unrelated to this bug. It is related to displaying an <img> element whose src is an SVG data uri. In this case, we do not respect the zooming_factor because the SVG root element belongs to an SVGDocument which does not inherit the deviceScaleFactor of the containing HTMLDocument. I am going to close this bug and open a new one for the data uri case. |