| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "config.h" | 5 #include "config.h" |
| 6 #include "core/paint/FilterPainter.h" | 6 #include "core/paint/FilterPainter.h" |
| 7 | 7 |
| 8 #include "core/paint/DeprecatedPaintLayer.h" | 8 #include "core/paint/DeprecatedPaintLayer.h" |
| 9 #include "core/paint/FilterEffectBuilder.h" | 9 #include "core/paint/FilterEffectBuilder.h" |
| 10 #include "core/paint/LayerClipRecorder.h" | 10 #include "core/paint/LayerClipRecorder.h" |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 } | 45 } |
| 46 | 46 |
| 47 // We'll handle clipping to the dirty rect before filter rasterization. | 47 // We'll handle clipping to the dirty rect before filter rasterization. |
| 48 // Filter processing will automatically expand the clip rect and the offscre
en to accommodate any filter outsets. | 48 // Filter processing will automatically expand the clip rect and the offscre
en to accommodate any filter outsets. |
| 49 // FIXME: It is incorrect to just clip to the damageRect here once multiple
fragments are involved. | 49 // FIXME: It is incorrect to just clip to the damageRect here once multiple
fragments are involved. |
| 50 | 50 |
| 51 // Subsequent code should not clip to the dirty rect, since we've already | 51 // Subsequent code should not clip to the dirty rect, since we've already |
| 52 // done it above, and doing it later will defeat the outsets. | 52 // done it above, and doing it later will defeat the outsets. |
| 53 paintingInfo.clipToDirtyRect = false; | 53 paintingInfo.clipToDirtyRect = false; |
| 54 | 54 |
| 55 if (clipRect.rect() != paintingInfo.paintDirtyRect || clipRect.hasRadius())
{ | 55 if ((clipRect.rect() != paintingInfo.paintDirtyRect || clipRect.hasRadius())
&& !RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { |
| 56 m_clipRecorder = adoptPtr(new LayerClipRecorder(*context, *layer.layoutO
bject(), DisplayItem::ClipLayerFilter, clipRect, &paintingInfo, LayoutPoint(), p
aintFlags)); | 56 m_clipRecorder = adoptPtr(new LayerClipRecorder(*context, *layer.layoutO
bject(), DisplayItem::ClipLayerFilter, clipRect, &paintingInfo, LayoutPoint(), p
aintFlags)); |
| 57 } | 57 } |
| 58 | 58 |
| 59 ASSERT(m_layoutObject); | 59 ASSERT(m_layoutObject); |
| 60 ASSERT(context->displayItemList()); | 60 ASSERT(context->displayItemList()); |
| 61 if (!context->displayItemList()->displayItemConstructionIsDisabled()) { | 61 if (!context->displayItemList()->displayItemConstructionIsDisabled()) { |
| 62 FilterOperations filterOperations(layer.computeFilterOperations(m_layout
Object->styleRef())); | 62 FilterOperations filterOperations(layer.computeFilterOperations(m_layout
Object->styleRef())); |
| 63 OwnPtr<WebFilterOperations> webFilterOperations = adoptPtr(Platform::cur
rent()->compositorSupport()->createFilterOperations()); | 63 OwnPtr<WebFilterOperations> webFilterOperations = adoptPtr(Platform::cur
rent()->compositorSupport()->createFilterOperations()); |
| 64 builder.buildFilterOperations(filterOperations, webFilterOperations.get(
)); | 64 builder.buildFilterOperations(filterOperations, webFilterOperations.get(
)); |
| 65 // FIXME: It's possible to have empty WebFilterOperations here even | 65 // FIXME: It's possible to have empty WebFilterOperations here even |
| (...skipping 16 matching lines...) Expand all Loading... |
| 82 ASSERT(m_context->displayItemList()); | 82 ASSERT(m_context->displayItemList()); |
| 83 if (!m_context->displayItemList()->displayItemConstructionIsDisabled()) { | 83 if (!m_context->displayItemList()->displayItemConstructionIsDisabled()) { |
| 84 if (m_context->displayItemList()->lastDisplayItemIsNoopBegin()) | 84 if (m_context->displayItemList()->lastDisplayItemIsNoopBegin()) |
| 85 m_context->displayItemList()->removeLastDisplayItem(); | 85 m_context->displayItemList()->removeLastDisplayItem(); |
| 86 else | 86 else |
| 87 m_context->displayItemList()->createAndAppend<EndFilterDisplayItem>(
*m_layoutObject); | 87 m_context->displayItemList()->createAndAppend<EndFilterDisplayItem>(
*m_layoutObject); |
| 88 } | 88 } |
| 89 } | 89 } |
| 90 | 90 |
| 91 } // namespace blink | 91 } // namespace blink |
| OLD | NEW |