Index: Source/core/paint/LayerPainter.cpp |
diff --git a/Source/core/paint/LayerPainter.cpp b/Source/core/paint/LayerPainter.cpp |
index 80da3d5d156e35e0624b561eb964185d527b3640..10d1738e24c34e6ca5fcd4abd30bf20edde5312e 100644 |
--- a/Source/core/paint/LayerPainter.cpp |
+++ b/Source/core/paint/LayerPainter.cpp |
@@ -196,6 +196,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; |
@@ -442,15 +444,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) { |
@@ -463,7 +456,7 @@ void LayerPainter::paintOverflowControlsForFragments(const LayerFragments& layer |
clipRecorder = adoptPtr(new LayerClipRecorder(m_renderLayer.renderer(), 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); |
} |
} |
@@ -625,7 +618,7 @@ void LayerPainter::paintFragmentWithPhase(PaintPhase phase, const LayerFragment& |
} |
PaintInfo paintInfo(context, pixelSnappedIntRect(clipRect.rect()), phase, paintBehavior, paintingRootForRenderer, 0, paintingInfo.rootLayer->renderer()); |
- m_renderLayer.renderer()->paint(paintInfo, toPoint(fragment.layerBounds.location() - m_renderLayer.layoutBoxLocation() + subPixelAccumulationIfNeeded(paintingInfo.subPixelAccumulation, m_renderLayer.compositingState()))); |
+ m_renderLayer.renderer()->paint(paintInfo, toPoint(fragment.layerBounds.location() - m_renderLayer.layoutBoxLocation())); |
} |
void LayerPainter::paintBackgroundForFragments(const LayerFragments& layerFragments, GraphicsContext* context, |