Bug 99481

Summary: SVGImageCache is caching images at wrong resolution
Product: WebKit Reporter: Florin Malita <fmalita>
Component: SVGAssignee: Philip Rogers <pdr>
Status: RESOLVED CONFIGURATION CHANGED    
Severity: Normal CC: bfulgham, cricri.bug, gyuyoung.kim, japhet, krit, pdr, qinmin, rakuco, rwlbuis, schenney, shezbaig.wk, thorton, webkit.review.bot, zimmermann
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 99489, 106159    
Bug Blocks:    
Attachments:
Description Flags
Resource for resolution-test.svg
none
resolution-test.svg - shows a resampled image on reload.
none
Patch none

Florin Malita
Reported 2012-10-16 11:03:49 PDT
Created attachment 168978 [details] Resource for resolution-test.svg Chromium issue: http://code.google.com/p/chromium/issues/detail?id=119693 SVGImageCache::lookupOrCreateBitmapImageForRenderer() doesn't take transform scaling into account when calculating the image buffer size. Thus SVG images are cached at the wrong resolution and show resampling artifacts when served from cache (on page reload for example). Open resolution-test.svg - a sharp-edged triangle is displayed. Reload the page - the triangle is blurred (resampled from a low-res cached image).
Attachments
Resource for resolution-test.svg (404 bytes, image/svg+xml)
2012-10-16 11:03 PDT, Florin Malita
no flags
resolution-test.svg - shows a resampled image on reload. (421 bytes, image/svg+xml)
2012-10-16 11:13 PDT, Florin Malita
no flags
Patch (23.14 KB, patch)
2012-10-16 12:22 PDT, Florin Malita
no flags
Florin Malita
Comment 1 2012-10-16 11:13:14 PDT
Created attachment 168983 [details] resolution-test.svg - shows a resampled image on reload.
Florin Malita
Comment 2 2012-10-16 12:22:01 PDT
Florin Malita
Comment 3 2012-10-16 12:25:45 PDT
Unfortunately the test seems to only pass when run independently, for what appears to be another SVG image sizing bug (transform scale is ignored on the first load). I'll open a separate issue and mark it blocking.
Dirk Schulze
Comment 4 2012-10-16 15:14:14 PDT
If it should not get reviewed now, can you remove the flag then?
Florin Malita
Comment 5 2012-10-17 06:52:42 PDT
The patch should be ready for review. What I meant is that (at least on my workstation) the new test is failing when run in batch mode for an unrelated reason. That doesn't seem to be a problem on the bots though, and even if it turns out to be we can mark it failing and point to the separate bug I've opened.
Nikolas Zimmermann
Comment 6 2012-10-21 07:48:09 PDT
This seems to clash with bug 98403. Can you make sure the more general patch in bug 98403 fixes your issues as well?
Tim Horton
Comment 7 2012-12-11 05:59:12 PST
*** Bug 85335 has been marked as a duplicate of this bug. ***
Min Qin
Comment 8 2013-02-07 11:22:10 PST
ping. Any progress on this? Not taking CSS transform into consideration can put a lot of memory pressure on devices like android.
Dirk Schulze
Comment 9 2013-02-15 23:40:12 PST
Comment on attachment 168996 [details] Patch I gues this is not valid anymore. Can you remove the review flag and close the bug? Or do I miss something?
Philip Rogers
Comment 10 2013-02-28 13:15:27 PST
Comment on attachment 168996 [details] Patch We now properly handle this. Clearing the review flag.
Note You need to log in before you can comment on or make changes to this bug.