| OLD | NEW |
| 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/LayoutView.h" | 8 #include "core/layout/LayoutView.h" |
| 9 #include "core/paint/ClipPathClipper.h" | 9 #include "core/paint/ClipPathClipper.h" |
| 10 #include "core/paint/FilterPainter.h" | 10 #include "core/paint/FilterPainter.h" |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 DCHECK(m_paintLayer.isSelfPaintingLayer() || | 147 DCHECK(m_paintLayer.isSelfPaintingLayer() || |
| 148 m_paintLayer.hasSelfPaintingLayerDescendant()); | 148 m_paintLayer.hasSelfPaintingLayerDescendant()); |
| 149 | 149 |
| 150 PaintLayerFlags localPaintFlags = paintFlags & ~(PaintLayerAppliedTransform); | 150 PaintLayerFlags localPaintFlags = paintFlags & ~(PaintLayerAppliedTransform); |
| 151 localPaintFlags |= PaintLayerPaintingCompositingAllPhases; | 151 localPaintFlags |= PaintLayerPaintingCompositingAllPhases; |
| 152 return paintLayerContents(context, paintingInfo, localPaintFlags, | 152 return paintLayerContents(context, paintingInfo, localPaintFlags, |
| 153 fragmentPolicy); | 153 fragmentPolicy); |
| 154 } | 154 } |
| 155 | 155 |
| 156 static bool shouldCreateSubsequence(const PaintLayer& paintLayer, | 156 static bool shouldCreateSubsequence(const PaintLayer& paintLayer, |
| 157 GraphicsContext& context, | 157 const GraphicsContext& context, |
| 158 const PaintLayerPaintingInfo& paintingInfo, | 158 const PaintLayerPaintingInfo& paintingInfo, |
| 159 PaintLayerFlags paintFlags) { | 159 PaintLayerFlags paintFlags) { |
| 160 // Caching is not needed during printing. | 160 // Caching is not needed during printing. |
| 161 if (context.printing()) | 161 if (context.printing()) |
| 162 return false; | 162 return false; |
| 163 | 163 |
| 164 // Don't create subsequence for a composited layer because if it can be | 164 // Don't create subsequence for a composited layer because if it can be |
| 165 // cached, we can skip the whole painting in GraphicsLayer::paint() with | 165 // cached, we can skip the whole painting in GraphicsLayer::paint() with |
| 166 // CachedDisplayItemList. This also avoids conflict of | 166 // CachedDisplayItemList. This also avoids conflict of |
| 167 // PaintLayer::previousXXX() when paintLayer is composited scrolling and is | 167 // PaintLayer::previousXXX() when paintLayer is composited scrolling and is |
| (...skipping 1030 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1198 context, layoutObject, PaintPhaseClippingMask)) | 1198 context, layoutObject, PaintPhaseClippingMask)) |
| 1199 return; | 1199 return; |
| 1200 | 1200 |
| 1201 IntRect snappedClipRect = pixelSnappedIntRect(clipRect.rect()); | 1201 IntRect snappedClipRect = pixelSnappedIntRect(clipRect.rect()); |
| 1202 LayoutObjectDrawingRecorder drawingRecorder( | 1202 LayoutObjectDrawingRecorder drawingRecorder( |
| 1203 context, layoutObject, PaintPhaseClippingMask, snappedClipRect); | 1203 context, layoutObject, PaintPhaseClippingMask, snappedClipRect); |
| 1204 context.fillRect(snappedClipRect, Color::black); | 1204 context.fillRect(snappedClipRect, Color::black); |
| 1205 } | 1205 } |
| 1206 | 1206 |
| 1207 } // namespace blink | 1207 } // namespace blink |
| OLD | NEW |