|
| 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 | + } |
0 commit comments