Open Bug 1211178 Opened 9 years ago Updated 2 years ago

Add downscale-during-decode support for canvas.drawImage()

Categories

(Core :: Graphics: ImageLib, defect, P3)

defect

Tracking

()

People

(Reporter: seth, Unassigned)

References

(Blocks 1 open bug)

Details

(Whiteboard: [gfx-noted])

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|.
Blocks: 1120056
Keywords: feature
Whiteboard: [gfx-noted]

The bug assignee didn't login in Bugzilla in the last 7 months.
:aosmond, could you have a look please?
For more information, please visit auto_nag documentation.

Assignee: seth.bugzilla → nobody
Flags: needinfo?(aosmond)
Severity: normal → S4
Flags: needinfo?(aosmond)
You need to log in before you can comment on or make changes to this bug.