| 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 "config.h" | 5 #include "config.h" |
| 6 #include "core/paint/LayerPainter.h" | 6 #include "core/paint/LayerPainter.h" |
| 7 | 7 |
| 8 #include "core/frame/Settings.h" | 8 #include "core/frame/Settings.h" |
| 9 #include "core/page/Page.h" | 9 #include "core/page/Page.h" |
| 10 #include "core/rendering/ClipPathOperation.h" | 10 #include "core/rendering/ClipPathOperation.h" |
| (...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 495 static bool paintForFixedRootBackground(const RenderLayer* layer, PaintLayerFlag
s paintFlags) | 495 static bool paintForFixedRootBackground(const RenderLayer* layer, PaintLayerFlag
s paintFlags) |
| 496 { | 496 { |
| 497 return layer->renderer()->isDocumentElement() && (paintFlags & PaintLayerPai
ntingRootBackgroundOnly); | 497 return layer->renderer()->isDocumentElement() && (paintFlags & PaintLayerPai
ntingRootBackgroundOnly); |
| 498 } | 498 } |
| 499 | 499 |
| 500 bool LayerPainter::shouldPaintLayerInSoftwareMode(const LayerPaintingInfo& paint
ingInfo, PaintLayerFlags paintFlags) | 500 bool LayerPainter::shouldPaintLayerInSoftwareMode(const LayerPaintingInfo& paint
ingInfo, PaintLayerFlags paintFlags) |
| 501 { | 501 { |
| 502 DisableCompositingQueryAsserts disabler; | 502 DisableCompositingQueryAsserts disabler; |
| 503 | 503 |
| 504 return m_renderLayer.compositingState() == NotComposited | 504 return m_renderLayer.compositingState() == NotComposited |
| 505 || m_renderLayer.compositingState() == HasOwnBackingButPaintsIntoAncesto
r | |
| 506 || (paintingInfo.paintBehavior & PaintBehaviorFlattenCompositingLayers) | 505 || (paintingInfo.paintBehavior & PaintBehaviorFlattenCompositingLayers) |
| 507 || ((paintFlags & PaintLayerPaintingReflection) && !m_renderLayer.has3DT
ransform()) | 506 || ((paintFlags & PaintLayerPaintingReflection) && !m_renderLayer.has3DT
ransform()) |
| 508 || paintForFixedRootBackground(&m_renderLayer, paintFlags); | 507 || paintForFixedRootBackground(&m_renderLayer, paintFlags); |
| 509 } | 508 } |
| 510 | 509 |
| 511 static inline LayoutSize subPixelAccumulationIfNeeded(const LayoutSize& subPixel
Accumulation, CompositingState compositingState) | 510 static inline LayoutSize subPixelAccumulationIfNeeded(const LayoutSize& subPixel
Accumulation, CompositingState compositingState) |
| 512 { | 511 { |
| 513 // Only apply the sub-pixel accumulation if we don't paint into our own back
ing layer, otherwise the position | 512 // Only apply the sub-pixel accumulation if we don't paint into our own back
ing layer, otherwise the position |
| 514 // of the renderer already includes any sub-pixel offset. | 513 // of the renderer already includes any sub-pixel offset. |
| 515 if (compositingState == PaintsIntoOwnBacking) | 514 if (compositingState == PaintsIntoOwnBacking) |
| (...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 875 clipRecorder = adoptPtr(new ClipRecorder(m_renderLayer.parent(), con
text, DisplayItem::ClipLayerFragmentParent, clipRect)); | 874 clipRecorder = adoptPtr(new ClipRecorder(m_renderLayer.parent(), con
text, DisplayItem::ClipLayerFragmentParent, clipRect)); |
| 876 // FIXME: why should we have to deal with rounded rect clips here at
all? | 875 // FIXME: why should we have to deal with rounded rect clips here at
all? |
| 877 LayerPainter(*m_renderLayer.parent()).applyRoundedRectClips(painting
Info, context, clipRect, paintFlags, *clipRecorder); | 876 LayerPainter(*m_renderLayer.parent()).applyRoundedRectClips(painting
Info, context, clipRect, paintFlags, *clipRecorder); |
| 878 } | 877 } |
| 879 | 878 |
| 880 paintLayerByApplyingTransform(context, paintingInfo, paintFlags, fragmen
t.paginationOffset); | 879 paintLayerByApplyingTransform(context, paintingInfo, paintFlags, fragmen
t.paginationOffset); |
| 881 } | 880 } |
| 882 } | 881 } |
| 883 | 882 |
| 884 } // namespace blink | 883 } // namespace blink |
| OLD | NEW |