Changeset 295213 in webkit
- Timestamp:
- Jun 3, 2022 8:55:01 AM (2 years ago)
- Location:
- trunk/Source
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/platform/graphics/cg/ImageDecoderCG.cpp
r294660 r295213 77 77 78 78 #if HAVE(IMAGE_RESTRICTED_DECODING) && USE(APPLE_INTERNAL_SDK) 79 if (ImageDecoderCG:: restrictedDecodingEnabled())79 if (ImageDecoderCG::decodingHEICEnabled()) 80 80 CFDictionarySetValue(options.get(), kCGImageSourceEnableRestrictedDecoding, kCFBooleanTrue); 81 81 #endif … … 269 269 #endif 270 270 271 bool ImageDecoderCG::s_enable RestrictedDecoding= false;271 bool ImageDecoderCG::s_enableDecodingHEIC = false; 272 272 bool ImageDecoderCG::s_hardwareAcceleratedDecodingDisabled = false; 273 273 … … 612 612 } 613 613 614 void ImageDecoderCG::enable RestrictedDecoding()615 { 616 s_enable RestrictedDecoding= true;617 } 618 619 bool ImageDecoderCG:: restrictedDecodingEnabled()620 { 621 return s_enable RestrictedDecoding;614 void ImageDecoderCG::enableDecodingHEIC() 615 { 616 s_enableDecodingHEIC = true; 617 } 618 619 bool ImageDecoderCG::decodingHEICEnabled() 620 { 621 return s_enableDecodingHEIC; 622 622 } 623 623 -
trunk/Source/WebCore/platform/graphics/cg/ImageDecoderCG.h
r292035 r295213 71 71 void clearFrameBufferCache(size_t) final { } 72 72 73 WEBCORE_EXPORT static void enable RestrictedDecoding();74 static bool restrictedDecodingEnabled();73 WEBCORE_EXPORT static void enableDecodingHEIC(); 74 static bool decodingHEICEnabled(); 75 75 76 76 WEBCORE_EXPORT static void disableHardwareAcceleratedDecoding(); … … 81 81 mutable EncodedDataStatus m_encodedDataStatus { EncodedDataStatus::Unknown }; 82 82 RetainPtr<CGImageSourceRef> m_nativeDecoder; 83 static bool s_enable RestrictedDecoding;83 static bool s_enableDecodingHEIC; 84 84 static bool s_hardwareAcceleratedDecodingDisabled; 85 85 }; -
trunk/Source/WebKit/Shared/WebProcessCreationParameters.cpp
r294397 r295213 164 164 encoder << trustdExtensionHandle; 165 165 #endif 166 encoder << restrictImageAndVideoDecoders;166 encoder << enableDecodingHEIC; 167 167 #endif 168 168 … … 451 451 parameters.trustdExtensionHandle = WTFMove(*trustdExtensionHandle); 452 452 #endif 453 std::optional<bool> restrictImageAndVideoDecoders;454 decoder >> restrictImageAndVideoDecoders;455 if (! restrictImageAndVideoDecoders)456 return false; 457 parameters. restrictImageAndVideoDecoders = *restrictImageAndVideoDecoders;453 std::optional<bool> enableDecodingHEIC; 454 decoder >> enableDecodingHEIC; 455 if (!enableDecodingHEIC) 456 return false; 457 parameters.enableDecodingHEIC = *enableDecodingHEIC; 458 458 #endif 459 459 -
trunk/Source/WebKit/Shared/WebProcessCreationParameters.h
r294397 r295213 205 205 SandboxExtension::Handle trustdExtensionHandle; 206 206 #endif 207 bool restrictImageAndVideoDecoders{ false };207 bool enableDecodingHEIC { false }; 208 208 #endif 209 209 -
trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm
r295087 r295213 397 397 if (auto trustdExtensionHandle = SandboxExtension::createHandleForMachLookup("com.apple.trustd.agent"_s, std::nullopt)) 398 398 parameters.trustdExtensionHandle = WTFMove(*trustdExtensionHandle); 399 parameters. restrictImageAndVideoDecoders= true;399 parameters.enableDecodingHEIC = true; 400 400 } 401 401 #else 402 parameters. restrictImageAndVideoDecoders = IOSApplication::isMobileMail() || IOSApplication::isMailCompositionService() || CocoaApplication::isWebkitTestRunner();402 parameters.enableDecodingHEIC = true; 403 403 #endif // PLATFORM(MAC) 404 404 #endif // HAVE(VIDEO_RESTRICTED_DECODING) -
trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm
r295087 r295213 257 257 #endif // PLATFORM(MAC) 258 258 #if USE(APPLE_INTERNAL_SDK) 259 if (parameters. restrictImageAndVideoDecoders) {260 ImageDecoderCG::enable RestrictedDecoding();261 restrictImageAndVideoDecoders();259 if (parameters.enableDecodingHEIC) { 260 ImageDecoderCG::enableDecodingHEIC(); 261 enableDecodingHEIC(); 262 262 } 263 263 #endif
Note: See TracChangeset
for help on using the changeset viewer.