Index: Source/core/paint/LayerPainter.cpp |
diff --git a/Source/core/paint/LayerPainter.cpp b/Source/core/paint/LayerPainter.cpp |
index 96978f9df95c024ee19197bdb0582aa6f744f740..e6fdf7ac6fad91e8cd4533d6dccd9ab0e29b4710 100644 |
--- a/Source/core/paint/LayerPainter.cpp |
+++ b/Source/core/paint/LayerPainter.cpp |
@@ -197,6 +197,8 @@ void LayerPainter::paintLayerContents(GraphicsContext* context, const LayerPaint |
if (m_renderLayer.compositingState() == PaintsIntoOwnBacking) |
offsetFromRoot.move(m_renderLayer.subpixelAccumulation()); |
+ else |
+ offsetFromRoot.move(paintingInfo.subPixelAccumulation); |
LayoutRect rootRelativeBounds; |
bool rootRelativeBoundsComputed = false; |
@@ -443,15 +445,6 @@ bool LayerPainter::shouldPaintLayerInSoftwareMode(const LayerPaintingInfo& paint |
|| paintForFixedRootBackground(&m_renderLayer, paintFlags); |
} |
-static inline LayoutSize subPixelAccumulationIfNeeded(const LayoutSize& subPixelAccumulation, CompositingState compositingState) |
-{ |
- // Only apply the sub-pixel accumulation if we don't paint into our own backing layer, otherwise the position |
- // of the renderer already includes any sub-pixel offset. |
- if (compositingState == PaintsIntoOwnBacking) |
- return LayoutSize(); |
- return subPixelAccumulation; |
-} |
- |
void LayerPainter::paintOverflowControlsForFragments(const LayerFragments& layerFragments, GraphicsContext* context, const LayerPaintingInfo& localPaintingInfo, PaintLayerFlags paintFlags) |
{ |
for (size_t i = 0; i < layerFragments.size(); ++i) { |
@@ -464,7 +457,7 @@ void LayerPainter::paintOverflowControlsForFragments(const LayerFragments& layer |
clipRecorder = adoptPtr(new LayerClipRecorder(m_renderLayer.layoutObject(), context, DisplayItem::ClipLayerOverflowControls, fragment.backgroundRect, &localPaintingInfo, fragment.paginationOffset, paintFlags)); |
} |
if (LayerScrollableArea* scrollableArea = m_renderLayer.scrollableArea()) |
- ScrollableAreaPainter(*scrollableArea).paintOverflowControls(context, roundedIntPoint(toPoint(fragment.layerBounds.location() - m_renderLayer.layoutBoxLocation() + subPixelAccumulationIfNeeded(localPaintingInfo.subPixelAccumulation, m_renderLayer.compositingState()))), pixelSnappedIntRect(fragment.backgroundRect.rect()), true); |
+ ScrollableAreaPainter(*scrollableArea).paintOverflowControls(context, roundedIntPoint(toPoint(fragment.layerBounds.location() - m_renderLayer.layoutBoxLocation())), pixelSnappedIntRect(fragment.backgroundRect.rect()), true); |
} |
} |
@@ -626,7 +619,7 @@ void LayerPainter::paintFragmentWithPhase(PaintPhase phase, const LayerFragment& |
} |
PaintInfo paintInfo(context, pixelSnappedIntRect(clipRect.rect()), phase, paintBehavior, paintingRootForRenderer, 0, paintingInfo.rootLayer->layoutObject()); |
- m_renderLayer.layoutObject()->paint(paintInfo, toPoint(fragment.layerBounds.location() - m_renderLayer.layoutBoxLocation() + subPixelAccumulationIfNeeded(paintingInfo.subPixelAccumulation, m_renderLayer.compositingState()))); |
+ m_renderLayer.layoutObject()->paint(paintInfo, toPoint(fragment.layerBounds.location() - m_renderLayer.layoutBoxLocation())); |
} |
void LayerPainter::paintBackgroundForFragments(const LayerFragments& layerFragments, GraphicsContext* context, |