Changeset 284767 in webkit
- Timestamp:
- Oct 24, 2021, 1:43:41 PM (5 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
platform/graphics/ImagePaintingOptions.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r284763 r284767 1 2021-10-24 Fujii Hironori <Hironori.Fujii@sony.com> 2 3 The code decoding std::optional<ImagePaintingOptions> can't be compiled by PlayStation due to the ImagePaintingOptions template constructor 4 https://bugs.webkit.org/show_bug.cgi?id=231980 5 <rdar://problem/84478389> 6 7 Reviewed by Darin Adler. 8 9 r284566 didn't actually fix the problem. The problem was that the 10 first template argument of ImagePaintingOptions template construct 11 can instantiated with std::optional<ImagePaintingOptions>. It 12 should be a type of that setOption can take. 13 14 * platform/graphics/ImagePaintingOptions.h: Added a template 15 variable isOptionType, and use it for SFINAE. 16 1 17 2021-10-24 Darin Adler <darin@apple.com> 2 18 -
trunk/Source/WebCore/platform/graphics/ImagePaintingOptions.h
r284566 r284767 33 33 34 34 struct ImagePaintingOptions { 35 template<typename First, typename... Rest, typename = std::enable_if_t<!std::is_same_v<std::decay_t<First>, ImagePaintingOptions>>> 35 template<typename Type> static constexpr bool isOptionType = 36 std::is_same_v<Type, CompositeOperator> 37 || std::is_same_v<Type, BlendMode> 38 || std::is_same_v<Type, DecodingMode> 39 || std::is_same_v<Type, ImageOrientation> 40 || std::is_same_v<Type, ImageOrientation::Orientation> 41 || std::is_same_v<Type, InterpolationQuality>; 42 43 template<typename First, typename... Rest, typename = std::enable_if_t<isOptionType<std::decay_t<First>>>> 36 44 ImagePaintingOptions(First first, Rest... rest) 37 45 {
Note:
See TracChangeset
for help on using the changeset viewer.