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/paint/FilterPainter.h" | 10 #include "core/paint/FilterPainter.h" |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 { | 115 { |
116 // Blending operations must be performed only with the nearest ancestor
stacking context. | 116 // Blending operations must be performed only with the nearest ancestor
stacking context. |
117 // Note that there is no need to create a transparency layer if we're pa
inting the root. | 117 // Note that there is no need to create a transparency layer if we're pa
inting the root. |
118 // FIXME: this should be unified further into RenderLayer::paintsWithTra
nsparency(). | 118 // FIXME: this should be unified further into RenderLayer::paintsWithTra
nsparency(). |
119 bool shouldUseTransparencyLayerForBlendMode = !renderLayer.renderer()->i
sDocumentElement() && renderLayer.stackingNode()->isStackingContext() && renderL
ayer.hasNonIsolatedDescendantWithBlendMode(); | 119 bool shouldUseTransparencyLayerForBlendMode = !renderLayer.renderer()->i
sDocumentElement() && renderLayer.stackingNode()->isStackingContext() && renderL
ayer.hasNonIsolatedDescendantWithBlendMode(); |
120 if (!shouldUseTransparencyLayerForBlendMode && !renderLayer.paintsWithTr
ansparency(paintBehavior)) | 120 if (!shouldUseTransparencyLayerForBlendMode && !renderLayer.paintsWithTr
ansparency(paintBehavior)) |
121 return; | 121 return; |
122 | 122 |
123 OwnPtr<BeginTransparencyDisplayItem> beginTransparencyDisplayItem = adop
tPtr(new BeginTransparencyDisplayItem( | 123 OwnPtr<BeginTransparencyDisplayItem> beginTransparencyDisplayItem = adop
tPtr(new BeginTransparencyDisplayItem( |
124 renderLayer.renderer(), DisplayItem::BeginTransparency, renderLayer.
paintingExtent(rootLayer, paintDirtyRect, subPixelAccumulation, paintBehavior), | 124 renderLayer.renderer(), DisplayItem::BeginTransparency, renderLayer.
paintingExtent(rootLayer, paintDirtyRect, subPixelAccumulation, paintBehavior), |
125 renderLayer.renderer()->hasBlendMode(), renderLayer.renderer()->styl
e()->blendMode(), renderLayer.renderer()->opacity())); | 125 renderLayer.renderer()->style()->blendMode(), renderLayer.renderer()
->opacity())); |
126 if (RuntimeEnabledFeatures::slimmingPaintEnabled()) | 126 if (RuntimeEnabledFeatures::slimmingPaintEnabled()) |
127 renderLayer.renderer()->view()->viewDisplayList().add(beginTranspare
ncyDisplayItem.release()); | 127 renderLayer.renderer()->view()->viewDisplayList().add(beginTranspare
ncyDisplayItem.release()); |
128 else | 128 else |
129 beginTransparencyDisplayItem->replay(context); | 129 beginTransparencyDisplayItem->replay(context); |
130 | 130 |
131 m_transparencyLayerInProgress = true; | 131 m_transparencyLayerInProgress = true; |
132 } | 132 } |
133 | 133 |
134 ~TransparencyLayerHelper() | 134 ~TransparencyLayerHelper() |
135 { | 135 { |
(...skipping 618 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
754 | 754 |
755 OwnPtr<ClipRecorder> clipRecorder; | 755 OwnPtr<ClipRecorder> clipRecorder; |
756 if (needsToClip(paintingInfo, clipRect)) | 756 if (needsToClip(paintingInfo, clipRect)) |
757 clipRecorder = adoptPtr(new ClipRecorder(m_renderLayer.renderer(), c
ontext, DisplayItem::ClipLayerFragmentParent, clipRect, &paintingInfo, LayoutPoi
nt(), paintFlags)); | 757 clipRecorder = adoptPtr(new ClipRecorder(m_renderLayer.renderer(), c
ontext, DisplayItem::ClipLayerFragmentParent, clipRect, &paintingInfo, LayoutPoi
nt(), paintFlags)); |
758 | 758 |
759 paintLayerByApplyingTransform(context, paintingInfo, paintFlags, fragmen
t.paginationOffset); | 759 paintLayerByApplyingTransform(context, paintingInfo, paintFlags, fragmen
t.paginationOffset); |
760 } | 760 } |
761 } | 761 } |
762 | 762 |
763 } // namespace blink | 763 } // namespace blink |
OLD | NEW |