| Index: third_party/WebKit/Source/platform/graphics/paint/CompositingRecorder.cpp
|
| diff --git a/third_party/WebKit/Source/platform/graphics/paint/CompositingRecorder.cpp b/third_party/WebKit/Source/platform/graphics/paint/CompositingRecorder.cpp
|
| index fbbbd00c3ba3e876b2f745e84678b92d738c42f4..6996d03d55bff47d75364cf0ff328546af5e7053 100644
|
| --- a/third_party/WebKit/Source/platform/graphics/paint/CompositingRecorder.cpp
|
| +++ b/third_party/WebKit/Source/platform/graphics/paint/CompositingRecorder.cpp
|
| @@ -25,54 +25,8 @@ CompositingRecorder::CompositingRecorder(GraphicsContext& graphicsContext,
|
| }
|
|
|
| CompositingRecorder::~CompositingRecorder() {
|
| - // If the end of the current display list is of the form
|
| - // [BeginCompositingDisplayItem] [DrawingDisplayItem], then fold the
|
| - // BeginCompositingDisplayItem into a new DrawingDisplayItem that replaces
|
| - // them both. This allows Skia to optimize for the case when the
|
| - // BeginCompositingDisplayItem represents a simple opacity/color that can be
|
| - // merged into the opacity/color of the drawing. See crbug.com/628831 for more
|
| - // details.
|
| - PaintController& paintController = m_graphicsContext.getPaintController();
|
| - const DisplayItem* lastDisplayItem = paintController.lastDisplayItem(0);
|
| - const DisplayItem* secondToLastDisplayItem =
|
| - paintController.lastDisplayItem(1);
|
| - if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled() && lastDisplayItem &&
|
| - secondToLastDisplayItem && lastDisplayItem->drawsContent() &&
|
| - secondToLastDisplayItem->getType() == DisplayItem::kBeginCompositing) {
|
| - FloatRect cullRect(
|
| - ((DrawingDisplayItem*)lastDisplayItem)->GetPaintRecord()->cullRect());
|
| - const DisplayItemClient& displayItemClient = lastDisplayItem->client();
|
| - DisplayItem::Type displayItemType = lastDisplayItem->getType();
|
| -
|
| - // Re-record the last two DisplayItems into a new drawing. The new item
|
| - // cannot be cached, because it is a mutation of the DisplayItem the client
|
| - // thought it was painting.
|
| - paintController.beginSkippingCache();
|
| - {
|
| -#if DCHECK_IS_ON()
|
| - // In the recorder's scope we remove the last two display items which
|
| - // are combined into a new drawing.
|
| - DisableListModificationCheck disabler;
|
| -#endif
|
| - DrawingRecorder newRecorder(m_graphicsContext, displayItemClient,
|
| - displayItemType, cullRect);
|
| - DCHECK(!DrawingRecorder::useCachedDrawingIfPossible(
|
| - m_graphicsContext, displayItemClient, displayItemType));
|
| -
|
| - secondToLastDisplayItem->replay(m_graphicsContext);
|
| - lastDisplayItem->replay(m_graphicsContext);
|
| - EndCompositingDisplayItem(m_client).replay(m_graphicsContext);
|
| -
|
| - // Remove the DrawingDisplayItem.
|
| - paintController.removeLastDisplayItem();
|
| - // Remove the BeginCompositingDisplayItem.
|
| - paintController.removeLastDisplayItem();
|
| - }
|
| - paintController.endSkippingCache();
|
| - } else {
|
| - m_graphicsContext.getPaintController().endItem<EndCompositingDisplayItem>(
|
| - m_client);
|
| - }
|
| + m_graphicsContext.getPaintController().endItem<EndCompositingDisplayItem>(
|
| + m_client);
|
| }
|
|
|
| } // namespace blink
|
|
|