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/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 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
273 bool shouldPaintContent = m_paintLayer.hasVisibleContent() && isSelfPainting
Layer && !isPaintingOverlayScrollbars; | 273 bool shouldPaintContent = m_paintLayer.hasVisibleContent() && isSelfPainting
Layer && !isPaintingOverlayScrollbars; |
274 | 274 |
275 PaintResult result = FullyPainted; | 275 PaintResult result = FullyPainted; |
276 | 276 |
277 if (paintFlags & PaintLayerPaintingRootBackgroundOnly && !m_paintLayer.layou
tObject()->isLayoutView() && !m_paintLayer.layoutObject()->isDocumentElement()) | 277 if (paintFlags & PaintLayerPaintingRootBackgroundOnly && !m_paintLayer.layou
tObject()->isLayoutView() && !m_paintLayer.layoutObject()->isDocumentElement()) |
278 return result; | 278 return result; |
279 | 279 |
280 if (m_paintLayer.layoutObject()->view()->frame() && m_paintLayer.layoutObjec
t()->view()->frame()->shouldThrottleRendering()) | 280 if (m_paintLayer.layoutObject()->view()->frame() && m_paintLayer.layoutObjec
t()->view()->frame()->shouldThrottleRendering()) |
281 return result; | 281 return result; |
282 | 282 |
283 // Ensure our lists are up-to-date. | 283 // Ensure our lists are up to date. |
284 m_paintLayer.stackingNode()->updateLayerListsIfNeeded(); | 284 m_paintLayer.stackingNode()->updateLayerListsIfNeeded(); |
285 | 285 |
286 LayoutSize subpixelAccumulation = m_paintLayer.compositingState() == PaintsI
ntoOwnBacking ? m_paintLayer.subpixelAccumulation() : paintingInfoArg.subPixelAc
cumulation; | 286 LayoutSize subpixelAccumulation = m_paintLayer.compositingState() == PaintsI
ntoOwnBacking ? m_paintLayer.subpixelAccumulation() : paintingInfoArg.subPixelAc
cumulation; |
287 ShouldRespectOverflowClipType respectOverflowClip = shouldRespectOverflowCli
p(paintFlags, m_paintLayer.layoutObject()); | 287 ShouldRespectOverflowClipType respectOverflowClip = shouldRespectOverflowCli
p(paintFlags, m_paintLayer.layoutObject()); |
288 | 288 |
289 Optional<SubsequenceRecorder> subsequenceRecorder; | 289 Optional<SubsequenceRecorder> subsequenceRecorder; |
290 if (shouldCreateSubsequence(m_paintLayer, context, paintingInfoArg, paintFla
gs)) { | 290 if (shouldCreateSubsequence(m_paintLayer, context, paintingInfoArg, paintFla
gs)) { |
291 if (!shouldRepaintSubsequence(m_paintLayer, paintingInfoArg, respectOver
flowClip, subpixelAccumulation) | 291 if (!shouldRepaintSubsequence(m_paintLayer, paintingInfoArg, respectOver
flowClip, subpixelAccumulation) |
292 && SubsequenceRecorder::useCachedSubsequenceIfPossible(context, m_pa
intLayer)) | 292 && SubsequenceRecorder::useCachedSubsequenceIfPossible(context, m_pa
intLayer)) |
293 return result; | 293 return result; |
(...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
804 if (!m_paintLayer.containsDirtyOverlayScrollbars()) | 804 if (!m_paintLayer.containsDirtyOverlayScrollbars()) |
805 return; | 805 return; |
806 | 806 |
807 PaintLayerPaintingInfo paintingInfo(&m_paintLayer, LayoutRect(enclosingIntRe
ct(damageRect)), paintFlags, LayoutSize()); | 807 PaintLayerPaintingInfo paintingInfo(&m_paintLayer, LayoutRect(enclosingIntRe
ct(damageRect)), paintFlags, LayoutSize()); |
808 paintLayer(context, paintingInfo, PaintLayerPaintingOverlayScrollbars); | 808 paintLayer(context, paintingInfo, PaintLayerPaintingOverlayScrollbars); |
809 | 809 |
810 m_paintLayer.setContainsDirtyOverlayScrollbars(false); | 810 m_paintLayer.setContainsDirtyOverlayScrollbars(false); |
811 } | 811 } |
812 | 812 |
813 } // namespace blink | 813 } // namespace blink |
OLD | NEW |