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/LayerPainter.h" | 6 #include "core/paint/LayerPainter.h" |
7 | 7 |
8 #include "core/frame/Settings.h" | 8 #include "core/frame/Settings.h" |
9 #include "core/layout/ClipPathOperation.h" | 9 #include "core/layout/ClipPathOperation.h" |
10 #include "core/layout/FilterEffectRenderer.h" | 10 #include "core/layout/FilterEffectRenderer.h" |
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 // Blending operations must be performed only with the nearest ancestor stac
king context. | 209 // Blending operations must be performed only with the nearest ancestor stac
king context. |
210 // Note that there is no need to composite if we're painting the root. | 210 // Note that there is no need to composite if we're painting the root. |
211 // FIXME: this should be unified further into Layer::paintsWithTransparency(
). | 211 // FIXME: this should be unified further into Layer::paintsWithTransparency(
). |
212 bool shouldCompositeForBlendMode = (!m_renderLayer.renderer()->isDocumentEle
ment() || m_renderLayer.renderer()->isSVGRoot()) && m_renderLayer.stackingNode()
->isStackingContext() && m_renderLayer.hasNonIsolatedDescendantWithBlendMode(); | 212 bool shouldCompositeForBlendMode = (!m_renderLayer.renderer()->isDocumentEle
ment() || m_renderLayer.renderer()->isSVGRoot()) && m_renderLayer.stackingNode()
->isStackingContext() && m_renderLayer.hasNonIsolatedDescendantWithBlendMode(); |
213 if (shouldCompositeForBlendMode || m_renderLayer.paintsWithTransparency(pain
tingInfo.paintBehavior)) { | 213 if (shouldCompositeForBlendMode || m_renderLayer.paintsWithTransparency(pain
tingInfo.paintBehavior)) { |
214 clipRecorder = adoptPtr(new LayerClipRecorder(m_renderLayer.renderer(),
context, DisplayItem::TransparencyClip, | 214 clipRecorder = adoptPtr(new LayerClipRecorder(m_renderLayer.renderer(),
context, DisplayItem::TransparencyClip, |
215 m_renderLayer.paintingExtent(paintingInfo.rootLayer, paintingInfo.pa
intDirtyRect, paintingInfo.subPixelAccumulation, paintingInfo.paintBehavior), | 215 m_renderLayer.paintingExtent(paintingInfo.rootLayer, paintingInfo.pa
intDirtyRect, paintingInfo.subPixelAccumulation, paintingInfo.paintBehavior), |
216 &paintingInfo, LayoutPoint(), paintFlags)); | 216 &paintingInfo, LayoutPoint(), paintFlags)); |
217 | 217 |
218 compositingRecorder = adoptPtr(new CompositingRecorder(context, m_render
Layer.renderer()->displayItemClient(), | 218 compositingRecorder = adoptPtr(new CompositingRecorder(context, m_render
Layer.renderer()->displayItemClient(), |
219 context->compositeOperationDeprecated(), m_renderLayer.renderer()->s
tyle()->blendMode(), m_renderLayer.renderer()->opacity())); | 219 WebCoreCompositeToSkiaComposite(context->compositeOperationDeprecate
d(), m_renderLayer.renderer()->style()->blendMode()), |
| 220 m_renderLayer.renderer()->opacity())); |
220 } | 221 } |
221 | 222 |
222 LayerPaintingInfo localPaintingInfo(paintingInfo); | 223 LayerPaintingInfo localPaintingInfo(paintingInfo); |
223 | 224 |
224 LayerFragments layerFragments; | 225 LayerFragments layerFragments; |
225 if (shouldPaintContent || shouldPaintOutline || isPaintingOverlayScrollbars)
{ | 226 if (shouldPaintContent || shouldPaintOutline || isPaintingOverlayScrollbars)
{ |
226 // Collect the fragments. This will compute the clip rectangles and pain
t offsets for each layer fragment. | 227 // Collect the fragments. This will compute the clip rectangles and pain
t offsets for each layer fragment. |
227 ClipRectsCacheSlot cacheSlot = (paintFlags & PaintLayerUncachedClipRects
) ? UncachedClipRects : PaintingClipRects; | 228 ClipRectsCacheSlot cacheSlot = (paintFlags & PaintLayerUncachedClipRects
) ? UncachedClipRects : PaintingClipRects; |
228 ShouldRespectOverflowClip respectOverflowClip = shouldRespectOverflowCli
p(paintFlags, m_renderLayer.renderer()); | 229 ShouldRespectOverflowClip respectOverflowClip = shouldRespectOverflowCli
p(paintFlags, m_renderLayer.renderer()); |
229 if (fragmentPolicy == ForceSingleFragment) | 230 if (fragmentPolicy == ForceSingleFragment) |
(...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
707 if (!m_renderLayer.containsDirtyOverlayScrollbars()) | 708 if (!m_renderLayer.containsDirtyOverlayScrollbars()) |
708 return; | 709 return; |
709 | 710 |
710 LayerPaintingInfo paintingInfo(&m_renderLayer, enclosingIntRect(damageRect),
paintBehavior, LayoutSize(), paintingRoot); | 711 LayerPaintingInfo paintingInfo(&m_renderLayer, enclosingIntRect(damageRect),
paintBehavior, LayoutSize(), paintingRoot); |
711 paintLayer(context, paintingInfo, PaintLayerPaintingOverlayScrollbars); | 712 paintLayer(context, paintingInfo, PaintLayerPaintingOverlayScrollbars); |
712 | 713 |
713 m_renderLayer.setContainsDirtyOverlayScrollbars(false); | 714 m_renderLayer.setContainsDirtyOverlayScrollbars(false); |
714 } | 715 } |
715 | 716 |
716 } // namespace blink | 717 } // namespace blink |
OLD | NEW |