Modified: trunk/Source/WebCore/platform/graphics/ImageSource.h (173492 => 173493)
--- trunk/Source/WebCore/platform/graphics/ImageSource.h 2014-09-10 22:13:59 UTC (rev 173492)
+++ trunk/Source/WebCore/platform/graphics/ImageSource.h 2014-09-10 22:22:50 UTC (rev 173493)
@@ -93,13 +93,6 @@
GammaAndColorProfileIgnored
};
-#if USE(CG)
- enum ShouldSkipMetadata {
- DoNotSkipMetadata,
- SkipMetadata
- };
-#endif
-
ImageSource(AlphaOption alphaOption = AlphaPremultiplied, GammaAndColorProfileOption gammaAndColorProfileOption = GammaAndColorProfileApplied);
~ImageSource();
Modified: trunk/Source/WebCore/platform/graphics/cg/ImageSourceCG.cpp (173492 => 173493)
--- trunk/Source/WebCore/platform/graphics/cg/ImageSourceCG.cpp 2014-09-10 22:13:59 UTC (rev 173492)
+++ trunk/Source/WebCore/platform/graphics/cg/ImageSourceCG.cpp 2014-09-10 22:22:50 UTC (rev 173493)
@@ -106,14 +106,12 @@
setData(data, allDataReceived);
}
-static CFDictionaryRef createImageSourceOptions(ImageSource::ShouldSkipMetadata skipMetaData, SubsamplingLevel subsamplingLevel)
+static CFDictionaryRef createImageSourceOptions(SubsamplingLevel subsamplingLevel)
{
- const CFBooleanRef imageSourceSkipMetadata = (skipMetaData == ImageSource::SkipMetadata) ? kCFBooleanTrue : kCFBooleanFalse;
-
if (!subsamplingLevel) {
const unsigned numOptions = 3;
const void* keys[numOptions] = { kCGImageSourceShouldCache, kCGImageSourceShouldPreferRGB32, kCGImageSourceSkipMetadata };
- const void* values[numOptions] = { kCFBooleanTrue, kCFBooleanTrue, imageSourceSkipMetadata };
+ const void* values[numOptions] = { kCFBooleanTrue, kCFBooleanTrue, kCFBooleanTrue };
return CFDictionaryCreate(nullptr, keys, values, numOptions, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks);
}
@@ -123,16 +121,16 @@
RetainPtr<CFNumberRef> subsampleNumber = adoptCF(CFNumberCreate(nullptr, kCFNumberIntType, &subsampleInt));
const CFIndex numOptions = 4;
const void* keys[numOptions] = { kCGImageSourceShouldCache, kCGImageSourceShouldPreferRGB32, kCGImageSourceSkipMetadata, kCGImageSourceSubsampleFactor };
- const void* values[numOptions] = { kCFBooleanTrue, kCFBooleanTrue, imageSourceSkipMetadata, subsampleNumber.get() };
+ const void* values[numOptions] = { kCFBooleanTrue, kCFBooleanTrue, kCFBooleanTrue, subsampleNumber.get() };
return CFDictionaryCreate(nullptr, keys, values, numOptions, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks);
}
-static CFDictionaryRef imageSourceOptions(ImageSource::ShouldSkipMetadata skipMetadata = ImageSource::SkipMetadata, SubsamplingLevel subsamplingLevel = 0)
+static CFDictionaryRef imageSourceOptions(SubsamplingLevel subsamplingLevel = 0)
{
if (subsamplingLevel)
- return createImageSourceOptions(skipMetadata, subsamplingLevel);
+ return createImageSourceOptions(subsamplingLevel);
- static CFDictionaryRef options = createImageSourceOptions(skipMetadata, 0);
+ static CFDictionaryRef options = createImageSourceOptions(0);
return options;
}
@@ -234,7 +232,7 @@
IntSize ImageSource::frameSizeAtIndex(size_t index, SubsamplingLevel subsamplingLevel, ImageOrientationDescription description) const
{
- RetainPtr<CFDictionaryRef> properties = adoptCF(CGImageSourceCopyPropertiesAtIndex(m_decoder, index, imageSourceOptions(SkipMetadata, subsamplingLevel)));
+ RetainPtr<CFDictionaryRef> properties = adoptCF(CGImageSourceCopyPropertiesAtIndex(m_decoder, index, imageSourceOptions(subsamplingLevel)));
if (!properties)
return IntSize();
@@ -350,7 +348,7 @@
if (!initialized())
return 0;
- RetainPtr<CGImageRef> image = adoptCF(CGImageSourceCreateImageAtIndex(m_decoder, index, imageSourceOptions(SkipMetadata, subsamplingLevel)));
+ RetainPtr<CGImageRef> image = adoptCF(CGImageSourceCreateImageAtIndex(m_decoder, index, imageSourceOptions(subsamplingLevel)));
#if PLATFORM(IOS)
// <rdar://problem/7371198> - CoreGraphics changed the default caching behaviour in iOS 4.0 to kCGImageCachingTransient
@@ -393,7 +391,7 @@
return 0;
float duration = 0;
- RetainPtr<CFDictionaryRef> properties = adoptCF(CGImageSourceCopyPropertiesAtIndex(m_decoder, index, imageSourceOptions(SkipMetadata)));
+ RetainPtr<CFDictionaryRef> properties = adoptCF(CGImageSourceCopyPropertiesAtIndex(m_decoder, index, imageSourceOptions()));
if (properties) {
CFDictionaryRef gifProperties = (CFDictionaryRef)CFDictionaryGetValue(properties.get(), kCGImagePropertyGIFDictionary);
if (gifProperties) {