Title: [168452] trunk/Source
Revision
168452
Author
psola...@apple.com
Date
2014-05-07 16:28:50 -0700 (Wed, 07 May 2014)

Log Message

Use system defaults for hardware jpeg decoding
https://bugs.webkit.org/show_bug.cgi?id=132661
<rdar://problem/11348201>

Reviewed by Tim Horton.

Remove code that explicitly disabled hardware image decoding. Let the system decide what to do.

Source/WebCore:
* WebCore.exp.in:
* platform/graphics/ImageSource.h:
(WebCore::ImageSource::acceleratedImageDecodingEnabled): Deleted.
(WebCore::ImageSource::setAcceleratedImageDecodingEnabled): Deleted.
* platform/graphics/cg/ImageSourceCG.cpp:
(WebCore::ImageSource::imageSourceOptions):

Source/WebKit/mac:
* WebView/WebView.mm:
(+[WebView _setAcceleratedImageDecoding:]):
(+[WebView _acceleratedImageDecoding]): Deleted.
* WebView/WebViewPrivate.h:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (168451 => 168452)


--- trunk/Source/WebCore/ChangeLog	2014-05-07 23:22:07 UTC (rev 168451)
+++ trunk/Source/WebCore/ChangeLog	2014-05-07 23:28:50 UTC (rev 168452)
@@ -1,3 +1,20 @@
+2014-05-07  Pratik Solanki  <psola...@apple.com>
+
+        Use system defaults for hardware jpeg decoding
+        https://bugs.webkit.org/show_bug.cgi?id=132661
+        <rdar://problem/11348201>
+
+        Reviewed by Tim Horton.
+
+        Remove code that explicitly disabled hardware image decoding. Let the system decide what to do.
+
+        * WebCore.exp.in:
+        * platform/graphics/ImageSource.h:
+        (WebCore::ImageSource::acceleratedImageDecodingEnabled): Deleted.
+        (WebCore::ImageSource::setAcceleratedImageDecodingEnabled): Deleted.
+        * platform/graphics/cg/ImageSourceCG.cpp:
+        (WebCore::ImageSource::imageSourceOptions):
+
 2014-05-07  Radu Stavila  <stav...@adobe.com>
 
         Use after free in WebCore::RenderObject::nextSibling / WebCore::RenderBoxModelObject::moveChildrenTo

Modified: trunk/Source/WebCore/WebCore.exp.in (168451 => 168452)


--- trunk/Source/WebCore/WebCore.exp.in	2014-05-07 23:22:07 UTC (rev 168451)
+++ trunk/Source/WebCore/WebCore.exp.in	2014-05-07 23:28:50 UTC (rev 168452)
@@ -2455,7 +2455,6 @@
 __ZN7WebCore11EditCommand18setEndingSelectionERKNS_16VisibleSelectionE
 __ZN7WebCore11FileChooser16chooseMediaFilesERKN3WTF6VectorINS1_6StringELm0ENS1_15CrashOnOverflowEEERKS3_PNS_4IconE
 __ZN7WebCore11Geolocation29resetAllGeolocationPermissionEv
-__ZN7WebCore11ImageSource26s_acceleratedImageDecodingE
 __ZN7WebCore11MathMLNames4initEv
 __ZN7WebCore11MemoryCache18pruneDeadResourcesEv
 __ZN7WebCore11MemoryCache18pruneLiveResourcesEb

Modified: trunk/Source/WebCore/platform/graphics/ImageSource.h (168451 => 168452)


--- trunk/Source/WebCore/platform/graphics/ImageSource.h	2014-05-07 23:22:07 UTC (rev 168451)
+++ trunk/Source/WebCore/platform/graphics/ImageSource.h	2014-05-07 23:28:50 UTC (rev 168452)
@@ -166,11 +166,6 @@
     static void setMaxPixelsPerDecodedImage(unsigned maxPixels) { s_maxPixelsPerDecodedImage = maxPixels; }
 #endif
 
-#if PLATFORM(IOS)
-    static bool acceleratedImageDecodingEnabled() { return s_acceleratedImageDecoding; }
-    static void setAcceleratedImageDecodingEnabled(bool flag) { s_acceleratedImageDecoding = flag; }
-#endif
-
 private:
     NativeImageDecoderPtr m_decoder;
 
@@ -185,7 +180,6 @@
     mutable int m_baseSubsampling;
     mutable bool m_isProgressive;
     CFDictionaryRef imageSourceOptions(ShouldSkipMetadata, int subsampling = 0) const;
-    static bool s_acceleratedImageDecoding;
 #endif
 };
 

Modified: trunk/Source/WebCore/platform/graphics/cg/ImageSourceCG.cpp (168451 => 168452)


--- trunk/Source/WebCore/platform/graphics/cg/ImageSourceCG.cpp	2014-05-07 23:22:07 UTC (rev 168451)
+++ trunk/Source/WebCore/platform/graphics/cg/ImageSourceCG.cpp	2014-05-07 23:28:50 UTC (rev 168452)
@@ -53,10 +53,6 @@
 const CFStringRef kCGImageSourceShouldPreferRGB32 = CFSTR("kCGImageSourceShouldPreferRGB32");
 const CFStringRef kCGImageSourceSkipMetadata = CFSTR("kCGImageSourceSkipMetadata");
 
-#if PLATFORM(IOS)
-bool ImageSource::s_acceleratedImageDecoding;
-#endif
-
 #if !PLATFORM(COCOA)
 size_t sharedBufferGetBytesAtPosition(void* info, void* buffer, off_t position, size_t count)
 {
@@ -133,11 +129,10 @@
     if (!options[subsampling]) {
         int subsampleInt = 1 << subsampling; // [0..3] => [1, 2, 4, 8]
         RetainPtr<CFNumberRef> subsampleNumber = adoptCF(CFNumberCreate(nullptr,  kCFNumberIntType,  &subsampleInt));
-        const CFIndex numOptions = 5;
+        const CFIndex numOptions = 4;
         const CFBooleanRef imageSourceSkipMetaData = (skipMetaData == ImageSource::SkipMetadata) ? kCFBooleanTrue : kCFBooleanFalse;
-        const CFBooleanRef acceleratedImageDecoding = ImageSource::s_acceleratedImageDecoding ? kCFBooleanTrue : kCFBooleanFalse;
-        const void* keys[numOptions] = { kCGImageSourceShouldCache, kCGImageSourceShouldPreferRGB32, kCGImageSourceSubsampleFactor, kCGImageSourceSkipMetadata, kCGImageSourceUseHardwareAcceleration };
-        const void* values[numOptions] = { kCFBooleanTrue, kCFBooleanTrue, subsampleNumber.get(), imageSourceSkipMetaData, acceleratedImageDecoding };
+        const void* keys[numOptions] = { kCGImageSourceShouldCache, kCGImageSourceShouldPreferRGB32, kCGImageSourceSubsampleFactor, kCGImageSourceSkipMetadata };
+        const void* values[numOptions] = { kCFBooleanTrue, kCFBooleanTrue, subsampleNumber.get(), imageSourceSkipMetaData };
         options[subsampling] = CFDictionaryCreate(nullptr, keys, values, numOptions, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks);
     }
     return options[subsampling];

Modified: trunk/Source/WebKit/mac/ChangeLog (168451 => 168452)


--- trunk/Source/WebKit/mac/ChangeLog	2014-05-07 23:22:07 UTC (rev 168451)
+++ trunk/Source/WebKit/mac/ChangeLog	2014-05-07 23:28:50 UTC (rev 168452)
@@ -1,3 +1,18 @@
+2014-05-07  Pratik Solanki  <psola...@apple.com>
+
+        Use system defaults for hardware jpeg decoding
+        https://bugs.webkit.org/show_bug.cgi?id=132661
+        <rdar://problem/11348201>
+
+        Reviewed by Tim Horton.
+
+        Remove code that explicitly disabled hardware image decoding. Let the system decide what to do.
+
+        * WebView/WebView.mm:
+        (+[WebView _setAcceleratedImageDecoding:]):
+        (+[WebView _acceleratedImageDecoding]): Deleted.
+        * WebView/WebViewPrivate.h:
+
 2014-05-07  Brent Fulgham  <bfulg...@apple.com>
 
         [Mac, iOS] REGRESSION: WK2 YouTube support

Modified: trunk/Source/WebKit/mac/WebView/WebView.mm (168451 => 168452)


--- trunk/Source/WebKit/mac/WebView/WebView.mm	2014-05-07 23:22:07 UTC (rev 168451)
+++ trunk/Source/WebKit/mac/WebView/WebView.mm	2014-05-07 23:28:50 UTC (rev 168452)
@@ -1590,14 +1590,9 @@
 
 + (void)_setAcceleratedImageDecoding:(BOOL)enabled
 {
-    ImageSource::setAcceleratedImageDecodingEnabled(enabled);
+    UNUSED_PARAM(enabled);
 }
 
-+ (BOOL)_acceleratedImageDecoding
-{
-    return ImageSource::acceleratedImageDecodingEnabled();
-}
-
 + (void)_setAllowCookies:(BOOL)allow
 {
     ResourceRequestBase::setDefaultAllowCookies(allow);

Modified: trunk/Source/WebKit/mac/WebView/WebViewPrivate.h (168451 => 168452)


--- trunk/Source/WebKit/mac/WebView/WebViewPrivate.h	2014-05-07 23:22:07 UTC (rev 168451)
+++ trunk/Source/WebKit/mac/WebView/WebViewPrivate.h	2014-05-07 23:28:50 UTC (rev 168452)
@@ -465,7 +465,6 @@
 + (void)_setTileCacheLayerPoolCapacity:(unsigned)capacity;
 
 + (void)_setAcceleratedImageDecoding:(BOOL)enabled;
-+ (BOOL)_acceleratedImageDecoding;
 + (void)_setAllowCookies:(BOOL)allow;
 + (BOOL)_allowCookies;
 + (BOOL)_isUnderMemoryPressure;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to