Bug 1256603. Fix comment in ImageLoader. r=aosmond
authorTimothy Nikkel <tnikkel@gmail.com>
Sat, 13 Oct 2018 00:31:03 -0500
changeset 499556 2cc5b3f51ec4fa0501af01e4ece67be0eed814c4
parent 499555 d8bb90ade0d68eaf309127cb51840c722e4008b5
child 499557 94a62c1aad526dc24dc9186a6ccebb0db276ee87
child 499560 54598c1940f1b4cf12c1e122431ce709237c686f
push id1864
push userffxbld-merge
push dateMon, 03 Dec 2018 15:51:40 +0000
treeherdermozilla-release@f040763d99ad [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersaosmond
bugs1256603
milestone64.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1256603. Fix comment in ImageLoader. r=aosmond
layout/style/ImageLoader.cpp
--- a/layout/style/ImageLoader.cpp
+++ b/layout/style/ImageLoader.cpp
@@ -160,21 +160,23 @@ ImageLoader::AssociateRequestToFrame(img
         } else {
           // If we don't already have a complete frame, kickoff decode. This
           // will ensure that either onFrameComplete or onLoadComplete will
           // unblock document onload.
 
           // We want to request decode in such a way that avoids triggering
           // sync decode. First, we attempt to convert the aRequest into
           // a imgIContainer. If that succeeds, then aRequest has an image
-          // and we can request decoding for size at zero size, and that will
-          // trigger async decode. If the conversion to imgIContainer is
-          // unsuccessful, then that means aRequest doesn't have an image yet,
-          // which means we can safely call StartDecoding() on it without
-          // triggering any synchronous work.
+          // and we can request decoding for size at zero size, the size will
+          // be ignored because we don't pass the FLAG_HIGH_QUALITY_SCALING
+          // flag and an async decode (because we didn't pass any sync decoding
+          // flags) at the intrinsic size will be requested. If the conversion
+          // to imgIContainer is unsuccessful, then that means aRequest doesn't
+          // have an image yet, which means we can safely call StartDecoding()
+          // on it without triggering any synchronous work.
           nsCOMPtr<imgIContainer> imgContainer;
           aRequest->GetImage(getter_AddRefs(imgContainer));
           if (imgContainer) {
             imgContainer->RequestDecodeForSize(gfx::IntSize(0, 0),
               imgIContainer::DECODE_FLAGS_DEFAULT);
           } else {
             // It's safe to call StartDecoding directly, since it can't
             // trigger synchronous decode without an image. Flags are ignored.