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/DeprecatedPaintLayerPainter.h" | 6 #include "core/paint/DeprecatedPaintLayerPainter.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/LayoutBlock.h" | 10 #include "core/layout/LayoutBlock.h" |
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 clipRecorder.emplace(*context, *m_paintLayer.layoutObject(), DisplayItem
::TransparencyClip, | 221 clipRecorder.emplace(*context, *m_paintLayer.layoutObject(), DisplayItem
::TransparencyClip, |
222 m_paintLayer.paintingExtent(paintingInfo.rootLayer, paintingInfo.pai
ntDirtyRect, paintingInfo.subPixelAccumulation, paintingInfo.globalPaintFlags())
, | 222 m_paintLayer.paintingExtent(paintingInfo.rootLayer, paintingInfo.pai
ntDirtyRect, paintingInfo.subPixelAccumulation, paintingInfo.globalPaintFlags())
, |
223 &paintingInfo, LayoutPoint(), paintFlags); | 223 &paintingInfo, LayoutPoint(), paintFlags); |
224 | 224 |
225 compositingRecorder.emplace(*context, *m_paintLayer.layoutObject(), | 225 compositingRecorder.emplace(*context, *m_paintLayer.layoutObject(), |
226 WebCoreCompositeToSkiaComposite(CompositeSourceOver, m_paintLayer.la
youtObject()->style()->blendMode()), | 226 WebCoreCompositeToSkiaComposite(CompositeSourceOver, m_paintLayer.la
youtObject()->style()->blendMode()), |
227 m_paintLayer.layoutObject()->opacity()); | 227 m_paintLayer.layoutObject()->opacity()); |
228 } | 228 } |
229 | 229 |
230 DeprecatedPaintLayerPaintingInfo localPaintingInfo(paintingInfo); | 230 DeprecatedPaintLayerPaintingInfo localPaintingInfo(paintingInfo); |
| 231 if (m_paintLayer.compositingState() == PaintsIntoOwnBacking) |
| 232 localPaintingInfo.subPixelAccumulation = m_paintLayer.subpixelAccumulati
on(); |
231 | 233 |
232 DeprecatedPaintLayerFragments layerFragments; | 234 DeprecatedPaintLayerFragments layerFragments; |
233 if (shouldPaintContent || shouldPaintOutline || isPaintingOverlayScrollbars)
{ | 235 if (shouldPaintContent || shouldPaintOutline || isPaintingOverlayScrollbars)
{ |
234 // Collect the fragments. This will compute the clip rectangles and pain
t offsets for each layer fragment. | 236 // Collect the fragments. This will compute the clip rectangles and pain
t offsets for each layer fragment. |
235 ClipRectsCacheSlot cacheSlot = (paintFlags & PaintLayerUncachedClipRects
) ? UncachedClipRects : PaintingClipRects; | 237 ClipRectsCacheSlot cacheSlot = (paintFlags & PaintLayerUncachedClipRects
) ? UncachedClipRects : PaintingClipRects; |
236 ShouldRespectOverflowClip respectOverflowClip = shouldRespectOverflowCli
p(paintFlags, m_paintLayer.layoutObject()); | 238 ShouldRespectOverflowClip respectOverflowClip = shouldRespectOverflowCli
p(paintFlags, m_paintLayer.layoutObject()); |
237 if (fragmentPolicy == ForceSingleFragment) | 239 if (fragmentPolicy == ForceSingleFragment) |
238 m_paintLayer.appendSingleFragmentIgnoringPagination(layerFragments,
localPaintingInfo.rootLayer, localPaintingInfo.paintDirtyRect, cacheSlot, Ignore
OverlayScrollbarSize, respectOverflowClip, &offsetFromRoot, localPaintingInfo.su
bPixelAccumulation); | 240 m_paintLayer.appendSingleFragmentIgnoringPagination(layerFragments,
localPaintingInfo.rootLayer, localPaintingInfo.paintDirtyRect, cacheSlot, Ignore
OverlayScrollbarSize, respectOverflowClip, &offsetFromRoot, localPaintingInfo.su
bPixelAccumulation); |
239 else | 241 else |
240 m_paintLayer.collectFragments(layerFragments, localPaintingInfo.root
Layer, localPaintingInfo.paintDirtyRect, cacheSlot, IgnoreOverlayScrollbarSize,
respectOverflowClip, &offsetFromRoot, localPaintingInfo.subPixelAccumulation); | 242 m_paintLayer.collectFragments(layerFragments, localPaintingInfo.root
Layer, localPaintingInfo.paintDirtyRect, cacheSlot, IgnoreOverlayScrollbarSize,
respectOverflowClip, &offsetFromRoot, localPaintingInfo.subPixelAccumulation); |
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
602 if (!m_paintLayer.containsDirtyOverlayScrollbars()) | 604 if (!m_paintLayer.containsDirtyOverlayScrollbars()) |
603 return; | 605 return; |
604 | 606 |
605 DeprecatedPaintLayerPaintingInfo paintingInfo(&m_paintLayer, LayoutRect(encl
osingIntRect(damageRect)), paintFlags, LayoutSize(), paintingRoot); | 607 DeprecatedPaintLayerPaintingInfo paintingInfo(&m_paintLayer, LayoutRect(encl
osingIntRect(damageRect)), paintFlags, LayoutSize(), paintingRoot); |
606 paintLayer(context, paintingInfo, PaintLayerPaintingOverlayScrollbars); | 608 paintLayer(context, paintingInfo, PaintLayerPaintingOverlayScrollbars); |
607 | 609 |
608 m_paintLayer.setContainsDirtyOverlayScrollbars(false); | 610 m_paintLayer.setContainsDirtyOverlayScrollbars(false); |
609 } | 611 } |
610 | 612 |
611 } // namespace blink | 613 } // namespace blink |
OLD | NEW |