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

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

Issue 840733004: Replace setCompositeOperation(CompositeOperator, WebBlendMode) with setCompositeOperation(SkXfermod… (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rename compositeOperationDeprecated Created 5 years, 11 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
« no previous file with comments | « Source/core/paint/InlineFlowBoxPainter.cpp ('k') | Source/core/paint/ViewPainter.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/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/CompositingRecorder.h" 10 #include "core/paint/CompositingRecorder.h"
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 // Blending operations must be performed only with the nearest ancestor stac king context. 213 // Blending operations must be performed only with the nearest ancestor stac king context.
214 // Note that there is no need to composite if we're painting the root. 214 // Note that there is no need to composite if we're painting the root.
215 // FIXME: this should be unified further into RenderLayer::paintsWithTranspa rency(). 215 // FIXME: this should be unified further into RenderLayer::paintsWithTranspa rency().
216 bool shouldCompositeForBlendMode = (!m_renderLayer.renderer()->isDocumentEle ment() || m_renderLayer.renderer()->isSVGRoot()) && m_renderLayer.stackingNode() ->isStackingContext() && m_renderLayer.hasNonIsolatedDescendantWithBlendMode(); 216 bool shouldCompositeForBlendMode = (!m_renderLayer.renderer()->isDocumentEle ment() || m_renderLayer.renderer()->isSVGRoot()) && m_renderLayer.stackingNode() ->isStackingContext() && m_renderLayer.hasNonIsolatedDescendantWithBlendMode();
217 if (shouldCompositeForBlendMode || m_renderLayer.paintsWithTransparency(pain tingInfo.paintBehavior)) { 217 if (shouldCompositeForBlendMode || m_renderLayer.paintsWithTransparency(pain tingInfo.paintBehavior)) {
218 clipRecorder = adoptPtr(new LayerClipRecorder(m_renderLayer.renderer(), context, DisplayItem::TransparencyClip, 218 clipRecorder = adoptPtr(new LayerClipRecorder(m_renderLayer.renderer(), context, DisplayItem::TransparencyClip,
219 m_renderLayer.paintingExtent(paintingInfo.rootLayer, paintingInfo.pa intDirtyRect, paintingInfo.subPixelAccumulation, paintingInfo.paintBehavior), 219 m_renderLayer.paintingExtent(paintingInfo.rootLayer, paintingInfo.pa intDirtyRect, paintingInfo.subPixelAccumulation, paintingInfo.paintBehavior),
220 &paintingInfo, LayoutPoint(), paintFlags)); 220 &paintingInfo, LayoutPoint(), paintFlags));
221 221
222 compositingRecorder = adoptPtr(new CompositingRecorder(context, m_render Layer.renderer()->displayItemClient(), 222 compositingRecorder = adoptPtr(new CompositingRecorder(context, m_render Layer.renderer()->displayItemClient(),
223 context->compositeOperation(), m_renderLayer.renderer()->style()->bl endMode(), m_renderLayer.renderer()->opacity(), context->compositeOperation())); 223 context->compositeOperationDeprecated(), m_renderLayer.renderer()->s tyle()->blendMode(), m_renderLayer.renderer()->opacity(), context->compositeOper ationDeprecated()));
224 } 224 }
225 225
226 LayerPaintingInfo localPaintingInfo(paintingInfo); 226 LayerPaintingInfo localPaintingInfo(paintingInfo);
227 227
228 LayerFragments layerFragments; 228 LayerFragments layerFragments;
229 if (shouldPaintContent || shouldPaintOutline || isPaintingOverlayScrollbars) { 229 if (shouldPaintContent || shouldPaintOutline || isPaintingOverlayScrollbars) {
230 // Collect the fragments. This will compute the clip rectangles and pain t offsets for each layer fragment. 230 // Collect the fragments. This will compute the clip rectangles and pain t offsets for each layer fragment.
231 m_renderLayer.collectFragments(layerFragments, localPaintingInfo.rootLay er, localPaintingInfo.paintDirtyRect, 231 m_renderLayer.collectFragments(layerFragments, localPaintingInfo.rootLay er, localPaintingInfo.paintDirtyRect,
232 (paintFlags & PaintLayerUncachedClipRects) ? UncachedClipRects : Pai ntingClipRects, IgnoreOverlayScrollbarSize, 232 (paintFlags & PaintLayerUncachedClipRects) ? UncachedClipRects : Pai ntingClipRects, IgnoreOverlayScrollbarSize,
233 shouldRespectOverflowClip(paintFlags, m_renderLayer.renderer()), &of fsetFromRoot, localPaintingInfo.subPixelAccumulation); 233 shouldRespectOverflowClip(paintFlags, m_renderLayer.renderer()), &of fsetFromRoot, localPaintingInfo.subPixelAccumulation);
(...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after
723 if (!m_renderLayer.containsDirtyOverlayScrollbars()) 723 if (!m_renderLayer.containsDirtyOverlayScrollbars())
724 return; 724 return;
725 725
726 LayerPaintingInfo paintingInfo(&m_renderLayer, enclosingIntRect(damageRect), paintBehavior, LayoutSize(), paintingRoot); 726 LayerPaintingInfo paintingInfo(&m_renderLayer, enclosingIntRect(damageRect), paintBehavior, LayoutSize(), paintingRoot);
727 paintLayer(context, paintingInfo, PaintLayerPaintingOverlayScrollbars); 727 paintLayer(context, paintingInfo, PaintLayerPaintingOverlayScrollbars);
728 728
729 m_renderLayer.setContainsDirtyOverlayScrollbars(false); 729 m_renderLayer.setContainsDirtyOverlayScrollbars(false);
730 } 730 }
731 731
732 } // namespace blink 732 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/paint/InlineFlowBoxPainter.cpp ('k') | Source/core/paint/ViewPainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698