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

Side by Side Diff: Source/core/paint/DeprecatedPaintLayerPainter.cpp

Issue 1110063006: Revert "Correct fixed-position recording for Slimming Paint" (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 7 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 | Annotate | Revision Log
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 "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"
11 #include "core/layout/LayoutView.h" 11 #include "core/layout/LayoutView.h"
12 #include "core/layout/svg/LayoutSVGResourceClipper.h" 12 #include "core/layout/svg/LayoutSVGResourceClipper.h"
13 #include "core/page/Page.h" 13 #include "core/page/Page.h"
14 #include "core/paint/CompositingRecorder.h" 14 #include "core/paint/CompositingRecorder.h"
15 #include "core/paint/DeprecatedPaintLayer.h" 15 #include "core/paint/DeprecatedPaintLayer.h"
16 #include "core/paint/FilterPainter.h" 16 #include "core/paint/FilterPainter.h"
17 #include "core/paint/LayerClipRecorder.h" 17 #include "core/paint/LayerClipRecorder.h"
18 #include "core/paint/LayerFixedPositionRecorder.h"
19 #include "core/paint/PaintInfo.h" 18 #include "core/paint/PaintInfo.h"
20 #include "core/paint/SVGClipPainter.h" 19 #include "core/paint/SVGClipPainter.h"
21 #include "core/paint/ScopeRecorder.h" 20 #include "core/paint/ScopeRecorder.h"
22 #include "core/paint/ScrollableAreaPainter.h" 21 #include "core/paint/ScrollableAreaPainter.h"
23 #include "core/paint/Transform3DRecorder.h" 22 #include "core/paint/Transform3DRecorder.h"
24 #include "platform/graphics/GraphicsLayer.h" 23 #include "platform/graphics/GraphicsLayer.h"
25 #include "platform/graphics/paint/ClipPathRecorder.h" 24 #include "platform/graphics/paint/ClipPathRecorder.h"
26 #include "platform/graphics/paint/ClipRecorder.h" 25 #include "platform/graphics/paint/ClipRecorder.h"
27 #include "platform/graphics/paint/CompositingDisplayItem.h" 26 #include "platform/graphics/paint/CompositingDisplayItem.h"
28 #include "platform/graphics/paint/DisplayItemList.h" 27 #include "platform/graphics/paint/DisplayItemList.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 if (shouldSuppressPaintingLayer(&m_paintLayer)) 72 if (shouldSuppressPaintingLayer(&m_paintLayer))
74 return; 73 return;
75 74
76 // If this layer is totally invisible then there is nothing to paint. 75 // If this layer is totally invisible then there is nothing to paint.
77 if (!m_paintLayer.layoutObject()->opacity()) 76 if (!m_paintLayer.layoutObject()->opacity())
78 return; 77 return;
79 78
80 if (m_paintLayer.paintsWithTransparency(paintingInfo.paintBehavior)) 79 if (m_paintLayer.paintsWithTransparency(paintingInfo.paintBehavior))
81 paintFlags |= PaintLayerHaveTransparency; 80 paintFlags |= PaintLayerHaveTransparency;
82 81
83 LayerFixedPositionRecorder fixedPositionRecorder(*context, *m_paintLayer.lay outObject());
84
85 // PaintLayerAppliedTransform is used in LayoutReplica, to avoid applying th e transform twice. 82 // PaintLayerAppliedTransform is used in LayoutReplica, to avoid applying th e transform twice.
86 if (m_paintLayer.paintsWithTransform(paintingInfo.paintBehavior) && !(paintF lags & PaintLayerAppliedTransform)) { 83 if (m_paintLayer.paintsWithTransform(paintingInfo.paintBehavior) && !(paintF lags & PaintLayerAppliedTransform)) {
87 paintLayerWithTransform(context, paintingInfo, paintFlags); 84 paintLayerWithTransform(context, paintingInfo, paintFlags);
88 return; 85 return;
89 } 86 }
90 87
91 paintLayerContentsAndReflection(context, paintingInfo, paintFlags); 88 paintLayerContentsAndReflection(context, paintingInfo, paintFlags);
92 } 89 }
93 90
94 void DeprecatedPaintLayerPainter::paintLayerContentsAndReflection(GraphicsContex t* context, const DeprecatedPaintLayerPaintingInfo& paintingInfo, PaintLayerFlag s paintFlags, FragmentPolicy fragmentPolicy) 91 void DeprecatedPaintLayerPainter::paintLayerContentsAndReflection(GraphicsContex t* context, const DeprecatedPaintLayerPaintingInfo& paintingInfo, PaintLayerFlag s paintFlags, FragmentPolicy fragmentPolicy)
(...skipping 631 matching lines...) Expand 10 before | Expand all | Expand 10 after
726 if (!m_paintLayer.containsDirtyOverlayScrollbars()) 723 if (!m_paintLayer.containsDirtyOverlayScrollbars())
727 return; 724 return;
728 725
729 DeprecatedPaintLayerPaintingInfo paintingInfo(&m_paintLayer, LayoutRect(encl osingIntRect(damageRect)), paintBehavior, LayoutSize(), paintingRoot); 726 DeprecatedPaintLayerPaintingInfo paintingInfo(&m_paintLayer, LayoutRect(encl osingIntRect(damageRect)), paintBehavior, LayoutSize(), paintingRoot);
730 paintLayer(context, paintingInfo, PaintLayerPaintingOverlayScrollbars); 727 paintLayer(context, paintingInfo, PaintLayerPaintingOverlayScrollbars);
731 728
732 m_paintLayer.setContainsDirtyOverlayScrollbars(false); 729 m_paintLayer.setContainsDirtyOverlayScrollbars(false);
733 } 730 }
734 731
735 } // namespace blink 732 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/paint/DeprecatedPaintLayer.cpp ('k') | Source/core/paint/LayerFixedPositionRecorder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698