Closed Bug 1166407 Opened 9 years ago Closed 7 years ago

Add support for a scaled image cache in image/SurfaceCache

Categories

(Core :: Graphics, defect)

defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: mchang, Assigned: mchang)

References

(Blocks 1 open bug)

Details

(Whiteboard: gfx-noted)

While drawing scaled repeated images, most of the time is spent creating a single scaled image. It's taken up to 40ms to draw a single scaled 1680x900 image, even when scaling down on a retina macbook pro. When scrolling, we have to keep scaling the image as we scroll, causing lots of jank. Skia has a scaled image cache [1], so we should probably just have one somewhere in layout so all platforms benefit. 

[1] https://dxr.mozilla.org/mozilla-central/source/gfx/skia/trunk/src/core/SkScaledImageCache.cpp
From talking with :Seth, it looks like assigning images to layers then scaling on the GPU is the proper solution to slow upscaled images (bug 1121770) rather than having a scaled image cache.
Depends on: 1121770
That would be ok for foreground images, but it's not great for repeated page background images. We don't want to require component alpha layers for e.g. the text on bugzilla.
Yeah, that makes sense.

I should note that we don't need to implement anything here; this stuff is all controlled by prefs. We could decide today that we want to generate and store upscaled versions of images and everything would work. It's just that the current prefs are set to allow downscaling only.
Closing as won't fix for old bugs.
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.