Index: third_party/WebKit/Source/core/paint/BoxPainter.cpp |
diff --git a/third_party/WebKit/Source/core/paint/BoxPainter.cpp b/third_party/WebKit/Source/core/paint/BoxPainter.cpp |
index bb81359501802a34989f70d11dbc354555e94a4c..76403ba7f23ede377dd50992aa89159647f985db 100644 |
--- a/third_party/WebKit/Source/core/paint/BoxPainter.cpp |
+++ b/third_party/WebKit/Source/core/paint/BoxPainter.cpp |
@@ -108,41 +108,6 @@ bool bleedAvoidanceIsClipping(BackgroundBleedAvoidance bleedAvoidance) { |
} // anonymous namespace |
-// Sets a preferred composited raster scale for box with a background image, |
-// if possible. |
-// |srcRect| is the rect, in the space of the source image, to raster. |
-// |destRect| is the rect, in the local layout space of |obj|, to raster. |
-inline void updatePreferredRasterBoundsFromImage( |
- const FloatRect srcRect, |
- const FloatRect& destRect, |
- const LayoutBoxModelObject& obj) { |
- if (!RuntimeEnabledFeatures::preferredImageRasterBoundsEnabled()) |
- return; |
- // Not yet implemented for SPv2. |
- if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) |
- return; |
- if (destRect.width() == 0.0f || destRect.height() == 0.0f) |
- return; |
- if (PaintLayer* paintLayer = obj.layer()) { |
- if (paintLayer->compositingState() != PaintsIntoOwnBacking) |
- return; |
- // TODO(chrishtr): ensure that this rounding does not ever lose any |
- // precision. |
- paintLayer->graphicsLayerBacking()->setPreferredRasterBounds( |
- roundedIntSize(srcRect.size())); |
- } |
-} |
- |
-inline void clearPreferredRasterBounds(const LayoutBox& obj) { |
- if (!RuntimeEnabledFeatures::preferredImageRasterBoundsEnabled()) |
- return; |
- if (PaintLayer* paintLayer = obj.layer()) { |
- if (paintLayer->compositingState() != PaintsIntoOwnBacking) |
- return; |
- paintLayer->graphicsLayerBacking()->clearPreferredRasterBounds(); |
- } |
-} |
- |
void BoxPainter::paintBoxDecorationBackgroundWithRect( |
const PaintInfo& paintInfo, |
const LayoutPoint& paintOffset, |
@@ -179,8 +144,6 @@ void BoxPainter::paintBoxDecorationBackgroundWithRect( |
DisplayItem::kBoxDecorationBackground)) |
return; |
- clearPreferredRasterBounds(m_layoutBox); |
- |
DrawingRecorder recorder( |
paintInfo.context, displayItemClient, |
DisplayItem::kBoxDecorationBackground, |
@@ -598,8 +561,6 @@ inline bool paintFastBottomLayer(const LayoutBoxModelObject& obj, |
context.drawImageRRect(imageContext.image(), border, srcRect, |
imageContext.compositeOp()); |
- updatePreferredRasterBoundsFromImage(srcRect, border.rect(), obj); |
- |
return true; |
} |