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

Side by Side Diff: third_party/WebKit/Source/core/paint/FilterPainter.cpp

Issue 1987943002: [wip] unprefix filter Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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
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 "core/paint/FilterPainter.h" 5 #include "core/paint/FilterPainter.h"
6 6
7 #include "core/paint/FilterEffectBuilder.h" 7 #include "core/paint/FilterEffectBuilder.h"
8 #include "core/paint/LayerClipRecorder.h" 8 #include "core/paint/LayerClipRecorder.h"
9 #include "core/paint/PaintLayer.h" 9 #include "core/paint/PaintLayer.h"
10 #include "platform/RuntimeEnabledFeatures.h" 10 #include "platform/RuntimeEnabledFeatures.h"
(...skipping 12 matching lines...) Expand all
23 23
24 FilterPainter::FilterPainter(PaintLayer& layer, GraphicsContext& context, const LayoutPoint& offsetFromRoot, const ClipRect& clipRect, PaintLayerPaintingInfo& p aintingInfo, PaintLayerFlags paintFlags, 24 FilterPainter::FilterPainter(PaintLayer& layer, GraphicsContext& context, const LayoutPoint& offsetFromRoot, const ClipRect& clipRect, PaintLayerPaintingInfo& p aintingInfo, PaintLayerFlags paintFlags,
25 LayoutRect& rootRelativeBounds, bool& rootRelativeBoundsComputed) 25 LayoutRect& rootRelativeBounds, bool& rootRelativeBoundsComputed)
26 : m_filterInProgress(false) 26 : m_filterInProgress(false)
27 , m_context(context) 27 , m_context(context)
28 , m_layoutObject(layer.layoutObject()) 28 , m_layoutObject(layer.layoutObject())
29 { 29 {
30 if (!layer.paintsWithFilters()) 30 if (!layer.paintsWithFilters())
31 return; 31 return;
32 32
33 if (m_layoutObject->isSVGRoot() && m_layoutObject->style()->hasFilter())
34 return;
35
33 FilterEffect* lastEffect = layer.lastFilterEffect(); 36 FilterEffect* lastEffect = layer.lastFilterEffect();
34 if (!lastEffect) 37 if (!lastEffect)
35 return; 38 return;
36 39
37 ASSERT(layer.filterInfo()); 40 ASSERT(layer.filterInfo());
38 41
39 lastEffect->determineFilterPrimitiveSubregion(MapRectForward); 42 lastEffect->determineFilterPrimitiveSubregion(MapRectForward);
40 sk_sp<SkImageFilter> imageFilter = SkiaImageFilterBuilder::build(lastEffect, ColorSpaceDeviceRGB); 43 sk_sp<SkImageFilter> imageFilter = SkiaImageFilterBuilder::build(lastEffect, ColorSpaceDeviceRGB);
41 if (!imageFilter) 44 if (!imageFilter)
42 return; 45 return;
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 86
84 FilterPainter::~FilterPainter() 87 FilterPainter::~FilterPainter()
85 { 88 {
86 if (!m_filterInProgress) 89 if (!m_filterInProgress)
87 return; 90 return;
88 91
89 m_context.getPaintController().endItem<EndFilterDisplayItem>(*m_layoutObject ); 92 m_context.getPaintController().endItem<EndFilterDisplayItem>(*m_layoutObject );
90 } 93 }
91 94
92 } // namespace blink 95 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/svg/SVGResourcesCache.cpp ('k') | third_party/WebKit/Source/core/paint/PaintLayer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698