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

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

Issue 1185913002: Skip caching in all scopes (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 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
« no previous file with comments | « no previous file | Source/platform/graphics/paint/DisplayItemList.cpp » ('j') | 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 "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" 18 #include "core/paint/LayerFixedPositionRecorder.h"
19 #include "core/paint/PaintInfo.h" 19 #include "core/paint/PaintInfo.h"
20 #include "core/paint/SVGClipPainter.h" 20 #include "core/paint/SVGClipPainter.h"
21 #include "core/paint/ScopeRecorder.h" 21 #include "core/paint/ScopeRecorder.h"
22 #include "core/paint/ScrollRecorder.h" 22 #include "core/paint/ScrollRecorder.h"
23 #include "core/paint/ScrollableAreaPainter.h" 23 #include "core/paint/ScrollableAreaPainter.h"
24 #include "core/paint/Transform3DRecorder.h" 24 #include "core/paint/Transform3DRecorder.h"
25 #include "platform/graphics/GraphicsLayer.h" 25 #include "platform/graphics/GraphicsLayer.h"
26 #include "platform/graphics/paint/ClipPathRecorder.h" 26 #include "platform/graphics/paint/ClipPathRecorder.h"
27 #include "platform/graphics/paint/ClipRecorder.h" 27 #include "platform/graphics/paint/ClipRecorder.h"
28 #include "platform/graphics/paint/CompositingDisplayItem.h" 28 #include "platform/graphics/paint/CompositingDisplayItem.h"
29 #include "platform/graphics/paint/DisplayItemCacheSkipper.h"
30 #include "platform/graphics/paint/Transform3DDisplayItem.h" 29 #include "platform/graphics/paint/Transform3DDisplayItem.h"
31 #include "wtf/Optional.h" 30 #include "wtf/Optional.h"
32 31
33 namespace blink { 32 namespace blink {
34 33
35 static inline bool shouldSuppressPaintingLayer(DeprecatedPaintLayer* layer) 34 static inline bool shouldSuppressPaintingLayer(DeprecatedPaintLayer* layer)
36 { 35 {
37 // Avoid painting descendants of the root layer when stylesheets haven't loa ded. This eliminates FOUC. 36 // Avoid painting descendants of the root layer when stylesheets haven't loa ded. This eliminates FOUC.
38 // It's ok not to draw, because later on, when all the stylesheets do load, updateStyleSelector on the Document 37 // It's ok not to draw, because later on, when all the stylesheets do load, updateStyleSelector on the Document
39 // will do a full paintInvalidationForWholeLayoutObject(). 38 // will do a full paintInvalidationForWholeLayoutObject().
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 } 93 }
95 94
96 void DeprecatedPaintLayerPainter::paintLayerContentsAndReflection(GraphicsContex t* context, const DeprecatedPaintLayerPaintingInfo& paintingInfo, PaintLayerFlag s paintFlags, FragmentPolicy fragmentPolicy) 95 void DeprecatedPaintLayerPainter::paintLayerContentsAndReflection(GraphicsContex t* context, const DeprecatedPaintLayerPaintingInfo& paintingInfo, PaintLayerFlag s paintFlags, FragmentPolicy fragmentPolicy)
97 { 96 {
98 ASSERT(m_paintLayer.isSelfPaintingLayer() || m_paintLayer.hasSelfPaintingLay erDescendant()); 97 ASSERT(m_paintLayer.isSelfPaintingLayer() || m_paintLayer.hasSelfPaintingLay erDescendant());
99 98
100 PaintLayerFlags localPaintFlags = paintFlags & ~(PaintLayerAppliedTransform) ; 99 PaintLayerFlags localPaintFlags = paintFlags & ~(PaintLayerAppliedTransform) ;
101 100
102 // Paint the reflection first if we have one. 101 // Paint the reflection first if we have one.
103 if (m_paintLayer.reflectionInfo()) { 102 if (m_paintLayer.reflectionInfo()) {
104 DisplayItemCacheSkipper skipper(*context);
chrishtr 2015/06/13 04:44:32 You can delete this class now.
105 ScopeRecorder scopeRecorder(*context, *m_paintLayer.layoutObject()); 103 ScopeRecorder scopeRecorder(*context, *m_paintLayer.layoutObject());
106 m_paintLayer.reflectionInfo()->paint(context, paintingInfo, localPaintFl ags | PaintLayerPaintingReflection); 104 m_paintLayer.reflectionInfo()->paint(context, paintingInfo, localPaintFl ags | PaintLayerPaintingReflection);
107 } 105 }
108 106
109 localPaintFlags |= PaintLayerPaintingCompositingAllPhases; 107 localPaintFlags |= PaintLayerPaintingCompositingAllPhases;
110 paintLayerContents(context, paintingInfo, localPaintFlags, fragmentPolicy); 108 paintLayerContents(context, paintingInfo, localPaintFlags, fragmentPolicy);
111 } 109 }
112 110
113 class ClipPathHelper { 111 class ClipPathHelper {
114 public: 112 public:
(...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after
613 if (!m_paintLayer.containsDirtyOverlayScrollbars()) 611 if (!m_paintLayer.containsDirtyOverlayScrollbars())
614 return; 612 return;
615 613
616 DeprecatedPaintLayerPaintingInfo paintingInfo(&m_paintLayer, LayoutRect(encl osingIntRect(damageRect)), paintBehavior, LayoutSize(), paintingRoot); 614 DeprecatedPaintLayerPaintingInfo paintingInfo(&m_paintLayer, LayoutRect(encl osingIntRect(damageRect)), paintBehavior, LayoutSize(), paintingRoot);
617 paintLayer(context, paintingInfo, PaintLayerPaintingOverlayScrollbars); 615 paintLayer(context, paintingInfo, PaintLayerPaintingOverlayScrollbars);
618 616
619 m_paintLayer.setContainsDirtyOverlayScrollbars(false); 617 m_paintLayer.setContainsDirtyOverlayScrollbars(false);
620 } 618 }
621 619
622 } // namespace blink 620 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | Source/platform/graphics/paint/DisplayItemList.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698