Changeset 240428 in webkit
- Timestamp:
- Jan 24, 2019 2:02:33 AM (5 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ChangeLog
r240176 r240428 1 2019-01-24 Carlos Garcia Campos <cgarcia@igalia.com> 2 3 [GTK][WPE] Support JPEG 2000 images 4 https://bugs.webkit.org/show_bug.cgi?id=186272 5 6 Reviewed by Žan Doberšek. 7 8 Add USE_OPENJPEG build option. 9 10 * Source/cmake/OptionsGTK.cmake: 11 * Source/cmake/OptionsWPE.cmake: 12 1 13 2019-01-18 Jer Noble <jer.noble@apple.com> 2 14 -
trunk/Source/WebCore/ChangeLog
r240407 r240428 1 2019-01-24 Carlos Garcia Campos <cgarcia@igalia.com> 2 3 [GTK][WPE] Support JPEG 2000 images 4 https://bugs.webkit.org/show_bug.cgi?id=186272 5 6 Reviewed by Žan Doberšek. 7 8 Add JPEG2000ImageDecoder to support JPEG2000 images using OpenJPEG. For now only SRGB and SYCC color spaces are 9 supported. 10 11 * platform/ImageDecoders.cmake: 12 * platform/MIMETypeRegistry.cpp: 13 (WebCore::MIMETypeRegistry::supportedImageMIMETypes): 14 * platform/image-decoders/ScalableImageDecoder.cpp: 15 (WebCore::ScalableImageDecoder::create): 16 * platform/image-decoders/jpeg2000/JPEG2000ImageDecoder.cpp: Added. 17 (WebCore::syccToRGB): 18 (WebCore::sycc444ToRGB): 19 (WebCore::sycc422ToRGB): 20 (WebCore::sycc420ToRGB): 21 (WebCore::JPEG2000ImageDecoder::JPEG2000ImageDecoder): 22 (WebCore::JPEG2000ImageDecoder::frameBufferAtIndex): 23 (WebCore::JPEG2000ImageDecoder::decode): 24 * platform/image-decoders/jpeg2000/JPEG2000ImageDecoder.h: Added. 25 1 26 2019-01-23 Simon Fraser <simon.fraser@apple.com> 2 27 -
trunk/Source/WebCore/platform/ImageDecoders.cmake
r230522 r240428 5 5 "${WEBCORE_DIR}/platform/image-decoders/ico" 6 6 "${WEBCORE_DIR}/platform/image-decoders/jpeg" 7 "${WEBCORE_DIR}/platform/image-decoders/jpeg2000" 7 8 "${WEBCORE_DIR}/platform/image-decoders/png" 8 9 "${WEBCORE_DIR}/platform/image-decoders/webp" … … 23 24 platform/image-decoders/jpeg/JPEGImageDecoder.cpp 24 25 26 platform/image-decoders/jpeg2000/JPEG2000ImageDecoder.cpp 27 25 28 platform/image-decoders/png/PNGImageDecoder.cpp 26 29 … … 36 39 ${PNG_LIBRARIES} 37 40 ) 41 42 if (OpenJPEG_FOUND) 43 list(APPEND WebCore_SYSTEM_INCLUDE_DIRECTORIES 44 ${OPENJPEG_INCLUDE_DIRS} 45 ) 46 list(APPEND WebCore_LIBRARIES 47 ${OPENJPEG_LIBRARIES} 48 ) 49 endif () 38 50 39 51 if (WEBP_FOUND) -
trunk/Source/WebCore/platform/MIMETypeRegistry.cpp
r239758 r240428 126 126 "image/x-icon"_s, // ico 127 127 "image/x-xbitmap"_s, // xbm 128 #if USE(OPENJPEG) 129 "image/jp2"_s, 130 "image/jpeg2000"_s, 131 #endif 128 132 #if USE(WEBP) 129 133 "image/webp"_s, -
trunk/Source/WebCore/platform/image-decoders/ScalableImageDecoder.cpp
r240215 r240428 30 30 #include "PNGImageDecoder.h" 31 31 #include "SharedBuffer.h" 32 #if USE(OPENJPEG) 33 #include "JPEG2000ImageDecoder.h" 34 #endif 32 35 #if USE(WEBP) 33 36 #include "WEBPImageDecoder.h" … … 74 77 } 75 78 79 #if USE(OPENJPEG) 80 bool matchesJP2Signature(char* contents) 81 { 82 return !memcmp(contents, "\x00\x00\x00\x0C\x6A\x50\x20\x20\x0D\x0A\x87\x0A", 12) 83 || !memcmp(contents, "\x0D\x0A\x87\x0A", 4); 84 } 85 86 bool matchesJ2KSignature(char* contents) 87 { 88 return !memcmp(contents, "\xFF\x4F\xFF\x51", 4); 89 } 90 #endif 91 76 92 #if USE(WEBP) 77 93 bool matchesWebPSignature(char* contents) … … 117 133 if (matchesJPEGSignature(contents)) 118 134 return JPEGImageDecoder::create(alphaOption, gammaAndColorProfileOption); 135 136 #if USE(OPENJPEG) 137 if (matchesJP2Signature(contents)) 138 return JPEG2000ImageDecoder::create(JPEG2000ImageDecoder::Format::JP2, alphaOption, gammaAndColorProfileOption); 139 140 if (matchesJ2KSignature(contents)) 141 return JPEG2000ImageDecoder::create(JPEG2000ImageDecoder::Format::J2K, alphaOption, gammaAndColorProfileOption); 142 #endif 119 143 120 144 #if USE(WEBP) -
trunk/Source/cmake/OptionsGTK.cmake
r239917 r240428 84 84 WEBKIT_OPTION_DEFINE(USE_LIBHYPHEN "Whether to enable the default automatic hyphenation implementation." PUBLIC ON) 85 85 WEBKIT_OPTION_DEFINE(USE_LIBSECRET "Whether to enable the persistent credential storage using libsecret." PUBLIC ON) 86 WEBKIT_OPTION_DEFINE(USE_OPENJPEG "Whether to enable support for JPEG2000 images." PUBLIC ON) 86 87 WEBKIT_OPTION_DEFINE(USE_WOFF2 "Whether to enable support for WOFF2 Web Fonts." PUBLIC ON) 87 88 … … 387 388 if (NOT HYPHEN_FOUND) 388 389 message(FATAL_ERROR "libhyphen is needed for USE_LIBHYPHEN.") 390 endif () 391 endif () 392 393 if (USE_OPENJPEG) 394 find_package(OpenJPEG) 395 if (NOT OpenJPEG_FOUND) 396 message(FATAL_ERROR "libopenjpeg is needed for USE_OPENJPEG.") 397 endif () 398 if ("${OPENJPEG_MAJOR_VERSION}.${OPENJPEG_MINOR_VERSION}.${OPENJPEG_BUILD_VERSION}" VERSION_LESS "2.2.0") 399 message(FATAL_ERROR "libopenjpeg 2.2.0 is required for USE_OPENJPEG.") 389 400 endif () 390 401 endif () -
trunk/Source/cmake/OptionsWPE.cmake
r240141 r240428 45 45 # and the option is not relevant to any other WebKit ports. 46 46 WEBKIT_OPTION_DEFINE(ENABLE_GTKDOC "Whether or not to use generate gtkdoc." PUBLIC OFF) 47 WEBKIT_OPTION_DEFINE(USE_OPENJPEG "Whether to enable support for JPEG2000 images." PUBLIC ON) 47 48 WEBKIT_OPTION_DEFINE(USE_WOFF2 "Whether to enable support for WOFF2 Web Fonts." PUBLIC ON) 48 49 WEBKIT_OPTION_DEFINE(ENABLE_WPE_QT_API "Whether to enable support for the Qt5/QML plugin" PUBLIC OFF) … … 86 87 find_package(WPE REQUIRED) 87 88 find_package(ZLIB REQUIRED) 89 90 if (USE_OPENJPEG) 91 find_package(OpenJPEG) 92 if (NOT OpenJPEG_FOUND) 93 message(FATAL_ERROR "libopenjpeg is needed for USE_OPENJPEG.") 94 endif () 95 if ("${OPENJPEG_MAJOR_VERSION}.${OPENJPEG_MINOR_VERSION}.${OPENJPEG_BUILD_VERSION}" VERSION_LESS "2.2.0") 96 message(FATAL_ERROR "libopenjpeg 2.2.0 is required for USE_OPENJPEG.") 97 endif () 98 endif () 88 99 89 100 if (USE_WOFF2) -
trunk/Tools/ChangeLog
r240402 r240428 1 2019-01-24 Carlos Garcia Campos <cgarcia@igalia.com> 2 3 [GTK][WPE] Support JPEG 2000 images 4 https://bugs.webkit.org/show_bug.cgi?id=186272 5 6 Reviewed by Žan Doberšek. 7 8 Add OpenJPEG to jhbuild since 2.2.0 version is required and it's not available in debian stable. 9 10 * gtk/jhbuild.modules: 11 * wpe/jhbuild.modules: 12 1 13 2019-01-23 David Kilzer <ddkilzer@apple.com> 2 14 -
trunk/Tools/gtk/jhbuild.modules
r240245 r240428 32 32 <dep package="libgpg-error"/> 33 33 <dep package="libgcrypt"/> 34 <dep package="openjpeg"/> 34 35 <if condition-set="linux"> 35 36 <dep package="xdg-dbus-proxy"/> … … 457 458 </autotools> 458 459 460 <cmake id="openjpeg"> 461 <branch repo="github-tarball" 462 module="uclouvain/openjpeg/archive/v${version}.tar.gz" 463 checkoutdir="openjpeg-${version}" 464 version="2.3.0" 465 hash="sha256:3dc787c1bb6023ba846c2a0d9b1f6e179f1cd255172bde9eb75b01f1e6c7d71a"/> 466 </cmake> 467 459 468 <!-- Dependencies listed below this point are not thought to affect test results, and are only 460 469 included because they themselves depend on other dependencies built by jhbuild. --> -
trunk/Tools/wpe/jhbuild.modules
r240245 r240428 25 25 <dep package="libepoxy"/> 26 26 <dep package="wayland-protocols"/> 27 <dep package="openjpeg"/> 27 28 </dependencies> 28 29 </metamodule> … … 227 228 </meson> 228 229 230 <cmake id="openjpeg"> 231 <branch repo="github-tarball" 232 module="uclouvain/openjpeg/archive/v${version}.tar.gz" 233 checkoutdir="openjpeg-${version}" 234 version="2.3.0" 235 hash="sha256:3dc787c1bb6023ba846c2a0d9b1f6e179f1cd255172bde9eb75b01f1e6c7d71a"/> 236 </cmake> 237 229 238 <distutils id="meson" python3="1"> 230 239 <branch repo="github-tarball"
Note: See TracChangeset
for help on using the changeset viewer.