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 "core/paint/PaintLayerPainter.h" | 5 #include "core/paint/PaintLayerPainter.h" |
6 | 6 |
7 #include "core/frame/LocalFrame.h" | 7 #include "core/frame/LocalFrame.h" |
8 #include "core/layout/LayoutView.h" | 8 #include "core/layout/LayoutView.h" |
9 #include "core/paint/ClipPathClipper.h" | 9 #include "core/paint/ClipPathClipper.h" |
10 #include "core/paint/FilterPainter.h" | 10 #include "core/paint/FilterPainter.h" |
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
244 paintLayer.previousScrollOffsetAccumulationForPainting()) { | 244 paintLayer.previousScrollOffsetAccumulationForPainting()) { |
245 needsRepaint = true; | 245 needsRepaint = true; |
246 shouldClearEmptyPaintPhaseFlags = true; | 246 shouldClearEmptyPaintPhaseFlags = true; |
247 } | 247 } |
248 paintLayer.setPreviousScrollOffsetAccumulationForPainting( | 248 paintLayer.setPreviousScrollOffsetAccumulationForPainting( |
249 paintingInfo.scrollOffsetAccumulation); | 249 paintingInfo.scrollOffsetAccumulation); |
250 | 250 |
251 return needsRepaint; | 251 return needsRepaint; |
252 } | 252 } |
253 | 253 |
254 void adjustOffsetForAncestorClippingMask( | |
chrishtr
2016/12/07 19:16:24
This is now dead code.
| |
255 const PaintLayer& childLayer, | |
256 const PaintLayer& ancestorLayer, | |
257 LayoutPoint& offset) | |
258 { | |
259 // Adjust the offset to reflect the fact that the fragment is | |
260 // positioned for the clipping container object. | |
261 LayoutPoint childOffsetToAncestor; | |
262 childLayer.convertToLayerCoords(&ancestorLayer, childOffsetToAncestor); | |
263 offset.move( | |
264 LayoutSize(-childOffsetToAncestor.x(), -childOffsetToAncestor.y())); | |
265 } | |
266 | |
254 PaintResult PaintLayerPainter::paintLayerContents( | 267 PaintResult PaintLayerPainter::paintLayerContents( |
255 GraphicsContext& context, | 268 GraphicsContext& context, |
256 const PaintLayerPaintingInfo& paintingInfoArg, | 269 const PaintLayerPaintingInfo& paintingInfoArg, |
257 PaintLayerFlags paintFlags, | 270 PaintLayerFlags paintFlags, |
258 FragmentPolicy fragmentPolicy) { | 271 FragmentPolicy fragmentPolicy) { |
259 Optional<ScopedPaintChunkProperties> scopedPaintChunkProperties; | 272 Optional<ScopedPaintChunkProperties> scopedPaintChunkProperties; |
260 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled() && | 273 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled() && |
261 RuntimeEnabledFeatures::rootLayerScrollingEnabled() && | 274 RuntimeEnabledFeatures::rootLayerScrollingEnabled() && |
262 m_paintLayer.layoutObject() && | 275 m_paintLayer.layoutObject() && |
263 m_paintLayer.layoutObject()->isLayoutView()) { | 276 m_paintLayer.layoutObject()->isLayoutView()) { |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
367 // These helpers output clip and compositing operations using a RAII pattern. | 380 // These helpers output clip and compositing operations using a RAII pattern. |
368 // Stack-allocated-varibles are destructed in the reverse order of | 381 // Stack-allocated-varibles are destructed in the reverse order of |
369 // construction, so they are nested properly. | 382 // construction, so they are nested properly. |
370 Optional<ClipPathClipper> clipPathClipper; | 383 Optional<ClipPathClipper> clipPathClipper; |
371 // Clip-path, like border radius, must not be applied to the contents of a | 384 // Clip-path, like border radius, must not be applied to the contents of a |
372 // composited-scrolling container. It must, however, still be applied to the | 385 // composited-scrolling container. It must, however, still be applied to the |
373 // mask layer, so that the compositor can properly mask the | 386 // mask layer, so that the compositor can properly mask the |
374 // scrolling contents and scrollbars. | 387 // scrolling contents and scrollbars. |
375 if (m_paintLayer.layoutObject()->hasClipPath() && | 388 if (m_paintLayer.layoutObject()->hasClipPath() && |
376 (!m_paintLayer.needsCompositedScrolling() || | 389 (!m_paintLayer.needsCompositedScrolling() || |
377 (paintFlags & PaintLayerPaintingChildClippingMaskPhase))) { | 390 (paintFlags & (PaintLayerPaintingChildClippingMaskPhase | |
391 PaintLayerPaintingAncestorClippingMaskPhase)))) { | |
378 paintingInfo.ancestorHasClipPathClipping = true; | 392 paintingInfo.ancestorHasClipPathClipping = true; |
379 | 393 |
380 LayoutRect referenceBox(m_paintLayer.boxForClipPath()); | 394 LayoutRect referenceBox(m_paintLayer.boxForClipPath()); |
381 // Note that this isn't going to work correctly if crossing a column | 395 // Note that this isn't going to work correctly if crossing a column |
382 // boundary. The reference box should be determined per-fragment, and hence | 396 // boundary. The reference box should be determined per-fragment, and hence |
383 // this ought to be performed after fragmentation. | 397 // this ought to be performed after fragmentation. |
384 if (m_paintLayer.enclosingPaginationLayer()) | 398 if (m_paintLayer.enclosingPaginationLayer()) |
385 m_paintLayer.convertFromFlowThreadToVisualBoundingBoxInAncestor( | 399 m_paintLayer.convertFromFlowThreadToVisualBoundingBoxInAncestor( |
386 paintingInfo.rootLayer, referenceBox); | 400 paintingInfo.rootLayer, referenceBox); |
387 else | 401 else |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
423 if (shouldPaintContent || shouldPaintSelfOutline || | 437 if (shouldPaintContent || shouldPaintSelfOutline || |
424 isPaintingOverlayScrollbars) { | 438 isPaintingOverlayScrollbars) { |
425 // Collect the fragments. This will compute the clip rectangles and paint | 439 // Collect the fragments. This will compute the clip rectangles and paint |
426 // offsets for each layer fragment. | 440 // offsets for each layer fragment. |
427 ClipRectsCacheSlot cacheSlot = (paintFlags & PaintLayerUncachedClipRects) | 441 ClipRectsCacheSlot cacheSlot = (paintFlags & PaintLayerUncachedClipRects) |
428 ? UncachedClipRects | 442 ? UncachedClipRects |
429 : PaintingClipRects; | 443 : PaintingClipRects; |
430 // TODO(trchen): We haven't decided how to handle visual fragmentation with | 444 // TODO(trchen): We haven't decided how to handle visual fragmentation with |
431 // SPv2. Related thread | 445 // SPv2. Related thread |
432 // https://groups.google.com/a/chromium.org/forum/#!topic/graphics-dev/81XuW Ff-mxM | 446 // https://groups.google.com/a/chromium.org/forum/#!topic/graphics-dev/81XuW Ff-mxM |
447 LayoutPoint offsetToClipper; | |
448 PaintLayer* paintLayerForFragments = &m_paintLayer; | |
449 if (paintFlags & PaintLayerPaintingAncestorClippingMaskPhase) { | |
450 // Compute fragments and their clips with respect to the clipping | |
451 // container. The paint rect is in this layer's space, so convert it | |
452 // to the clipper's layer's space. The rootLayer is also changed to | |
453 // the clipper's layer to simplify coordinate system adjustments. | |
454 paintLayerForFragments = m_paintLayer.clippingContainer()->enclosingLayer( ); | |
455 localPaintingInfo.rootLayer = paintLayerForFragments; | |
456 m_paintLayer.convertToLayerCoords(localPaintingInfo.rootLayer, offsetToCli pper); | |
457 localPaintingInfo.paintDirtyRect.moveBy(offsetToClipper); | |
458 } | |
459 | |
433 if (fragmentPolicy == ForceSingleFragment || | 460 if (fragmentPolicy == ForceSingleFragment || |
434 RuntimeEnabledFeatures::slimmingPaintV2Enabled()) | 461 RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { |
435 m_paintLayer.appendSingleFragmentIgnoringPagination( | 462 paintLayerForFragments->appendSingleFragmentIgnoringPagination( |
436 layerFragments, localPaintingInfo.rootLayer, | 463 layerFragments, localPaintingInfo.rootLayer, |
437 localPaintingInfo.paintDirtyRect, cacheSlot, | 464 localPaintingInfo.paintDirtyRect, cacheSlot, |
438 IgnoreOverlayScrollbarSize, respectOverflowClip, &offsetFromRoot, | 465 IgnoreOverlayScrollbarSize, respectOverflowClip, |
439 localPaintingInfo.subPixelAccumulation); | 466 &offsetFromRoot, localPaintingInfo.subPixelAccumulation); |
440 else | 467 } else { |
441 m_paintLayer.collectFragments(layerFragments, localPaintingInfo.rootLayer, | 468 paintLayerForFragments->collectFragments( |
442 localPaintingInfo.paintDirtyRect, cacheSlot, | 469 layerFragments, localPaintingInfo.rootLayer, |
443 IgnoreOverlayScrollbarSize, | 470 localPaintingInfo.paintDirtyRect, cacheSlot, |
444 respectOverflowClip, &offsetFromRoot, | 471 IgnoreOverlayScrollbarSize, respectOverflowClip, |
445 localPaintingInfo.subPixelAccumulation); | 472 &offsetFromRoot, localPaintingInfo.subPixelAccumulation); |
473 } | |
474 | |
475 if (paintFlags & PaintLayerPaintingAncestorClippingMaskPhase) { | |
476 // Fragment offsets have been computed in the clipping container's | |
477 // layer's coordinate system, but for the rest of painting we need | |
478 // them in the layer coordinate. So move them and the foreground rect | |
479 // that is also in the clipper's space. | |
480 LayoutSize negativeOffset(-offsetToClipper.x(), -offsetToClipper.y()); | |
481 for (auto& fragment: layerFragments) { | |
482 fragment.foregroundRect.move(negativeOffset); | |
483 fragment.paginationOffset.move(negativeOffset); | |
484 } | |
485 } | |
446 | 486 |
447 if (shouldPaintContent) { | 487 if (shouldPaintContent) { |
448 // TODO(wangxianzhu): This is for old slow scrolling. Implement similar | 488 // TODO(wangxianzhu): This is for old slow scrolling. Implement similar |
449 // optimization for slimming paint v2. | 489 // optimization for slimming paint v2. |
450 shouldPaintContent = atLeastOneFragmentIntersectsDamageRect( | 490 shouldPaintContent = atLeastOneFragmentIntersectsDamageRect( |
451 layerFragments, localPaintingInfo, paintFlags, offsetFromRoot); | 491 layerFragments, localPaintingInfo, paintFlags, offsetFromRoot); |
452 if (!shouldPaintContent) | 492 if (!shouldPaintContent) |
453 result = MayBeClippedByPaintDirtyRect; | 493 result = MayBeClippedByPaintDirtyRect; |
454 } | 494 } |
455 } | 495 } |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
539 if (shouldPaintOverlayScrollbars) | 579 if (shouldPaintOverlayScrollbars) |
540 paintOverflowControlsForFragments(layerFragments, context, | 580 paintOverflowControlsForFragments(layerFragments, context, |
541 localPaintingInfo, paintFlags); | 581 localPaintingInfo, paintFlags); |
542 } // FilterPainter block | 582 } // FilterPainter block |
543 | 583 |
544 bool shouldPaintMask = | 584 bool shouldPaintMask = |
545 (paintFlags & PaintLayerPaintingCompositingMaskPhase) && | 585 (paintFlags & PaintLayerPaintingCompositingMaskPhase) && |
546 shouldPaintContent && m_paintLayer.layoutObject()->hasMask() && | 586 shouldPaintContent && m_paintLayer.layoutObject()->hasMask() && |
547 !selectionOnly; | 587 !selectionOnly; |
548 bool shouldPaintClippingMask = | 588 bool shouldPaintClippingMask = |
549 (paintFlags & PaintLayerPaintingChildClippingMaskPhase) && | 589 (paintFlags & (PaintLayerPaintingChildClippingMaskPhase | |
590 PaintLayerPaintingAncestorClippingMaskPhase)) && | |
550 shouldPaintContent && !selectionOnly; | 591 shouldPaintContent && !selectionOnly; |
551 | 592 |
552 if (shouldPaintMask) | 593 if (shouldPaintMask) |
553 paintMaskForFragments(layerFragments, context, localPaintingInfo, | 594 paintMaskForFragments(layerFragments, context, localPaintingInfo, |
554 paintFlags); | 595 paintFlags); |
555 if (shouldPaintClippingMask) { | 596 if (shouldPaintClippingMask) { |
556 // Paint the border radius mask for the fragments. | 597 // Paint the border radius mask for the fragments. |
557 paintChildClippingMaskForFragments(layerFragments, context, | 598 paintChildClippingMaskForFragments(layerFragments, context, |
558 localPaintingInfo, paintFlags); | 599 localPaintingInfo, paintFlags); |
559 } | 600 } |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
618 // its parent. | 659 // its parent. |
619 PaintLayer* parentLayer = m_paintLayer.parent(); | 660 PaintLayer* parentLayer = m_paintLayer.parent(); |
620 | 661 |
621 LayoutObject* object = m_paintLayer.layoutObject(); | 662 LayoutObject* object = m_paintLayer.layoutObject(); |
622 LayoutView* view = object->view(); | 663 LayoutView* view = object->view(); |
623 bool isFixedPosObjectInPagedMedia = | 664 bool isFixedPosObjectInPagedMedia = |
624 object->style()->position() == FixedPosition && | 665 object->style()->position() == FixedPosition && |
625 object->container() == view && view->pageLogicalHeight(); | 666 object->container() == view && view->pageLogicalHeight(); |
626 PaintLayer* paginationLayer = m_paintLayer.enclosingPaginationLayer(); | 667 PaintLayer* paginationLayer = m_paintLayer.enclosingPaginationLayer(); |
627 PaintLayerFragments fragments; | 668 PaintLayerFragments fragments; |
669 | |
628 // TODO(crbug.com/619094): Figure out the correct behaviour for fixed position | 670 // TODO(crbug.com/619094): Figure out the correct behaviour for fixed position |
629 // objects in paged media with vertical writing modes. | 671 // objects in paged media with vertical writing modes. |
630 if (isFixedPosObjectInPagedMedia && view->isHorizontalWritingMode()) { | 672 if (isFixedPosObjectInPagedMedia && view->isHorizontalWritingMode()) { |
631 // "For paged media, boxes with fixed positions are repeated on every page." | 673 // "For paged media, boxes with fixed positions are repeated on every page." |
632 // https://www.w3.org/TR/2011/REC-CSS2-20110607/visuren.html#fixed-positioni ng | 674 // https://www.w3.org/TR/2011/REC-CSS2-20110607/visuren.html#fixed-positioni ng |
633 unsigned pages = | 675 unsigned pages = |
634 ceilf(view->documentRect().height() / view->pageLogicalHeight()); | 676 ceilf(view->documentRect().height() / view->pageLogicalHeight()); |
635 LayoutPoint paginationOffset; | 677 LayoutPoint paginationOffset; |
636 | 678 |
637 // The fixed position object is offset from the top of the page, so remove | 679 // The fixed position object is offset from the top of the page, so remove |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
714 if (needsToClip(paintingInfo, clipRectForFragment)) { | 756 if (needsToClip(paintingInfo, clipRectForFragment)) { |
715 if (m_paintLayer.layoutObject()->isPositioned() && | 757 if (m_paintLayer.layoutObject()->isPositioned() && |
716 clipRectForFragment.isClippedByClipCss()) | 758 clipRectForFragment.isClippedByClipCss()) |
717 UseCounter::count(m_paintLayer.layoutObject()->document(), | 759 UseCounter::count(m_paintLayer.layoutObject()->document(), |
718 UseCounter::ClipCssOfPositionedElement); | 760 UseCounter::ClipCssOfPositionedElement); |
719 if (m_paintLayer.layoutObject()->isFixedPositioned()) | 761 if (m_paintLayer.layoutObject()->isFixedPositioned()) |
720 UseCounter::count(m_paintLayer.layoutObject()->document(), | 762 UseCounter::count(m_paintLayer.layoutObject()->document(), |
721 UseCounter::ClipCssOfFixedPositionElement); | 763 UseCounter::ClipCssOfFixedPositionElement); |
722 clipRecorder.emplace(context, *parentLayer->layoutObject(), | 764 clipRecorder.emplace(context, *parentLayer->layoutObject(), |
723 DisplayItem::kClipLayerParent, clipRectForFragment, | 765 DisplayItem::kClipLayerParent, clipRectForFragment, |
724 &paintingInfo, fragment.paginationOffset, | 766 paintingInfo.rootLayer, fragment.paginationOffset, |
725 paintFlags); | 767 paintFlags); |
726 } | 768 } |
727 } | 769 } |
728 if (paintFragmentByApplyingTransform(context, paintingInfo, paintFlags, | 770 if (paintFragmentByApplyingTransform(context, paintingInfo, paintFlags, |
729 fragment.paginationOffset) == | 771 fragment.paginationOffset) == |
730 MayBeClippedByPaintDirtyRect) | 772 MayBeClippedByPaintDirtyRect) |
731 result = MayBeClippedByPaintDirtyRect; | 773 result = MayBeClippedByPaintDirtyRect; |
732 } | 774 } |
733 return result; | 775 return result; |
734 } | 776 } |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
852 | 894 |
853 for (auto& fragment : layerFragments) { | 895 for (auto& fragment : layerFragments) { |
854 // We need to apply the same clips and transforms that | 896 // We need to apply the same clips and transforms that |
855 // paintFragmentWithPhase would have. | 897 // paintFragmentWithPhase would have. |
856 LayoutRect cullRect = fragment.backgroundRect.rect(); | 898 LayoutRect cullRect = fragment.backgroundRect.rect(); |
857 | 899 |
858 Optional<LayerClipRecorder> clipRecorder; | 900 Optional<LayerClipRecorder> clipRecorder; |
859 if (needsToClip(localPaintingInfo, fragment.backgroundRect)) { | 901 if (needsToClip(localPaintingInfo, fragment.backgroundRect)) { |
860 clipRecorder.emplace(context, *m_paintLayer.layoutObject(), | 902 clipRecorder.emplace(context, *m_paintLayer.layoutObject(), |
861 DisplayItem::kClipLayerOverflowControls, | 903 DisplayItem::kClipLayerOverflowControls, |
862 fragment.backgroundRect, &localPaintingInfo, | 904 fragment.backgroundRect, |
905 localPaintingInfo.rootLayer, | |
863 fragment.paginationOffset, paintFlags); | 906 fragment.paginationOffset, paintFlags); |
864 } | 907 } |
865 | 908 |
866 Optional<ScrollRecorder> scrollRecorder; | 909 Optional<ScrollRecorder> scrollRecorder; |
867 if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled() && | 910 if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled() && |
868 !localPaintingInfo.scrollOffsetAccumulation.isZero()) { | 911 !localPaintingInfo.scrollOffsetAccumulation.isZero()) { |
869 cullRect.move(localPaintingInfo.scrollOffsetAccumulation); | 912 cullRect.move(localPaintingInfo.scrollOffsetAccumulation); |
870 scrollRecorder.emplace(context, *m_paintLayer.layoutObject(), | 913 scrollRecorder.emplace(context, *m_paintLayer.layoutObject(), |
871 DisplayItem::kScrollOverflowControls, | 914 DisplayItem::kScrollOverflowControls, |
872 localPaintingInfo.scrollOffsetAccumulation); | 915 localPaintingInfo.scrollOffsetAccumulation); |
(...skipping 30 matching lines...) Expand all Loading... | |
903 case PaintPhaseSelfOutlineOnly: | 946 case PaintPhaseSelfOutlineOnly: |
904 case PaintPhaseMask: // Mask painting will handle clipping to self. | 947 case PaintPhaseMask: // Mask painting will handle clipping to self. |
905 clippingRule = LayerClipRecorder::DoNotIncludeSelfForBorderRadius; | 948 clippingRule = LayerClipRecorder::DoNotIncludeSelfForBorderRadius; |
906 break; | 949 break; |
907 default: | 950 default: |
908 clippingRule = LayerClipRecorder::IncludeSelfForBorderRadius; | 951 clippingRule = LayerClipRecorder::IncludeSelfForBorderRadius; |
909 break; | 952 break; |
910 } | 953 } |
911 | 954 |
912 clipRecorder.emplace(context, *m_paintLayer.layoutObject(), clipType, | 955 clipRecorder.emplace(context, *m_paintLayer.layoutObject(), clipType, |
913 clipRect, &paintingInfo, fragment.paginationOffset, | 956 clipRect, paintingInfo.rootLayer, |
914 paintFlags, clippingRule); | 957 fragment.paginationOffset, paintFlags, clippingRule); |
915 } | 958 } |
916 | 959 |
917 LayoutRect newCullRect(clipRect.rect()); | 960 LayoutRect newCullRect(clipRect.rect()); |
918 Optional<ScrollRecorder> scrollRecorder; | 961 Optional<ScrollRecorder> scrollRecorder; |
919 LayoutPoint paintOffset = -m_paintLayer.layoutBoxLocation(); | 962 LayoutPoint paintOffset = -m_paintLayer.layoutBoxLocation(); |
920 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { | 963 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { |
921 const auto* objectPaintProperties = | 964 const auto* objectPaintProperties = |
922 m_paintLayer.layoutObject()->paintProperties(); | 965 m_paintLayer.layoutObject()->paintProperties(); |
923 DCHECK(objectPaintProperties && | 966 DCHECK(objectPaintProperties && |
924 objectPaintProperties->localBorderBoxProperties()); | 967 objectPaintProperties->localBorderBoxProperties()); |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
976 // Optimize clipping for the single fragment case. | 1019 // Optimize clipping for the single fragment case. |
977 bool shouldClip = localPaintingInfo.clipToDirtyRect && | 1020 bool shouldClip = localPaintingInfo.clipToDirtyRect && |
978 layerFragments.size() == 1 && | 1021 layerFragments.size() == 1 && |
979 !layerFragments[0].foregroundRect.isEmpty(); | 1022 !layerFragments[0].foregroundRect.isEmpty(); |
980 ClipState clipState = HasNotClipped; | 1023 ClipState clipState = HasNotClipped; |
981 Optional<LayerClipRecorder> clipRecorder; | 1024 Optional<LayerClipRecorder> clipRecorder; |
982 if (shouldClip && | 1025 if (shouldClip && |
983 needsToClip(localPaintingInfo, layerFragments[0].foregroundRect)) { | 1026 needsToClip(localPaintingInfo, layerFragments[0].foregroundRect)) { |
984 clipRecorder.emplace(context, *m_paintLayer.layoutObject(), | 1027 clipRecorder.emplace(context, *m_paintLayer.layoutObject(), |
985 DisplayItem::kClipLayerForeground, | 1028 DisplayItem::kClipLayerForeground, |
986 layerFragments[0].foregroundRect, &localPaintingInfo, | 1029 layerFragments[0].foregroundRect, |
1030 localPaintingInfo.rootLayer, | |
987 layerFragments[0].paginationOffset, paintFlags); | 1031 layerFragments[0].paginationOffset, paintFlags); |
988 clipState = HasClipped; | 1032 clipState = HasClipped; |
989 } | 1033 } |
990 | 1034 |
991 // We have to loop through every fragment multiple times, since we have to | 1035 // We have to loop through every fragment multiple times, since we have to |
992 // issue paint invalidations in each specific phase in order for interleaving | 1036 // issue paint invalidations in each specific phase in order for interleaving |
993 // of the fragments to work properly. | 1037 // of the fragments to work properly. |
994 if (selectionOnly) { | 1038 if (selectionOnly) { |
995 paintForegroundForFragmentsWithPhase(PaintPhaseSelection, layerFragments, | 1039 paintForegroundForFragmentsWithPhase(PaintPhaseSelection, layerFragments, |
996 context, localPaintingInfo, paintFlags, | 1040 context, localPaintingInfo, paintFlags, |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1123 | 1167 |
1124 PaintLayerPaintingInfo paintingInfo(&m_paintLayer, | 1168 PaintLayerPaintingInfo paintingInfo(&m_paintLayer, |
1125 LayoutRect(enclosingIntRect(damageRect)), | 1169 LayoutRect(enclosingIntRect(damageRect)), |
1126 paintFlags, LayoutSize()); | 1170 paintFlags, LayoutSize()); |
1127 paintLayer(context, paintingInfo, PaintLayerPaintingOverlayScrollbars); | 1171 paintLayer(context, paintingInfo, PaintLayerPaintingOverlayScrollbars); |
1128 | 1172 |
1129 m_paintLayer.setContainsDirtyOverlayScrollbars(false); | 1173 m_paintLayer.setContainsDirtyOverlayScrollbars(false); |
1130 } | 1174 } |
1131 | 1175 |
1132 } // namespace blink | 1176 } // namespace blink |
OLD | NEW |