Skip to content

[canvaskit] Determine if image is animated by reading its header and use Skia to decode in that case #151911

@harryterkelsen

Description

@harryterkelsen

Use case

Once flutter/engine#53201 lands, the CanvasKit backend will use <img> tags to decode images in many cases. However, we cannot use <img> to decode animated images and get single frames out, so we must use Skia to decode those images. However, we don't actually determine if the images are animated before defaulting to Skia decoding, we conservatively assume all GIF and WebP images are animated.

Proposal

Determine if the image is actually animated by reading the headers and determining that way. Only use Skia to decode if the image is actually animated, otherwise use <img>.

Metadata

Metadata

Labels

P1High-priority issues at the top of the work lista: imagesLoading, displaying, rendering imagesc: new featureNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to Fluttere: web_canvaskitCanvasKit (a.k.a. Skia-on-WebGL) rendering backend for Webengineflutter/engine related. See also e: labels.platform-webWeb applications specificallyr: fixedIssue is closed as already fixed in a newer versionteam-webOwned by Web platform teamtriaged-webTriaged by Web platform team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions