Skip HTMLImageElement.decode() requests for SVG images
Per: "If decoding does not need to be performed for this image (for example because it is a vector graphic), resolve promise with undefined." (https://html.spec.whatwg.org/multipage/embedded-content.html#dom-img-decode) we can skip the decode request and just resolve the promise up front. Since the SVG format is context sensitive (and, well, scalable), decoding them outside of that context will likely just waste resources. Fixed: 1073361 Change-Id: Iedf3a6636d9525e243ce9a8cf9c3835a1468b34b Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2160915 Commit-Queue: Fredrik Söderquist <fs@opera.com> Reviewed-by:vmpstr <vmpstr@chromium.org> Cr-Commit-Position: refs/heads/master@{#762026}
Showing
Please register or sign in to comment