RESOLVED FIXED 177103
Make ImageFrame::duration() return Seconds instead of float
https://bugs.webkit.org/show_bug.cgi?id=177103
Summary Make ImageFrame::duration() return Seconds instead of float
Said Abou-Hallawa
Reported 2017-09-18 14:29:19 PDT
There has been a confusion about the units that this function returns. The ImageFrame is used for two different purposes. It is used by ImageFrameCache to ensure the decoded frame and its meta data are cached when they have to. And it is also used by ScalableImageDecoder to help decoding the image frames fast. The ImageFrame which is cached by ImageFrameCache has the duration in seconds while the ScalableImageDecoder caches its ImageFrame with milli-seconds durations. To clear things, make all the duration in seconds.
Attachments
Patch (13.44 KB, patch)
2017-09-18 14:31 PDT, Said Abou-Hallawa
no flags
Patch (13.68 KB, patch)
2017-09-18 15:56 PDT, Said Abou-Hallawa
no flags
Patch (15.36 KB, patch)
2017-09-18 18:04 PDT, Said Abou-Hallawa
no flags
Said Abou-Hallawa
Comment 1 2017-09-18 14:31:40 PDT
Said Abou-Hallawa
Comment 2 2017-09-18 15:56:28 PDT
Simon Fraser (smfr)
Comment 3 2017-09-18 16:56:07 PDT
Comment on attachment 321143 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=321143&action=review > Source/WebCore/platform/graphics/cg/ImageDecoderCG.cpp:363 > + return Seconds(0.1f); 0.1_s or 100_ms > Source/WebCore/platform/graphics/cg/ImageDecoderCG.cpp:364 > + return Seconds(duration); Can this just be "return { duration }"? > Source/WebCore/platform/image-decoders/ScalableImageDecoder.cpp:206 > + return { }; 0_s > Source/WebCore/platform/image-decoders/ScalableImageDecoder.cpp:212 > + if (buffer->duration() < Seconds(0.011f)) 11_ms > Source/WebCore/platform/image-decoders/ScalableImageDecoder.cpp:213 > + return Seconds(0.100f); 100_ms
Said Abou-Hallawa
Comment 4 2017-09-18 18:04:58 PDT
WebKit Commit Bot
Comment 5 2017-09-18 19:45:36 PDT
Comment on attachment 321162 [details] Patch Clearing flags on attachment: 321162 Committed r222196: <http://trac.webkit.org/changeset/222196>
WebKit Commit Bot
Comment 6 2017-09-18 19:45:37 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 7 2017-09-27 12:26:13 PDT
Note You need to log in before you can comment on or make changes to this bug.