From owner-freebsd-chromium@freebsd.org Sun May 6 18:04:36 2018 Return-Path: Delivered-To: freebsd-chromium@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1496DFC1D6D for ; Sun, 6 May 2018 18:04:36 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id A245272F61 for ; Sun, 6 May 2018 18:04:35 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id 627C8FC1D6C; Sun, 6 May 2018 18:04:35 +0000 (UTC) Delivered-To: chromium@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3E825FC1D6B for ; Sun, 6 May 2018 18:04:35 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.ysv.freebsd.org (mxrelay.ysv.freebsd.org [IPv6:2001:1900:2254:206a::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.ysv.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C69ED72F5C for ; Sun, 6 May 2018 18:04:34 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.ysv.freebsd.org (Postfix) with ESMTPS id DCC986447 for ; Sun, 6 May 2018 18:04:33 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id w46I4XQG053353 for ; Sun, 6 May 2018 18:04:33 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id w46I4XRJ053352 for chromium@FreeBSD.org; Sun, 6 May 2018 18:04:33 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: chromium@FreeBSD.org Subject: [Bug 227915] www/chromium: fails to build with graphics/jpeg Date: Sun, 06 May 2018 18:04:33 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: gja822@narod.ru X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: cpm@freebsd.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-chromium@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: FreeBSD-specific Chromium issues List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 May 2018 18:04:36 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D227915 --- Comment #7 from gja822@narod.ru --- Comment on attachment 193108 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D193108 for compilation with graphics/jpeg >--- SkJpegCodec.cpp_o 2018-05-07 00:18:31.461277000 +0700 >+++ /usr/ports/www/chromium/work/chromium-65.0.3325.181/third_party/skia/s= rc/codec/SkJpegCodec.cpp 2018-05-07 00:34:58.580849000 +0700 >@@ -305,10 +305,14 @@ SkJpegCodec::SkJpegCodec(int width, int=20 > /* > * Return the row bytes of a particular image type and width > */ > static size_t get_row_bytes(const j_decompress_ptr dinfo) { >- const size_t colorBytes =3D (dinfo->out_color_space =3D=3D JCS_RGB565= ) ? 2 : >+ const size_t colorBytes =3D=20 >+#ifdef JCS_EXTENSIONS >+ (dinfo->out_color_space =3D=3D JCS_RGB565) ? 2 : >+#endif > dinfo->out_color_components; >+ > return dinfo->output_width * colorBytes; >=20 > } >=20 >@@ -396,8 +400,9 @@ bool SkJpegCodec::setOutputColorSpace(co >=20 > J_COLOR_SPACE encodedColorType =3D fDecoderMgr->dinfo()->jpeg_color_s= pace; >=20 > // Check for valid color types and set the output color space >+#ifdef JCS_EXTENSIONS > switch (dstInfo.colorType()) { > case kRGBA_8888_SkColorType: > fDecoderMgr->dinfo()->out_color_space =3D JCS_EXT_RGBA; > break; >@@ -436,8 +441,39 @@ bool SkJpegCodec::setOutputColorSpace(co > break; > default: > return false; > } >+#else >+ if (dstInfo.colorType() =3D=3D kGray_8_SkColorType) { >+ if (this->colorXform() || JCS_GRAYSCALE !=3D encodedColorType) { >+ return false; >+ } >+ >+ fDecoderMgr->dinfo()->out_color_space =3D JCS_GRAYSCALE; >+ } >+ else >+ if ((dstInfo.colorType() =3D=3D kGray_8_SkColorType) || >+ (dstInfo.colorType() =3D=3D kBGRA_8888_SkColorType) || >+ (dstInfo.colorType() =3D=3D kRGB_565_SkColorType) ) { >+ fDecoderMgr->dinfo()->out_color_space =3D JCS_RGB; >+ } >+ else >+ if (dstInfo.colorType() =3D=3D kRGBA_F16_SkColorType) >+ { >+ SkASSERT(this->colorXform()); >+ >+ if (!dstInfo.colorSpace()->gammaIsLinear()) { >+ return false; >+ } >+ >+ fDecoderMgr->dinfo()->out_color_space =3D JCS_RGB; >+ } >+ else >+ { >+ return false; >+ } >+ } >+#endif >=20 > // Check if we will decode to CMYK. libjpeg-turbo does not convert C= MYK to RGBA, so > // we must do it ourselves. > if (JCS_CMYK =3D=3D encodedColorType || JCS_YCCK =3D=3D encodedColorT= ype) { >@@ -711,9 +747,11 @@ SkCodec::Result SkJpegCodec::onStartScan > // block size. If this is the case, it will decrease the value of > // startX to the appropriate alignment and also increase the value > // of width so that the right edge of the requested subset remains > // the same. >+#ifdef JCS_EXTENSIONS > jpeg_crop_scanline(fDecoderMgr->dinfo(), &startX, &width); >+#endif >=20 > SkASSERT(startX <=3D (uint32_t) options.fSubset->x()); > SkASSERT(width >=3D (uint32_t) options.fSubset->width()); > SkASSERT(startX + width >=3D (uint32_t) options.fSubset->right()); >@@ -762,13 +800,17 @@ int SkJpegCodec::onGetScanlines(void* ds >=20 > bool SkJpegCodec::onSkipScanlines(int count) { > // Set the jump location for libjpeg errors > skjpeg_error_mgr::AutoPushJmpBuf jmp(fDecoderMgr->errorMgr()); >+#ifdef JCS_EXTENSIONS > if (setjmp(jmp)) { > return fDecoderMgr->returnFalse("onSkipScanlines"); > } >=20 > return (uint32_t) count =3D=3D jpeg_skip_scanlines(fDecoderMgr->dinfo= (), count); >+#else >+ return fDecoderMgr->returnFalse("onSkipScanlines"); >+#endif > } >=20 > static bool is_yuv_supported(jpeg_decompress_struct* dinfo) { > // Scaling is not supported in raw data mode. --=20 You are receiving this mail because: You are on the CC list for the bug.=