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

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

Issue 1899063002: Mark layer needsPaintPhaseFloat if a LayoutBlockFlow contains float (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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/FrameView.h" 7 #include "core/frame/FrameView.h"
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 709 matching lines...) Expand 10 before | Expand all | Expand 10 after
720 clipState = HasClipped; 720 clipState = HasClipped;
721 } 721 }
722 722
723 // We have to loop through every fragment multiple times, since we have to i ssue paint invalidations in each specific phase in order for 723 // We have to loop through every fragment multiple times, since we have to i ssue paint invalidations in each specific phase in order for
724 // interleaving of the fragments to work properly. 724 // interleaving of the fragments to work properly.
725 if (selectionOnly) { 725 if (selectionOnly) {
726 paintForegroundForFragmentsWithPhase(PaintPhaseSelection, layerFragments , context, localPaintingInfo, paintFlags, clipState); 726 paintForegroundForFragmentsWithPhase(PaintPhaseSelection, layerFragments , context, localPaintingInfo, paintFlags, clipState);
727 } else { 727 } else {
728 if (m_paintLayer.needsPaintPhaseDescendantBlockBackgrounds()) 728 if (m_paintLayer.needsPaintPhaseDescendantBlockBackgrounds())
729 paintForegroundForFragmentsWithPhase(PaintPhaseDescendantBlockBackgr oundsOnly, layerFragments, context, localPaintingInfo, paintFlags, clipState); 729 paintForegroundForFragmentsWithPhase(PaintPhaseDescendantBlockBackgr oundsOnly, layerFragments, context, localPaintingInfo, paintFlags, clipState);
730 // TODO(wangxianzhu): Enable float empty-phase optimization after fixing crbug.com/603910. 730 if (m_paintLayer.needsPaintPhaseFloat())
731 // if (m_paintLayer.needsPaintPhaseFloat()) 731 paintForegroundForFragmentsWithPhase(PaintPhaseFloat, layerFragments , context, localPaintingInfo, paintFlags, clipState);
732 paintForegroundForFragmentsWithPhase(PaintPhaseFloat, layerFragments, co ntext, localPaintingInfo, paintFlags, clipState);
733 paintForegroundForFragmentsWithPhase(PaintPhaseForeground, layerFragment s, context, localPaintingInfo, paintFlags, clipState); 732 paintForegroundForFragmentsWithPhase(PaintPhaseForeground, layerFragment s, context, localPaintingInfo, paintFlags, clipState);
734 if (m_paintLayer.needsPaintPhaseDescendantOutlines()) 733 if (m_paintLayer.needsPaintPhaseDescendantOutlines())
735 paintForegroundForFragmentsWithPhase(PaintPhaseDescendantOutlinesOnl y, layerFragments, context, localPaintingInfo, paintFlags, clipState); 734 paintForegroundForFragmentsWithPhase(PaintPhaseDescendantOutlinesOnl y, layerFragments, context, localPaintingInfo, paintFlags, clipState);
736 } 735 }
737 } 736 }
738 737
739 void PaintLayerPainter::paintForegroundForFragmentsWithPhase(PaintPhase phase, 738 void PaintLayerPainter::paintForegroundForFragmentsWithPhase(PaintPhase phase,
740 const PaintLayerFragments& layerFragments, GraphicsContext& context, 739 const PaintLayerFragments& layerFragments, GraphicsContext& context,
741 const PaintLayerPaintingInfo& localPaintingInfo, PaintLayerFlags paintFlags, ClipState clipState) 740 const PaintLayerPaintingInfo& localPaintingInfo, PaintLayerFlags paintFlags, ClipState clipState)
742 { 741 {
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
794 if (!m_paintLayer.containsDirtyOverlayScrollbars()) 793 if (!m_paintLayer.containsDirtyOverlayScrollbars())
795 return; 794 return;
796 795
797 PaintLayerPaintingInfo paintingInfo(&m_paintLayer, LayoutRect(enclosingIntRe ct(damageRect)), paintFlags, LayoutSize()); 796 PaintLayerPaintingInfo paintingInfo(&m_paintLayer, LayoutRect(enclosingIntRe ct(damageRect)), paintFlags, LayoutSize());
798 paintLayer(context, paintingInfo, PaintLayerPaintingOverlayScrollbars); 797 paintLayer(context, paintingInfo, PaintLayerPaintingOverlayScrollbars);
799 798
800 m_paintLayer.setContainsDirtyOverlayScrollbars(false); 799 m_paintLayer.setContainsDirtyOverlayScrollbars(false);
801 } 800 }
802 801
803 } // namespace blink 802 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBox.cpp ('k') | third_party/WebKit/Source/core/paint/PaintLayerPainterTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698