Skip to content

Commit 48237f9

Browse files
committed
wpewebkit: Add a patch to fix LBSE blurriness
1 parent 84523e3 commit 48237f9

File tree

2 files changed

+65
-0
lines changed

2 files changed

+65
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
diff --git a/Source/WebCore/platform/graphics/GraphicsLayer.h b/Source/WebCore/platform/graphics/GraphicsLayer.h
2+
index bd13b594389b..55a82d13e218 100644
3+
--- a/Source/WebCore/platform/graphics/GraphicsLayer.h
4+
+++ b/Source/WebCore/platform/graphics/GraphicsLayer.h
5+
@@ -623,6 +623,7 @@ public:
6+
7+
virtual void deviceOrPageScaleFactorChanged() { }
8+
virtual void setShouldUpdateRootRelativeScaleFactor(bool) { }
9+
+ virtual void setShouldDoubleScaleFactor(bool) { }
10+
11+
WEBCORE_EXPORT void noteDeviceOrPageScaleFactorChangedIncludingDescendants();
12+
13+
diff --git a/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp b/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp
14+
index a1e13176ee67..c9a2f2abbb16 100644
15+
--- a/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp
16+
+++ b/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp
17+
@@ -1088,7 +1088,10 @@ void CoordinatedGraphicsLayer::deviceOrPageScaleFactorChanged()
18+
19+
float CoordinatedGraphicsLayer::effectiveContentsScale()
20+
{
21+
- return selfOrAncestorHaveNonAffineTransforms() ? 1 : deviceScaleFactor() * pageScaleFactor();
22+
+ float contentsScale = selfOrAncestorHaveNonAffineTransforms() ? 1 : deviceScaleFactor() * pageScaleFactor();
23+
+ if (m_shouldDoubleScaleFactor)
24+
+ return contentsScale * 2;
25+
+ return contentsScale;
26+
}
27+
28+
IntRect CoordinatedGraphicsLayer::transformedVisibleRect()
29+
diff --git a/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h b/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h
30+
index 8d8fdb71d6eb..6a36bd8beb46 100644
31+
--- a/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h
32+
+++ b/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h
33+
@@ -110,6 +110,7 @@ public:
34+
void setNeedsDisplayInRect(const FloatRect&, ShouldClipToLayer = ClipToLayer) override;
35+
void setContentsNeedsDisplay() override;
36+
void deviceOrPageScaleFactorChanged() override;
37+
+ void setShouldDoubleScaleFactor(bool shouldDoubleScaleFactor) override { m_shouldDoubleScaleFactor = shouldDoubleScaleFactor; }
38+
void flushCompositingState(const FloatRect&) override;
39+
void flushCompositingStateForThisLayerOnly() override;
40+
bool setFilters(const FilterOperations&) override;
41+
@@ -224,6 +225,7 @@ private:
42+
bool m_pendingContentsScaleAdjustment : 1;
43+
bool m_pendingVisibleRectAdjustment : 1;
44+
bool m_shouldUpdatePlatformLayer : 1;
45+
+ bool m_shouldDoubleScaleFactor : 1 { false };
46+
47+
CoordinatedGraphicsLayerClient* m_coordinator;
48+
49+
diff --git a/Source/WebCore/rendering/RenderLayerBacking.cpp b/Source/WebCore/rendering/RenderLayerBacking.cpp
50+
index 054f14b16dcd..d3fd48368048 100644
51+
--- a/Source/WebCore/rendering/RenderLayerBacking.cpp
52+
+++ b/Source/WebCore/rendering/RenderLayerBacking.cpp
53+
@@ -364,6 +364,11 @@ Ref<GraphicsLayer> RenderLayerBacking::createGraphicsLayer(const String& name, G
54+
if (renderer().isSVGLayerAwareRenderer() && renderer().document().settings().layerBasedSVGEngineEnabled())
55+
graphicsLayer->setShouldUpdateRootRelativeScaleFactor(true);
56+
#endif
57+
+
58+
+#if ENABLE(LAYER_BASED_SVG_ENGINE)
59+
+ if (renderer().isSVGLayerAwareRenderer() && renderer().document().settings().layerBasedSVGEngineEnabled())
60+
+ graphicsLayer->setShouldDoubleScaleFactor(true);
61+
+#endif
62+
63+
return graphicsLayer;
64+
}

recipes-browser/wpewebkit/wpewebkit_2.42.%.bbappend

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
22

33
SRC_URI += "file://0001-Add-LAYER_BASED_SVG_ENGINE-envvar_v2.42.patch \
44
file://0001-LBSE-Correct-animation-boundaries-avoiding-excessive.patch \
5+
file://Fix-LBSE-blurriness.patch \
56
"
67

78
SRC_URI:class-devupstream = "git://github.com/WebKit/webkit.git;protocol=https;branch=main"

0 commit comments

Comments
 (0)