| 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/page/Page.h" | 9 #include "core/page/Page.h" |
| 10 #include "core/paint/CompositingRecorder.h" | 10 #include "core/paint/CompositingRecorder.h" |
| (...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 213 // Blending operations must be performed only with the nearest ancestor stac
king context. | 213 // Blending operations must be performed only with the nearest ancestor stac
king context. |
| 214 // Note that there is no need to composite if we're painting the root. | 214 // Note that there is no need to composite if we're painting the root. |
| 215 // FIXME: this should be unified further into RenderLayer::paintsWithTranspa
rency(). | 215 // FIXME: this should be unified further into RenderLayer::paintsWithTranspa
rency(). |
| 216 bool shouldCompositeForBlendMode = (!m_renderLayer.renderer()->isDocumentEle
ment() || m_renderLayer.renderer()->isSVGRoot()) && m_renderLayer.stackingNode()
->isStackingContext() && m_renderLayer.hasNonIsolatedDescendantWithBlendMode(); | 216 bool shouldCompositeForBlendMode = (!m_renderLayer.renderer()->isDocumentEle
ment() || m_renderLayer.renderer()->isSVGRoot()) && m_renderLayer.stackingNode()
->isStackingContext() && m_renderLayer.hasNonIsolatedDescendantWithBlendMode(); |
| 217 if (shouldCompositeForBlendMode || m_renderLayer.paintsWithTransparency(pain
tingInfo.paintBehavior)) { | 217 if (shouldCompositeForBlendMode || m_renderLayer.paintsWithTransparency(pain
tingInfo.paintBehavior)) { |
| 218 clipRecorder = adoptPtr(new LayerClipRecorder(m_renderLayer.renderer(),
context, DisplayItem::TransparencyClip, | 218 clipRecorder = adoptPtr(new LayerClipRecorder(m_renderLayer.renderer(),
context, DisplayItem::TransparencyClip, |
| 219 m_renderLayer.paintingExtent(paintingInfo.rootLayer, paintingInfo.pa
intDirtyRect, paintingInfo.subPixelAccumulation, paintingInfo.paintBehavior), | 219 m_renderLayer.paintingExtent(paintingInfo.rootLayer, paintingInfo.pa
intDirtyRect, paintingInfo.subPixelAccumulation, paintingInfo.paintBehavior), |
| 220 &paintingInfo, LayoutPoint(), paintFlags)); | 220 &paintingInfo, LayoutPoint(), paintFlags)); |
| 221 | 221 |
| 222 compositingRecorder = adoptPtr(new CompositingRecorder(context, m_render
Layer.renderer()->displayItemClient(), | 222 compositingRecorder = adoptPtr(new CompositingRecorder(context, m_render
Layer.renderer()->displayItemClient(), |
| 223 context->compositeOperation(), m_renderLayer.renderer()->style()->bl
endMode(), m_renderLayer.renderer()->opacity(), context->compositeOperation())); | 223 context->compositeOperationDeprecated(), m_renderLayer.renderer()->s
tyle()->blendMode(), m_renderLayer.renderer()->opacity(), context->compositeOper
ationDeprecated())); |
| 224 } | 224 } |
| 225 | 225 |
| 226 LayerPaintingInfo localPaintingInfo(paintingInfo); | 226 LayerPaintingInfo localPaintingInfo(paintingInfo); |
| 227 | 227 |
| 228 LayerFragments layerFragments; | 228 LayerFragments layerFragments; |
| 229 if (shouldPaintContent || shouldPaintOutline || isPaintingOverlayScrollbars)
{ | 229 if (shouldPaintContent || shouldPaintOutline || isPaintingOverlayScrollbars)
{ |
| 230 // Collect the fragments. This will compute the clip rectangles and pain
t offsets for each layer fragment. | 230 // Collect the fragments. This will compute the clip rectangles and pain
t offsets for each layer fragment. |
| 231 m_renderLayer.collectFragments(layerFragments, localPaintingInfo.rootLay
er, localPaintingInfo.paintDirtyRect, | 231 m_renderLayer.collectFragments(layerFragments, localPaintingInfo.rootLay
er, localPaintingInfo.paintDirtyRect, |
| 232 (paintFlags & PaintLayerUncachedClipRects) ? UncachedClipRects : Pai
ntingClipRects, IgnoreOverlayScrollbarSize, | 232 (paintFlags & PaintLayerUncachedClipRects) ? UncachedClipRects : Pai
ntingClipRects, IgnoreOverlayScrollbarSize, |
| 233 shouldRespectOverflowClip(paintFlags, m_renderLayer.renderer()), &of
fsetFromRoot, localPaintingInfo.subPixelAccumulation); | 233 shouldRespectOverflowClip(paintFlags, m_renderLayer.renderer()), &of
fsetFromRoot, localPaintingInfo.subPixelAccumulation); |
| (...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 723 if (!m_renderLayer.containsDirtyOverlayScrollbars()) | 723 if (!m_renderLayer.containsDirtyOverlayScrollbars()) |
| 724 return; | 724 return; |
| 725 | 725 |
| 726 LayerPaintingInfo paintingInfo(&m_renderLayer, enclosingIntRect(damageRect),
paintBehavior, LayoutSize(), paintingRoot); | 726 LayerPaintingInfo paintingInfo(&m_renderLayer, enclosingIntRect(damageRect),
paintBehavior, LayoutSize(), paintingRoot); |
| 727 paintLayer(context, paintingInfo, PaintLayerPaintingOverlayScrollbars); | 727 paintLayer(context, paintingInfo, PaintLayerPaintingOverlayScrollbars); |
| 728 | 728 |
| 729 m_renderLayer.setContainsDirtyOverlayScrollbars(false); | 729 m_renderLayer.setContainsDirtyOverlayScrollbars(false); |
| 730 } | 730 } |
| 731 | 731 |
| 732 } // namespace blink | 732 } // namespace blink |
| OLD | NEW |