Accepting request 533919 from KDE:Qt5
Qt 5.9.2 OBS-URL: https://build.opensuse.org/request/show/533919 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libqt5-qtwebengine?expand=0&rev=25
This commit is contained in:
parent
45b5cda784
commit
616cf9139a
@ -1,162 +0,0 @@
|
|||||||
# HG changeset patch
|
|
||||||
# User Lee Salzman <lsalzman@mozilla.com>
|
|
||||||
# Date 1504120456 14400
|
|
||||||
# Wed Aug 30 15:14:16 2017 -0400
|
|
||||||
# Node ID 708d52f954b6d7ca2497fcb5b5084c6483300e89
|
|
||||||
# Parent 33224536ce20d942576cd4b9ffb350d6dce397bc
|
|
||||||
clip FreeType glyph bitmap to mask in Skia
|
|
||||||
|
|
||||||
MozReview-Commit-ID: 9NqLj9SkHFo
|
|
||||||
|
|
||||||
diff --git a/gfx/skia/skia/src/ports/SkFontHost_FreeType_common.cpp b/gfx/skia/skia/src/ports/SkFontHost_FreeType_common.cpp
|
|
||||||
--- a/gfx/skia/skia/src/ports/SkFontHost_FreeType_common.cpp
|
|
||||||
+++ b/gfx/skia/skia/src/ports/SkFontHost_FreeType_common.cpp
|
|
||||||
@@ -390,65 +390,131 @@ void SkScalerContext_FreeType_Base::gene
|
|
||||||
const SkMatrix& bitmapTransform)
|
|
||||||
{
|
|
||||||
const bool doBGR = SkToBool(fRec.fFlags & SkScalerContext::kLCD_BGROrder_Flag);
|
|
||||||
const bool doVert = SkToBool(fRec.fFlags & SkScalerContext::kLCD_Vertical_Flag);
|
|
||||||
|
|
||||||
switch ( face->glyph->format ) {
|
|
||||||
case FT_GLYPH_FORMAT_OUTLINE: {
|
|
||||||
FT_Outline* outline = &face->glyph->outline;
|
|
||||||
- FT_BBox bbox;
|
|
||||||
- FT_Bitmap target;
|
|
||||||
|
|
||||||
int dx = 0, dy = 0;
|
|
||||||
if (fRec.fFlags & SkScalerContext::kSubpixelPositioning_Flag) {
|
|
||||||
dx = SkFixedToFDot6(glyph.getSubXFixed());
|
|
||||||
dy = SkFixedToFDot6(glyph.getSubYFixed());
|
|
||||||
// negate dy since freetype-y-goes-up and skia-y-goes-down
|
|
||||||
dy = -dy;
|
|
||||||
}
|
|
||||||
- FT_Outline_Get_CBox(outline, &bbox);
|
|
||||||
- /*
|
|
||||||
- what we really want to do for subpixel is
|
|
||||||
- offset(dx, dy)
|
|
||||||
- compute_bounds
|
|
||||||
- offset(bbox & !63)
|
|
||||||
- but that is two calls to offset, so we do the following, which
|
|
||||||
- achieves the same thing with only one offset call.
|
|
||||||
- */
|
|
||||||
- FT_Outline_Translate(outline, dx - ((bbox.xMin + dx) & ~63),
|
|
||||||
- dy - ((bbox.yMin + dy) & ~63));
|
|
||||||
+
|
|
||||||
+ memset(glyph.fImage, 0, glyph.rowBytes() * glyph.fHeight);
|
|
||||||
|
|
||||||
if (SkMask::kLCD16_Format == glyph.fMaskFormat) {
|
|
||||||
+ FT_Outline_Translate(outline, dx, dy);
|
|
||||||
FT_Error err = FT_Render_Glyph(face->glyph, doVert ? FT_RENDER_MODE_LCD_V :
|
|
||||||
FT_RENDER_MODE_LCD);
|
|
||||||
if (err) {
|
|
||||||
SK_TRACEFTR(err, "Could not render glyph.");
|
|
||||||
- sk_bzero(glyph.fImage, glyph.computeImageSize());
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
+
|
|
||||||
SkMask mask;
|
|
||||||
glyph.toMask(&mask);
|
|
||||||
+#ifdef SK_SHOW_TEXT_BLIT_COVERAGE
|
|
||||||
+ memset(mask.fImage, 0x80, mask.fBounds.height() * mask.fRowBytes);
|
|
||||||
+#endif
|
|
||||||
+ FT_GlyphSlotRec& ftGlyph = *face->glyph;
|
|
||||||
+
|
|
||||||
+ if (!SkIRect::Intersects(mask.fBounds,
|
|
||||||
+ SkIRect::MakeXYWH( ftGlyph.bitmap_left,
|
|
||||||
+ -ftGlyph.bitmap_top,
|
|
||||||
+ ftGlyph.bitmap.width,
|
|
||||||
+ ftGlyph.bitmap.rows)))
|
|
||||||
+ {
|
|
||||||
+ return;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ // If the FT_Bitmap extent is larger, discard bits of the bitmap outside the mask.
|
|
||||||
+ // If the SkMask extent is larger, shrink mask to fit bitmap (clearing discarded).
|
|
||||||
+ unsigned char* origBuffer = ftGlyph.bitmap.buffer;
|
|
||||||
+ // First align the top left (origin).
|
|
||||||
+ if (-ftGlyph.bitmap_top < mask.fBounds.fTop) {
|
|
||||||
+ int32_t topDiff = mask.fBounds.fTop - (-ftGlyph.bitmap_top);
|
|
||||||
+ ftGlyph.bitmap.buffer += ftGlyph.bitmap.pitch * topDiff;
|
|
||||||
+ ftGlyph.bitmap.rows -= topDiff;
|
|
||||||
+ ftGlyph.bitmap_top = -mask.fBounds.fTop;
|
|
||||||
+ }
|
|
||||||
+ if (ftGlyph.bitmap_left < mask.fBounds.fLeft) {
|
|
||||||
+ int32_t leftDiff = mask.fBounds.fLeft - ftGlyph.bitmap_left;
|
|
||||||
+ ftGlyph.bitmap.buffer += leftDiff;
|
|
||||||
+ ftGlyph.bitmap.width -= leftDiff;
|
|
||||||
+ ftGlyph.bitmap_left = mask.fBounds.fLeft;
|
|
||||||
+ }
|
|
||||||
+ if (mask.fBounds.fTop < -ftGlyph.bitmap_top) {
|
|
||||||
+ mask.fImage += mask.fRowBytes * (-ftGlyph.bitmap_top - mask.fBounds.fTop);
|
|
||||||
+ mask.fBounds.fTop = -ftGlyph.bitmap_top;
|
|
||||||
+ }
|
|
||||||
+ if (mask.fBounds.fLeft < ftGlyph.bitmap_left) {
|
|
||||||
+ mask.fImage += sizeof(uint16_t) * (ftGlyph.bitmap_left - mask.fBounds.fLeft);
|
|
||||||
+ mask.fBounds.fLeft = ftGlyph.bitmap_left;
|
|
||||||
+ }
|
|
||||||
+ // Origins aligned, clean up the width and height.
|
|
||||||
+ int ftVertScale = (doVert ? 3 : 1);
|
|
||||||
+ int ftHoriScale = (doVert ? 1 : 3);
|
|
||||||
+ if (mask.fBounds.height() * ftVertScale < SkToInt(ftGlyph.bitmap.rows)) {
|
|
||||||
+ ftGlyph.bitmap.rows = mask.fBounds.height() * ftVertScale;
|
|
||||||
+ }
|
|
||||||
+ if (mask.fBounds.width() * ftHoriScale < SkToInt(ftGlyph.bitmap.width)) {
|
|
||||||
+ ftGlyph.bitmap.width = mask.fBounds.width() * ftHoriScale;
|
|
||||||
+ }
|
|
||||||
+ if (SkToInt(ftGlyph.bitmap.rows) < mask.fBounds.height() * ftVertScale) {
|
|
||||||
+ mask.fBounds.fBottom = mask.fBounds.fTop + ftGlyph.bitmap.rows / ftVertScale;
|
|
||||||
+ }
|
|
||||||
+ if (SkToInt(ftGlyph.bitmap.width) < mask.fBounds.width() * ftHoriScale) {
|
|
||||||
+ mask.fBounds.fRight = mask.fBounds.fLeft + ftGlyph.bitmap.width / ftHoriScale;
|
|
||||||
+ }
|
|
||||||
if (fPreBlend.isApplicable()) {
|
|
||||||
- copyFT2LCD16<true>(face->glyph->bitmap, mask, doBGR,
|
|
||||||
+ copyFT2LCD16<true>(ftGlyph.bitmap, mask, doBGR,
|
|
||||||
fPreBlend.fR, fPreBlend.fG, fPreBlend.fB);
|
|
||||||
} else {
|
|
||||||
- copyFT2LCD16<false>(face->glyph->bitmap, mask, doBGR,
|
|
||||||
+ copyFT2LCD16<false>(ftGlyph.bitmap, mask, doBGR,
|
|
||||||
fPreBlend.fR, fPreBlend.fG, fPreBlend.fB);
|
|
||||||
}
|
|
||||||
+ // Restore the buffer pointer so FreeType can properly free it.
|
|
||||||
+ ftGlyph.bitmap.buffer = origBuffer;
|
|
||||||
} else {
|
|
||||||
+ FT_BBox bbox;
|
|
||||||
+ FT_Bitmap target;
|
|
||||||
+ FT_Outline_Get_CBox(outline, &bbox);
|
|
||||||
+ /*
|
|
||||||
+ what we really want to do for subpixel is
|
|
||||||
+ offset(dx, dy)
|
|
||||||
+ compute_bounds
|
|
||||||
+ offset(bbox & !63)
|
|
||||||
+ but that is two calls to offset, so we do the following, which
|
|
||||||
+ achieves the same thing with only one offset call.
|
|
||||||
+ */
|
|
||||||
+ FT_Outline_Translate(outline, dx - ((bbox.xMin + dx) & ~63),
|
|
||||||
+ dy - ((bbox.yMin + dy) & ~63));
|
|
||||||
+
|
|
||||||
target.width = glyph.fWidth;
|
|
||||||
target.rows = glyph.fHeight;
|
|
||||||
target.pitch = glyph.rowBytes();
|
|
||||||
target.buffer = reinterpret_cast<uint8_t*>(glyph.fImage);
|
|
||||||
target.pixel_mode = compute_pixel_mode( (SkMask::Format)fRec.fMaskFormat);
|
|
||||||
target.num_grays = 256;
|
|
||||||
|
|
||||||
- memset(glyph.fImage, 0, glyph.rowBytes() * glyph.fHeight);
|
|
||||||
FT_Outline_Get_Bitmap(face->glyph->library, outline, &target);
|
|
||||||
+#ifdef SK_SHOW_TEXT_BLIT_COVERAGE
|
|
||||||
+ for (int y = 0; y < glyph.fHeight; ++y) {
|
|
||||||
+ for (int x = 0; x < glyph.fWidth; ++x) {
|
|
||||||
+ uint8_t& a = ((uint8_t*)glyph.fImage)[(glyph.rowBytes() * y) + x];
|
|
||||||
+ a = SkTMax<uint8_t>(a, 0x20);
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+#endif
|
|
||||||
}
|
|
||||||
} break;
|
|
||||||
|
|
||||||
case FT_GLYPH_FORMAT_BITMAP: {
|
|
||||||
FT_Pixel_Mode pixel_mode = static_cast<FT_Pixel_Mode>(face->glyph->bitmap.pixel_mode);
|
|
||||||
SkMask::Format maskFormat = static_cast<SkMask::Format>(glyph.fMaskFormat);
|
|
||||||
|
|
||||||
// Assume that the other formats do not exist.
|
|
@ -1,8 +1,8 @@
|
|||||||
Index: qtwebengine-opensource-src-5.9.1/src/core/web_engine_context.cpp
|
Index: qtwebengine-opensource-src-5.9.2/src/core/web_engine_context.cpp
|
||||||
===================================================================
|
===================================================================
|
||||||
--- qtwebengine-opensource-src-5.9.1.orig/src/core/web_engine_context.cpp
|
--- qtwebengine-opensource-src-5.9.2.orig/src/core/web_engine_context.cpp
|
||||||
+++ qtwebengine-opensource-src-5.9.1/src/core/web_engine_context.cpp
|
+++ qtwebengine-opensource-src-5.9.2/src/core/web_engine_context.cpp
|
||||||
@@ -90,6 +90,7 @@
|
@@ -91,6 +91,7 @@
|
||||||
#include <QOffscreenSurface>
|
#include <QOffscreenSurface>
|
||||||
#ifndef QT_NO_OPENGL
|
#ifndef QT_NO_OPENGL
|
||||||
# include <QOpenGLContext>
|
# include <QOpenGLContext>
|
||||||
@ -10,7 +10,7 @@ Index: qtwebengine-opensource-src-5.9.1/src/core/web_engine_context.cpp
|
|||||||
#endif
|
#endif
|
||||||
#include <QQuickWindow>
|
#include <QQuickWindow>
|
||||||
#include <QStringList>
|
#include <QStringList>
|
||||||
@@ -179,6 +180,39 @@ void dummyGetPluginCallback(const std::v
|
@@ -165,6 +166,39 @@ void dummyGetPluginCallback(const std::v
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -50,28 +50,3 @@ Index: qtwebengine-opensource-src-5.9.1/src/core/web_engine_context.cpp
|
|||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
namespace QtWebEngineCore {
|
namespace QtWebEngineCore {
|
||||||
@@ -349,9 +383,23 @@ WebEngineContext::WebEngineContext()
|
|
||||||
|
|
||||||
GLContextHelper::initialize();
|
|
||||||
|
|
||||||
+#ifndef QT_NO_OPENGL
|
|
||||||
+ bool disableGpu = qEnvironmentVariableIsSet("QT_WEBENGINE_DISABLE_GPU");
|
|
||||||
+
|
|
||||||
+ if (!qEnvironmentVariableIsSet("QT_WEBENGINE_DISABLE_NOUVEAU_WORKAROUND") && openGLVendor() == QStringLiteral("nouveau"))
|
|
||||||
+ {
|
|
||||||
+ qWarning() << "Nouveau openGL driver detected. Qt WebEngine will disable usage of the GPU.\n"
|
|
||||||
+ "Note: you can set the QT_WEBENGINE_DISABLE_NOUVEAU_WORKAROUND\n"
|
|
||||||
+ "environment variable before running this application, but this is \n"
|
|
||||||
+ "not recommended since this usually causes applications to crash as\n"
|
|
||||||
+ "Nouveau openGL drivers don't support multithreaded rendering";
|
|
||||||
+ disableGpu = true;
|
|
||||||
+ }
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
const char *glType = 0;
|
|
||||||
#ifndef QT_NO_OPENGL
|
|
||||||
- if (!usingANGLE() && !usingSoftwareDynamicGL() && !usingQtQuick2DRenderer()) {
|
|
||||||
+ if (!usingANGLE() && !usingSoftwareDynamicGL() && !usingQtQuick2DRenderer() && !disableGpu) {
|
|
||||||
if (qt_gl_global_share_context() && qt_gl_global_share_context()->isValid()) {
|
|
||||||
// If the native handle is QEGLNativeContext try to use GL ES/2, if there is no native handle
|
|
||||||
// assume we are using wayland and try GL ES/2, and finally Ozone demands GL ES/2 too.
|
|
||||||
|
@ -1,3 +1,12 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Sun Oct 8 14:12:31 UTC 2017 - lbeltrame@kde.org
|
||||||
|
|
||||||
|
- Update to 5.9.2
|
||||||
|
* For more details please see:
|
||||||
|
https://blog.qt.io/blog/2017/10/06/qt-5-9-2-released/
|
||||||
|
- Dropped patches, now upstream:
|
||||||
|
* clip-ft-glyph.diff
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Oct 3 02:27:41 UTC 2017 - t.zell@gmx.de
|
Tue Oct 3 02:27:41 UTC 2017 - t.zell@gmx.de
|
||||||
|
|
||||||
|
@ -49,15 +49,15 @@
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
Name: libqt5-qtwebengine
|
Name: libqt5-qtwebengine
|
||||||
Version: 5.9.1
|
Version: 5.9.2
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Qt 5 WebEngine Library
|
Summary: Qt 5 WebEngine Library
|
||||||
License: SUSE-LGPL-2.1-with-digia-exception-1.1 or GPL-3.0
|
License: SUSE-LGPL-2.1-with-digia-exception-1.1 or GPL-3.0
|
||||||
Group: Development/Libraries/X11
|
Group: Development/Libraries/X11
|
||||||
Url: https://www.qt.io
|
Url: https://www.qt.io
|
||||||
%define base_name libqt5
|
%define base_name libqt5
|
||||||
%define real_version 5.9.1
|
%define real_version 5.9.2
|
||||||
%define so_version 5.9.1
|
%define so_version 5.9.2
|
||||||
%define tar_version qtwebengine-opensource-src-%{real_version}
|
%define tar_version qtwebengine-opensource-src-%{real_version}
|
||||||
Source: https://download.qt.io/official_releases/qt/5.9/%{real_version}/submodules/%{tar_version}.tar.xz
|
Source: https://download.qt.io/official_releases/qt/5.9/%{real_version}/submodules/%{tar_version}.tar.xz
|
||||||
Source1: baselibs.conf
|
Source1: baselibs.conf
|
||||||
@ -65,10 +65,8 @@ Source1: baselibs.conf
|
|||||||
Patch1: armv6-ffmpeg-no-thumb.patch
|
Patch1: armv6-ffmpeg-no-thumb.patch
|
||||||
# PATCH-FIX-UPSTREAM disable-gpu-when-using-nouveau-boo-1005323.diff -- Detect nouveau opengl drivers and disable gpu usage to work around nouveau crashing
|
# PATCH-FIX-UPSTREAM disable-gpu-when-using-nouveau-boo-1005323.diff -- Detect nouveau opengl drivers and disable gpu usage to work around nouveau crashing
|
||||||
Patch2: disable-gpu-when-using-nouveau-boo-1005323.diff
|
Patch2: disable-gpu-when-using-nouveau-boo-1005323.diff
|
||||||
# PATCH-FIX-UPSTREAM clip-ft-glyph.diff -- clip FreeType glyph bitmap to mask in Skia (for freetype-2.8.1) boo#1061344
|
|
||||||
Patch3: clip-ft-glyph.diff
|
|
||||||
# PATCH-FIX-UPSTREAM harmony-fix.diff -- Show the patent-free LCD rendering. Without this patch, only grayscale rendering is used. (for freetype-2.8.1) boo#1061344
|
# PATCH-FIX-UPSTREAM harmony-fix.diff -- Show the patent-free LCD rendering. Without this patch, only grayscale rendering is used. (for freetype-2.8.1) boo#1061344
|
||||||
Patch4: harmony-fix.diff
|
Patch3: harmony-fix.diff
|
||||||
# http://www.chromium.org/blink not ported to PowerPC
|
# http://www.chromium.org/blink not ported to PowerPC
|
||||||
ExcludeArch: ppc ppc64 ppc64le s390 s390x
|
ExcludeArch: ppc ppc64 ppc64le s390 s390x
|
||||||
# Try to fix i586 MemoryErrors with rpmlint
|
# Try to fix i586 MemoryErrors with rpmlint
|
||||||
@ -94,6 +92,7 @@ BuildRequires: libqt5-qttools-private-headers-devel >= %{version}
|
|||||||
BuildRequires: libqt5-qtlocation-private-headers-devel >= %{version}
|
BuildRequires: libqt5-qtlocation-private-headers-devel >= %{version}
|
||||||
BuildRequires: libqt5-qtwebchannel-private-headers-devel >= %{version}
|
BuildRequires: libqt5-qtwebchannel-private-headers-devel >= %{version}
|
||||||
BuildRequires: libqt5-qtxmlpatterns-private-headers-devel >= %{version}
|
BuildRequires: libqt5-qtxmlpatterns-private-headers-devel >= %{version}
|
||||||
|
BuildRequires: libQt5QuickControls2-devel
|
||||||
BuildRequires: pam-devel
|
BuildRequires: pam-devel
|
||||||
BuildRequires: pciutils-devel
|
BuildRequires: pciutils-devel
|
||||||
BuildRequires: perl-JSON
|
BuildRequires: perl-JSON
|
||||||
@ -240,8 +239,7 @@ Examples for the libqt5-qtwebengine module.
|
|||||||
sed -i 's|$(STRIP)|strip|g' src/core/core_module.pro
|
sed -i 's|$(STRIP)|strip|g' src/core/core_module.pro
|
||||||
%patch1 -p1
|
%patch1 -p1
|
||||||
%patch2 -p1
|
%patch2 -p1
|
||||||
%patch3 -d src/3rdparty/chromium/third_party/skia -p4
|
%patch3 -p1
|
||||||
%patch4 -p1
|
|
||||||
# QTBUG-61128
|
# QTBUG-61128
|
||||||
sed -i -e '/toolprefix = /d' -e 's/\${toolprefix}//g' \
|
sed -i -e '/toolprefix = /d' -e 's/\${toolprefix}//g' \
|
||||||
src/3rdparty/chromium/build/toolchain/linux/BUILD.gn
|
src/3rdparty/chromium/build/toolchain/linux/BUILD.gn
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:f6a37eeb9188474a16d29ede498fce959396ab80329a0a83eaeb925251686401
|
|
||||||
size 218066864
|
|
3
qtwebengine-opensource-src-5.9.2.tar.xz
Normal file
3
qtwebengine-opensource-src-5.9.2.tar.xz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:cab069e4589f806640bebe4077c70e5cd5ffeb146c6e8caca6c4454fc0c4a108
|
||||||
|
size 217353592
|
Loading…
Reference in New Issue
Block a user