Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(163)

Side by Side Diff: third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp

Issue 2238883006: SPv2: Use GeometryMapper to implement PaintLayerClipper. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: none Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/LayoutInline.h" 8 #include "core/layout/LayoutInline.h"
9 #include "core/layout/LayoutView.h" 9 #include "core/layout/LayoutView.h"
10 #include "core/paint/ClipPathClipper.h" 10 #include "core/paint/ClipPathClipper.h"
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 return FullyPainted; 96 return FullyPainted;
97 97
98 // If this layer is totally invisible then there is nothing to paint. 98 // If this layer is totally invisible then there is nothing to paint.
99 if (!m_paintLayer.layoutObject()->opacity() && 99 if (!m_paintLayer.layoutObject()->opacity() &&
100 !m_paintLayer.layoutObject()->hasBackdropFilter()) 100 !m_paintLayer.layoutObject()->hasBackdropFilter())
101 return FullyPainted; 101 return FullyPainted;
102 102
103 if (m_paintLayer.paintsWithTransparency(paintingInfo.getGlobalPaintFlags())) 103 if (m_paintLayer.paintsWithTransparency(paintingInfo.getGlobalPaintFlags()))
104 paintFlags |= PaintLayerHaveTransparency; 104 paintFlags |= PaintLayerHaveTransparency;
105 105
106 // Transforms will be applied by property nodes directly for SPv2. 106 if (m_paintLayer.paintsWithTransform(paintingInfo.getGlobalPaintFlags()) &&
chrishtr 2016/10/05 23:28:32 Need to call paintLayerWithTransform even for SPv2
107 if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled() &&
108 m_paintLayer.paintsWithTransform(paintingInfo.getGlobalPaintFlags()) &&
109 !(paintFlags & PaintLayerAppliedTransform)) 107 !(paintFlags & PaintLayerAppliedTransform))
110 return paintLayerWithTransform(context, paintingInfo, paintFlags); 108 return paintLayerWithTransform(context, paintingInfo, paintFlags);
111 109
112 return paintLayerContentsCompositingAllPhases(context, paintingInfo, 110 return paintLayerContentsCompositingAllPhases(context, paintingInfo,
113 paintFlags); 111 paintFlags);
114 } 112 }
115 113
116 PaintLayerPainter::PaintResult 114 PaintLayerPainter::PaintResult
117 PaintLayerPainter::paintLayerContentsCompositingAllPhases( 115 PaintLayerPainter::paintLayerContentsCompositingAllPhases(
118 GraphicsContext& context, 116 GraphicsContext& context,
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 185
188 // Repaint subsequence if the layer is marked for needing repaint. 186 // Repaint subsequence if the layer is marked for needing repaint.
189 // We don't set needsResetEmptyPaintPhase here, but clear the empty paint 187 // We don't set needsResetEmptyPaintPhase here, but clear the empty paint
190 // phase flags in PaintLayer::setNeedsPaintPhaseXXX(), to ensure that we won't 188 // phase flags in PaintLayer::setNeedsPaintPhaseXXX(), to ensure that we won't
191 // clear previousPaintPhaseXXXEmpty flags when unrelated things changed which 189 // clear previousPaintPhaseXXXEmpty flags when unrelated things changed which
192 // won't cause the paint phases to become non-empty. 190 // won't cause the paint phases to become non-empty.
193 if (paintLayer.needsRepaint()) 191 if (paintLayer.needsRepaint())
194 needsRepaint = true; 192 needsRepaint = true;
195 193
196 // Repaint if layer's clip changes. 194 // Repaint if layer's clip changes.
197 ClipRects& clipRects = paintLayer.clipper().paintingClipRects( 195 // TODO(chrishtr): implement detecting clipping changes in SPv2. crbug.com/645 667
198 paintingInfo.rootLayer, respectOverflowClip, subpixelAccumulation); 196 if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled()) {
199 ClipRects* previousClipRects = paintLayer.previousPaintingClipRects(); 197 ClipRects& clipRects = paintLayer.clipper().paintingClipRects(
200 if (&clipRects != previousClipRects && 198 paintingInfo.rootLayer, respectOverflowClip, subpixelAccumulation);
201 (!previousClipRects || clipRects != *previousClipRects)) { 199 ClipRects* previousClipRects = paintLayer.previousPaintingClipRects();
202 needsRepaint = true; 200 if (&clipRects != previousClipRects &&
203 shouldClearEmptyPaintPhaseFlags = true; 201 (!previousClipRects || clipRects != *previousClipRects)) {
202 needsRepaint = true;
203 shouldClearEmptyPaintPhaseFlags = true;
204 }
205 paintLayer.setPreviousPaintingClipRects(clipRects);
204 } 206 }
205 paintLayer.setPreviousPaintingClipRects(clipRects);
206 207
207 // Repaint if previously the layer might be clipped by paintDirtyRect and 208 // Repaint if previously the layer might be clipped by paintDirtyRect and
208 // paintDirtyRect changes. 209 // paintDirtyRect changes.
209 if (paintLayer.previousPaintResult() == 210 if (paintLayer.previousPaintResult() ==
210 PaintLayerPainter::MayBeClippedByPaintDirtyRect && 211 PaintLayerPainter::MayBeClippedByPaintDirtyRect &&
211 paintLayer.previousPaintDirtyRect() != paintingInfo.paintDirtyRect) { 212 paintLayer.previousPaintDirtyRect() != paintingInfo.paintDirtyRect) {
212 needsRepaint = true; 213 needsRepaint = true;
213 shouldClearEmptyPaintPhaseFlags = true; 214 shouldClearEmptyPaintPhaseFlags = true;
214 } 215 }
215 paintLayer.setPreviousPaintDirtyRect(paintingInfo.paintDirtyRect); 216 paintLayer.setPreviousPaintDirtyRect(paintingInfo.paintDirtyRect);
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
389 localPaintingInfo.paintDirtyRect, cacheSlot, 390 localPaintingInfo.paintDirtyRect, cacheSlot,
390 IgnoreOverlayScrollbarSize, respectOverflowClip, &offsetFromRoot, 391 IgnoreOverlayScrollbarSize, respectOverflowClip, &offsetFromRoot,
391 localPaintingInfo.subPixelAccumulation); 392 localPaintingInfo.subPixelAccumulation);
392 else 393 else
393 m_paintLayer.collectFragments(layerFragments, localPaintingInfo.rootLayer, 394 m_paintLayer.collectFragments(layerFragments, localPaintingInfo.rootLayer,
394 localPaintingInfo.paintDirtyRect, cacheSlot, 395 localPaintingInfo.paintDirtyRect, cacheSlot,
395 IgnoreOverlayScrollbarSize, 396 IgnoreOverlayScrollbarSize,
396 respectOverflowClip, &offsetFromRoot, 397 respectOverflowClip, &offsetFromRoot,
397 localPaintingInfo.subPixelAccumulation); 398 localPaintingInfo.subPixelAccumulation);
398 399
399 // TODO(trchen): Needs to adjust cull rect between transform spaces.
400 // https://crbug.com/593596
401 // Disables layer culling for SPv2 for now because the space of the cull
402 // rect doesn't match the space we paint in. Clipping will still be done by
403 // clip nodes, so this won't cause rendering issues, only performance.
404 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) {
405 layerFragments[0].backgroundRect =
406 LayoutRect(LayoutRect::infiniteIntRect());
407 layerFragments[0].foregroundRect =
408 LayoutRect(LayoutRect::infiniteIntRect());
409 }
410
411 if (shouldPaintContent) { 400 if (shouldPaintContent) {
412 // TODO(wangxianzhu): This is for old slow scrolling. Implement similar 401 // TODO(wangxianzhu): This is for old slow scrolling. Implement similar
413 // optimization for slimming paint v2. 402 // optimization for slimming paint v2.
414 shouldPaintContent = atLeastOneFragmentIntersectsDamageRect( 403 shouldPaintContent = atLeastOneFragmentIntersectsDamageRect(
415 layerFragments, localPaintingInfo, paintFlags, offsetFromRoot); 404 layerFragments, localPaintingInfo, paintFlags, offsetFromRoot);
416 if (!shouldPaintContent) 405 if (!shouldPaintContent)
417 result = MayBeClippedByPaintDirtyRect; 406 result = MayBeClippedByPaintDirtyRect;
418 } 407 }
419 } 408 }
420 409
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
557 newOffsetFromRoot)) 546 newOffsetFromRoot))
558 return true; 547 return true;
559 } 548 }
560 return false; 549 return false;
561 } 550 }
562 551
563 PaintLayerPainter::PaintResult PaintLayerPainter::paintLayerWithTransform( 552 PaintLayerPainter::PaintResult PaintLayerPainter::paintLayerWithTransform(
564 GraphicsContext& context, 553 GraphicsContext& context,
565 const PaintLayerPaintingInfo& paintingInfo, 554 const PaintLayerPaintingInfo& paintingInfo,
566 PaintLayerFlags paintFlags) { 555 PaintLayerFlags paintFlags) {
567 // Transforms will be applied by property nodes directly for SPv2.
568 ASSERT(!RuntimeEnabledFeatures::slimmingPaintV2Enabled());
569
570 TransformationMatrix layerTransform = 556 TransformationMatrix layerTransform =
571 m_paintLayer.renderableTransform(paintingInfo.getGlobalPaintFlags()); 557 m_paintLayer.renderableTransform(paintingInfo.getGlobalPaintFlags());
572 // If the transform can't be inverted, then don't paint anything. 558 // If the transform can't be inverted, then don't paint anything.
573 if (!layerTransform.isInvertible()) 559 if (!layerTransform.isInvertible())
574 return FullyPainted; 560 return FullyPainted;
575 561
576 // FIXME: We should make sure that we don't walk past paintingInfo.rootLayer 562 // FIXME: We should make sure that we don't walk past paintingInfo.rootLayer
577 // here. m_paintLayer may be the "root", and then we should avoid looking at 563 // here. m_paintLayer may be the "root", and then we should avoid looking at
578 // its parent. 564 // its parent.
579 PaintLayer* parentLayer = m_paintLayer.parent(); 565 PaintLayer* parentLayer = m_paintLayer.parent();
580 566
581 ClipRect ancestorBackgroundClipRect;
582 if (parentLayer) {
583 // Calculate the clip rectangle that the ancestors establish.
584 ClipRectsContext clipRectsContext(paintingInfo.rootLayer,
585 (paintFlags & PaintLayerUncachedClipRects)
586 ? UncachedClipRects
587 : PaintingClipRects,
588 IgnoreOverlayScrollbarSize);
589 if (shouldRespectOverflowClip(paintFlags, m_paintLayer.layoutObject()) ==
590 IgnoreOverflowClip)
591 clipRectsContext.setIgnoreOverflowClip();
592 ancestorBackgroundClipRect =
593 m_paintLayer.clipper().backgroundClipRect(clipRectsContext);
594 }
595
596 LayoutObject* object = m_paintLayer.layoutObject(); 567 LayoutObject* object = m_paintLayer.layoutObject();
597 LayoutView* view = object->view(); 568 LayoutView* view = object->view();
598 bool isFixedPosObjectInPagedMedia = 569 bool isFixedPosObjectInPagedMedia =
599 object->style()->position() == FixedPosition && 570 object->style()->position() == FixedPosition &&
600 object->container() == view && view->pageLogicalHeight(); 571 object->container() == view && view->pageLogicalHeight();
601 PaintLayer* paginationLayer = m_paintLayer.enclosingPaginationLayer(); 572 PaintLayer* paginationLayer = m_paintLayer.enclosingPaginationLayer();
602 PaintLayerFragments fragments; 573 PaintLayerFragments fragments;
603 // TODO(crbug.com/619094): Figure out the correct behaviour for fixed position 574 // TODO(crbug.com/619094): Figure out the correct behaviour for fixed position
604 // objects in paged media with vertical writing modes. 575 // objects in paged media with vertical writing modes.
605 if (isFixedPosObjectInPagedMedia && view->isHorizontalWritingMode()) { 576 if (isFixedPosObjectInPagedMedia && view->isHorizontalWritingMode()) {
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
643 // path, when the transform has been applied. 614 // path, when the transform has been applied.
644 PaintLayerFragment fragment; 615 PaintLayerFragment fragment;
645 fragment.backgroundRect = paintingInfo.paintDirtyRect; 616 fragment.backgroundRect = paintingInfo.paintDirtyRect;
646 fragments.append(fragment); 617 fragments.append(fragment);
647 } 618 }
648 619
649 Optional<DisplayItemCacheSkipper> cacheSkipper; 620 Optional<DisplayItemCacheSkipper> cacheSkipper;
650 if (fragments.size() > 1) 621 if (fragments.size() > 1)
651 cacheSkipper.emplace(context); 622 cacheSkipper.emplace(context);
652 623
624 ClipRect ancestorBackgroundClipRect;
625 if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled()) {
626 if (parentLayer) {
627 // Calculate the clip rectangle that the ancestors establish.
628 ClipRectsContext clipRectsContext(
629 paintingInfo.rootLayer,
630 (paintFlags & PaintLayerUncachedClipRects) ? UncachedClipRects
631 : PaintingClipRects,
632 IgnoreOverlayScrollbarSize);
633 if (shouldRespectOverflowClip(paintFlags, m_paintLayer.layoutObject()) ==
634 IgnoreOverflowClip)
635 clipRectsContext.setIgnoreOverflowClip();
636 ancestorBackgroundClipRect =
637 m_paintLayer.clipper().backgroundClipRect(clipRectsContext);
638 }
639 }
640
653 PaintResult result = FullyPainted; 641 PaintResult result = FullyPainted;
654 for (const auto& fragment : fragments) { 642 for (const auto& fragment : fragments) {
655 Optional<LayerClipRecorder> clipRecorder; 643 Optional<LayerClipRecorder> clipRecorder;
656 if (parentLayer) { 644 if (parentLayer && !RuntimeEnabledFeatures::slimmingPaintV2Enabled()) {
657 ClipRect clipRectForFragment(ancestorBackgroundClipRect); 645 ClipRect clipRectForFragment(ancestorBackgroundClipRect);
658 // A fixed-position object is repeated on every page, but if it is clipped 646 // A fixed-position object is repeated on every page, but if it is clipped
659 // by an ancestor layer then the repetitions are clipped out. 647 // by an ancestor layer then the repetitions are clipped out.
660 if (!isFixedPosObjectInPagedMedia) 648 if (!isFixedPosObjectInPagedMedia)
661 clipRectForFragment.moveBy(fragment.paginationOffset); 649 clipRectForFragment.moveBy(fragment.paginationOffset);
662 clipRectForFragment.intersect(fragment.backgroundRect); 650 clipRectForFragment.intersect(fragment.backgroundRect);
663 if (clipRectForFragment.isEmpty()) 651 if (clipRectForFragment.isEmpty())
664 continue; 652 continue;
665 if (needsToClip(paintingInfo, clipRectForFragment)) { 653 if (needsToClip(paintingInfo, clipRectForFragment)) {
666 if (m_paintLayer.layoutObject()->isPositioned() && 654 if (m_paintLayer.layoutObject()->isPositioned() &&
(...skipping 16 matching lines...) Expand all
683 } 671 }
684 return result; 672 return result;
685 } 673 }
686 674
687 PaintLayerPainter::PaintResult 675 PaintLayerPainter::PaintResult
688 PaintLayerPainter::paintFragmentByApplyingTransform( 676 PaintLayerPainter::paintFragmentByApplyingTransform(
689 GraphicsContext& context, 677 GraphicsContext& context,
690 const PaintLayerPaintingInfo& paintingInfo, 678 const PaintLayerPaintingInfo& paintingInfo,
691 PaintLayerFlags paintFlags, 679 PaintLayerFlags paintFlags,
692 const LayoutPoint& fragmentTranslation) { 680 const LayoutPoint& fragmentTranslation) {
693 // Transforms will be applied by property nodes directly for SPv2.
694 ASSERT(!RuntimeEnabledFeatures::slimmingPaintV2Enabled());
695
696 // This involves subtracting out the position of the layer in our current 681 // This involves subtracting out the position of the layer in our current
697 // coordinate space, but preserving the accumulated error for sub-pixel 682 // coordinate space, but preserving the accumulated error for sub-pixel
698 // layout. 683 // layout.
699 LayoutPoint delta; 684 LayoutPoint delta;
700 m_paintLayer.convertToLayerCoords(paintingInfo.rootLayer, delta); 685 m_paintLayer.convertToLayerCoords(paintingInfo.rootLayer, delta);
701 delta.moveBy(fragmentTranslation); 686 delta.moveBy(fragmentTranslation);
702 TransformationMatrix transform( 687 TransformationMatrix transform(
703 m_paintLayer.renderableTransform(paintingInfo.getGlobalPaintFlags())); 688 m_paintLayer.renderableTransform(paintingInfo.getGlobalPaintFlags()));
704 IntPoint roundedDelta = roundedIntPoint(delta); 689 IntPoint roundedDelta = roundedIntPoint(delta);
705 transform.translateRight(roundedDelta.x(), roundedDelta.y()); 690 transform.translateRight(roundedDelta.x(), roundedDelta.y());
706 LayoutSize adjustedSubPixelAccumulation = 691 LayoutSize adjustedSubPixelAccumulation =
707 paintingInfo.subPixelAccumulation + (delta - roundedDelta); 692 paintingInfo.subPixelAccumulation + (delta - roundedDelta);
708 693
709 // TODO(jbroman): Put the real transform origin here, instead of using a 694 // TODO(jbroman): Put the real transform origin here, instead of using a
710 // matrix with the origin baked in. 695 // matrix with the origin baked in.
711 FloatPoint3D transformOrigin; 696 FloatPoint3D transformOrigin;
712 Transform3DRecorder transform3DRecorder( 697 Transform3DRecorder transform3DRecorder(
713 context, *m_paintLayer.layoutObject(), 698 context, *m_paintLayer.layoutObject(),
714 DisplayItem::kTransform3DElementTransform, transform, transformOrigin); 699 DisplayItem::kTransform3DElementTransform, transform, transformOrigin);
715
716 // Now do a paint with the root layer shifted to be us. 700 // Now do a paint with the root layer shifted to be us.
717 PaintLayerPaintingInfo transformedPaintingInfo( 701 PaintLayerPaintingInfo transformedPaintingInfo(
718 &m_paintLayer, LayoutRect(enclosingIntRect(transform.inverse().mapRect( 702 &m_paintLayer, LayoutRect(enclosingIntRect(transform.inverse().mapRect(
719 paintingInfo.paintDirtyRect))), 703 paintingInfo.paintDirtyRect))),
720 paintingInfo.getGlobalPaintFlags(), adjustedSubPixelAccumulation); 704 paintingInfo.getGlobalPaintFlags(), adjustedSubPixelAccumulation);
721 transformedPaintingInfo.ancestorHasClipPathClipping = 705 transformedPaintingInfo.ancestorHasClipPathClipping =
722 paintingInfo.ancestorHasClipPathClipping; 706 paintingInfo.ancestorHasClipPathClipping;
723 707
724 // Remove skip root background flag when we're painting with a new root. 708 // Remove skip root background flag when we're painting with a new root.
725 if (&m_paintLayer != paintingInfo.rootLayer) 709 if (&m_paintLayer != paintingInfo.rootLayer)
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
804 Optional<DisplayItemCacheSkipper> cacheSkipper; 788 Optional<DisplayItemCacheSkipper> cacheSkipper;
805 if (layerFragments.size() > 1) 789 if (layerFragments.size() > 1)
806 cacheSkipper.emplace(context); 790 cacheSkipper.emplace(context);
807 791
808 for (auto& fragment : layerFragments) { 792 for (auto& fragment : layerFragments) {
809 // We need to apply the same clips and transforms that 793 // We need to apply the same clips and transforms that
810 // paintFragmentWithPhase would have. 794 // paintFragmentWithPhase would have.
811 LayoutRect cullRect = fragment.backgroundRect.rect(); 795 LayoutRect cullRect = fragment.backgroundRect.rect();
812 796
813 Optional<LayerClipRecorder> clipRecorder; 797 Optional<LayerClipRecorder> clipRecorder;
814 if (needsToClip(localPaintingInfo, fragment.backgroundRect)) 798 if (needsToClip(localPaintingInfo, fragment.backgroundRect)) {
815 clipRecorder.emplace(context, *m_paintLayer.layoutObject(), 799 clipRecorder.emplace(context, *m_paintLayer.layoutObject(),
816 DisplayItem::kClipLayerOverflowControls, 800 DisplayItem::kClipLayerOverflowControls,
817 fragment.backgroundRect, &localPaintingInfo, 801 fragment.backgroundRect, &localPaintingInfo,
818 fragment.paginationOffset, paintFlags); 802 fragment.paginationOffset, paintFlags);
803 }
819 804
820 Optional<ScrollRecorder> scrollRecorder; 805 Optional<ScrollRecorder> scrollRecorder;
821 if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled() && 806 if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled() &&
822 !localPaintingInfo.scrollOffsetAccumulation.isZero()) { 807 !localPaintingInfo.scrollOffsetAccumulation.isZero()) {
823 cullRect.move(localPaintingInfo.scrollOffsetAccumulation); 808 cullRect.move(localPaintingInfo.scrollOffsetAccumulation);
824 scrollRecorder.emplace(context, *m_paintLayer.layoutObject(), 809 scrollRecorder.emplace(context, *m_paintLayer.layoutObject(),
825 DisplayItem::kScrollOverflowControls, 810 DisplayItem::kScrollOverflowControls,
826 localPaintingInfo.scrollOffsetAccumulation); 811 localPaintingInfo.scrollOffsetAccumulation);
827 } 812 }
828 813
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
871 LayoutRect newCullRect(clipRect.rect()); 856 LayoutRect newCullRect(clipRect.rect());
872 Optional<ScrollRecorder> scrollRecorder; 857 Optional<ScrollRecorder> scrollRecorder;
873 LayoutPoint paintOffset = -m_paintLayer.layoutBoxLocation(); 858 LayoutPoint paintOffset = -m_paintLayer.layoutBoxLocation();
874 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { 859 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) {
875 const ObjectPaintProperties* objectPaintProperties = 860 const ObjectPaintProperties* objectPaintProperties =
876 m_paintLayer.layoutObject()->objectPaintProperties(); 861 m_paintLayer.layoutObject()->objectPaintProperties();
877 ASSERT(objectPaintProperties && 862 ASSERT(objectPaintProperties &&
878 objectPaintProperties->localBorderBoxProperties()); 863 objectPaintProperties->localBorderBoxProperties());
879 paintOffset += 864 paintOffset +=
880 toSize(objectPaintProperties->localBorderBoxProperties()->paintOffset); 865 toSize(objectPaintProperties->localBorderBoxProperties()->paintOffset);
866 newCullRect.move(paintingInfo.scrollOffsetAccumulation);
881 } else { 867 } else {
882 paintOffset += toSize(fragment.layerBounds.location()); 868 paintOffset += toSize(fragment.layerBounds.location());
883 if (!paintingInfo.scrollOffsetAccumulation.isZero()) { 869 if (!paintingInfo.scrollOffsetAccumulation.isZero()) {
884 // As a descendant of the root layer, m_paintLayer's painting is not 870 // As a descendant of the root layer, m_paintLayer's painting is not
885 // controlled by the ScrollRecorders created by BlockPainter of the 871 // controlled by the ScrollRecorders created by BlockPainter of the
886 // ancestor layers up to the root layer, so we need to issue 872 // ancestor layers up to the root layer, so we need to issue
887 // ScrollRecorder for this layer seperately, with the scroll offset 873 // ScrollRecorder for this layer seperately, with the scroll offset
888 // accumulated from the root layer to the parent of this layer, to get the 874 // accumulated from the root layer to the parent of this layer, to get the
889 // same result as ScrollRecorder in BlockPainter. 875 // same result as ScrollRecorder in BlockPainter.
890 paintOffset += paintingInfo.scrollOffsetAccumulation; 876 paintOffset += paintingInfo.scrollOffsetAccumulation;
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
1076 1062
1077 PaintLayerPaintingInfo paintingInfo(&m_paintLayer, 1063 PaintLayerPaintingInfo paintingInfo(&m_paintLayer,
1078 LayoutRect(enclosingIntRect(damageRect)), 1064 LayoutRect(enclosingIntRect(damageRect)),
1079 paintFlags, LayoutSize()); 1065 paintFlags, LayoutSize());
1080 paintLayer(context, paintingInfo, PaintLayerPaintingOverlayScrollbars); 1066 paintLayer(context, paintingInfo, PaintLayerPaintingOverlayScrollbars);
1081 1067
1082 m_paintLayer.setContainsDirtyOverlayScrollbars(false); 1068 m_paintLayer.setContainsDirtyOverlayScrollbars(false);
1083 } 1069 }
1084 1070
1085 } // namespace blink 1071 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/paint/PaintLayerClipper.cpp ('k') | third_party/WebKit/Source/core/testing/Internals.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698