Open Bug 1211178 Opened 6 years ago Updated 3 years ago
Add downscale-during-decode support for canvas
We need downscale-during-decode support for canvas.drawImage() to avoid OOM issues in situations like generating thumbnails in the B2G Gallery app. This is a metabug to track the dependencies of this work; there's a fair amount that needs to be done here. A rough list: - The SurfaceCache needs to include the kind of DrawTarget a surface has been optimized for in the cache key. - We need to have a mechanism for actually optimizing image surfaces for different DrawTargets. - SurfaceFromElement should stop generating SourceSurfaces from imgIContainers and just return the imgIContainer directly; we should start calling Draw() all the time. - We should convert the CanvasImageCache to a CanvasSecurityCache that just lets us skip security checks when it's safe to do so. We should instead rely on ImageLib's SurfaceCache (with the enhancements above) to cache optimized surfaces for canvas. - We need to support DDD even when FLAG_HIGH_QUALITY_SCALING is not passed, and use simple bilinear scaling in that case. This will have the added benefit of also allowing DDD to be used in conjunction with features like |image-rendering: crisp-edges|.
3 years ago
Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.