Bug 1341881. Don't do sync decode for SVG <image> elements images. r=aosmond

SVG <image> elements have approximately the same level of visibility tracking as regular html <img>s so we shouldn't need to do sync decode. It shows up in some profiles.

The comment being removed was written a long time ago, before image visibility tracking for one.

We could even go a step further and ask for no sync decoding at all, but one step at a time to make sure this doesn't cause any regressions.
This commit is contained in:
Timothy Nikkel 2017-02-22 18:58:42 -06:00
parent 90611046e2
commit 442d47eb2c

View File

@ -389,11 +389,7 @@ nsSVGImageFrame::PaintSVG(gfxContext& aContext,
dirtyRect.MoveBy(-rootRect.TopLeft());
}
// XXXbholley - I don't think huge images in SVGs are common enough to
// warrant worrying about the responsiveness impact of doing synchronous
// decodes. The extra code complexity of determinining when we want to
// force sync probably just isn't worth it, so always pass FLAG_SYNC_DECODE
uint32_t drawFlags = imgIContainer::FLAG_SYNC_DECODE;
uint32_t drawFlags = imgIContainer::FLAG_SYNC_DECODE_IF_FAST;
if (mImageContainer->GetType() == imgIContainer::TYPE_VECTOR) {
// Package up the attributes of this image element which can override the