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

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

Issue 1897343002: Temporarily disable float empty-phase optimization (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2661
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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 689 matching lines...) Expand 10 before | Expand all | Expand 10 after
700 clipState = HasClipped; 700 clipState = HasClipped;
701 } 701 }
702 702
703 // We have to loop through every fragment multiple times, since we have to i ssue paint invalidations in each specific phase in order for 703 // We have to loop through every fragment multiple times, since we have to i ssue paint invalidations in each specific phase in order for
704 // interleaving of the fragments to work properly. 704 // interleaving of the fragments to work properly.
705 if (selectionOnly) { 705 if (selectionOnly) {
706 paintForegroundForFragmentsWithPhase(PaintPhaseSelection, layerFragments , context, localPaintingInfo, paintFlags, clipState); 706 paintForegroundForFragmentsWithPhase(PaintPhaseSelection, layerFragments , context, localPaintingInfo, paintFlags, clipState);
707 } else { 707 } else {
708 if (m_paintLayer.needsPaintPhaseDescendantBlockBackgrounds()) 708 if (m_paintLayer.needsPaintPhaseDescendantBlockBackgrounds())
709 paintForegroundForFragmentsWithPhase(PaintPhaseDescendantBlockBackgr oundsOnly, layerFragments, context, localPaintingInfo, paintFlags, clipState); 709 paintForegroundForFragmentsWithPhase(PaintPhaseDescendantBlockBackgr oundsOnly, layerFragments, context, localPaintingInfo, paintFlags, clipState);
710 if (m_paintLayer.needsPaintPhaseFloat()) 710 // TODO(wangxianzhu): Enable float empty-phase optimization after fixing crbug.com/603910.
711 paintForegroundForFragmentsWithPhase(PaintPhaseFloat, layerFragments , context, localPaintingInfo, paintFlags, clipState); 711 // if (m_paintLayer.needsPaintPhaseFloat())
712 paintForegroundForFragmentsWithPhase(PaintPhaseFloat, layerFragments, co ntext, localPaintingInfo, paintFlags, clipState);
712 paintForegroundForFragmentsWithPhase(PaintPhaseForeground, layerFragment s, context, localPaintingInfo, paintFlags, clipState); 713 paintForegroundForFragmentsWithPhase(PaintPhaseForeground, layerFragment s, context, localPaintingInfo, paintFlags, clipState);
713 if (m_paintLayer.needsPaintPhaseDescendantOutlines()) 714 if (m_paintLayer.needsPaintPhaseDescendantOutlines())
714 paintForegroundForFragmentsWithPhase(PaintPhaseDescendantOutlinesOnl y, layerFragments, context, localPaintingInfo, paintFlags, clipState); 715 paintForegroundForFragmentsWithPhase(PaintPhaseDescendantOutlinesOnl y, layerFragments, context, localPaintingInfo, paintFlags, clipState);
715 } 716 }
716 } 717 }
717 718
718 void PaintLayerPainter::paintForegroundForFragmentsWithPhase(PaintPhase phase, 719 void PaintLayerPainter::paintForegroundForFragmentsWithPhase(PaintPhase phase,
719 const PaintLayerFragments& layerFragments, GraphicsContext& context, 720 const PaintLayerFragments& layerFragments, GraphicsContext& context,
720 const PaintLayerPaintingInfo& localPaintingInfo, PaintLayerFlags paintFlags, ClipState clipState) 721 const PaintLayerPaintingInfo& localPaintingInfo, PaintLayerFlags paintFlags, ClipState clipState)
721 { 722 {
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
773 if (!m_paintLayer.containsDirtyOverlayScrollbars()) 774 if (!m_paintLayer.containsDirtyOverlayScrollbars())
774 return; 775 return;
775 776
776 PaintLayerPaintingInfo paintingInfo(&m_paintLayer, LayoutRect(enclosingIntRe ct(damageRect)), paintFlags, LayoutSize()); 777 PaintLayerPaintingInfo paintingInfo(&m_paintLayer, LayoutRect(enclosingIntRe ct(damageRect)), paintFlags, LayoutSize());
777 paintLayer(context, paintingInfo, PaintLayerPaintingOverlayScrollbars); 778 paintLayer(context, paintingInfo, PaintLayerPaintingOverlayScrollbars);
778 779
779 m_paintLayer.setContainsDirtyOverlayScrollbars(false); 780 m_paintLayer.setContainsDirtyOverlayScrollbars(false);
780 } 781 }
781 782
782 } // namespace blink 783 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698