WebKit Bugzilla
Attachment 368632 Details for
Bug 197384
: [CG] Add support for HEIF-sequence (‘public.heics’) images
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-197384-20190430172720.patch (text/plain), 3.82 KB, created by
Said Abou-Hallawa
on 2019-04-30 17:27:21 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Said Abou-Hallawa
Created:
2019-04-30 17:27:21 PDT
Size:
3.82 KB
patch
obsolete
>Subversion Revision: 244802 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index c1ca7a22d5a7c6189503ad8f29bb231dfbb5f54f..19af94baabad4464132d2a4d6897288216116293 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,16 @@ >+2019-04-30 Said Abou-Hallawa <sabouhallawa@apple.com> >+ >+ [CG] Adding support for HEIF-sequence ('public.heics') images >+ https://bugs.webkit.org/show_bug.cgi?id=197384 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Get the image repetitionCount and the frame duration. >+ >+ * platform/graphics/cg/ImageDecoderCG.cpp: >+ (WebCore::ImageDecoderCG::repetitionCount const): >+ (WebCore::ImageDecoderCG::frameDurationAtIndex const): >+ > 2019-04-30 Commit Queue <commit-queue@webkit.org> > > Unreviewed, rolling out r244773. >diff --git a/Source/WebCore/platform/graphics/cg/ImageDecoderCG.cpp b/Source/WebCore/platform/graphics/cg/ImageDecoderCG.cpp >index f67c5274fda8d39a30d511d8739f78a41f795756..3695303784bd37f627df8ad7b6f2eac60264104c 100644 >--- a/Source/WebCore/platform/graphics/cg/ImageDecoderCG.cpp >+++ b/Source/WebCore/platform/graphics/cg/ImageDecoderCG.cpp >@@ -45,6 +45,11 @@ namespace WebCore { > const CFStringRef WebCoreCGImagePropertyAPNGUnclampedDelayTime = CFSTR("UnclampedDelayTime"); > const CFStringRef WebCoreCGImagePropertyAPNGDelayTime = CFSTR("DelayTime"); > const CFStringRef WebCoreCGImagePropertyAPNGLoopCount = CFSTR("LoopCount"); >+ >+const CFStringRef WebCoreCGImagePropertyHEICSDictionary = CFSTR("{HEICS}"); >+const CFStringRef WebCoreCGImagePropertyHEICSUnclampedDelayTime = CFSTR("UnclampedDelayTime"); >+const CFStringRef WebCoreCGImagePropertyHEICSDelayTime = CFSTR("DelayTime"); >+ > > #if PLATFORM(WIN) > const CFStringRef kCGImageSourceShouldPreferRGB32 = CFSTR("kCGImageSourceShouldPreferRGB32"); >@@ -261,7 +266,13 @@ RepetitionCount ImageDecoderCG::repetitionCount() const > CFNumberGetValue(num, kCFNumberIntType, &loopCount); > return loopCount ? loopCount : RepetitionCountInfinite; > } >- >+ >+ CFDictionaryRef heicsProperties = (CFDictionaryRef)CFDictionaryGetValue(properties.get(), WebCoreCGImagePropertyHEICSDictionary); >+ if (heicsProperties) { >+ // FIXME <rdar://problem/50353643>: Get the value of the loopCount key. For now assume the heics will animate indefinitely. >+ return RepetitionCountInfinite; >+ } >+ > // Turns out we're not an animated image after all, so we don't animate. > return RepetitionCountNone; > } >@@ -343,7 +354,7 @@ Seconds ImageDecoderCG::frameDurationAtIndex(size_t index) const > CFNumberGetValue(num, kCFNumberFloatType, &value); > } > } >- >+ > CFDictionaryRef pngProperties = (CFDictionaryRef)CFDictionaryGetValue(properties.get(), kCGImagePropertyPNGDictionary); > if (pngProperties) { > if (CFNumberRef num = (CFNumberRef)CFDictionaryGetValue(pngProperties, WebCoreCGImagePropertyAPNGUnclampedDelayTime)) >@@ -351,6 +362,14 @@ Seconds ImageDecoderCG::frameDurationAtIndex(size_t index) const > else if (CFNumberRef num = (CFNumberRef)CFDictionaryGetValue(pngProperties, WebCoreCGImagePropertyAPNGDelayTime)) > CFNumberGetValue(num, kCFNumberFloatType, &value); > } >+ >+ CFDictionaryRef heicsProperties = (CFDictionaryRef)CFDictionaryGetValue(properties.get(), WebCoreCGImagePropertyHEICSDictionary); >+ if (heicsProperties) { >+ if (CFNumberRef num = (CFNumberRef)CFDictionaryGetValue(heicsProperties, WebCoreCGImagePropertyHEICSDictionary)) >+ CFNumberGetValue(num, kCFNumberFloatType, &value); >+ else if (CFNumberRef num = (CFNumberRef)CFDictionaryGetValue(heicsProperties, WebCoreCGImagePropertyHEICSDelayTime)) >+ CFNumberGetValue(num, kCFNumberFloatType, &value); >+ } > } > > Seconds duration(value);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 197384
:
368485
|
368632
|
369055
|
369059
|
369063
|
369067
|
369128
|
369136
|
369169
|
369205
|
369524
|
369538
|
369556
|
369819