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

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

Issue 2789533003: [SPv2] Stop recording paired display items (except for subsequence markers) (Closed)
Patch Set: none Created 3 years, 8 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 /* 1 /*
2 * Copyright (C) 2007, 2008 Rob Buis <buis@kde.org> 2 * Copyright (C) 2007, 2008 Rob Buis <buis@kde.org>
3 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> 3 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org>
4 * Copyright (C) 2007 Eric Seidel <eric@webkit.org> 4 * Copyright (C) 2007 Eric Seidel <eric@webkit.org>
5 * Copyright (C) 2009 Google, Inc. All rights reserved. 5 * Copyright (C) 2009 Google, Inc. All rights reserved.
6 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> 6 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org>
7 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved. 7 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 paintInfo().context, m_object, 150 paintInfo().context, m_object,
151 WebCoreCompositeToSkiaComposite(CompositeSourceOver, blendMode), 151 WebCoreCompositeToSkiaComposite(CompositeSourceOver, blendMode),
152 opacity, &compositingBounds)); 152 opacity, &compositingBounds));
153 } 153 }
154 } 154 }
155 155
156 void SVGPaintContext::applyClipIfNecessary() { 156 void SVGPaintContext::applyClipIfNecessary() {
157 ClipPathOperation* clipPathOperation = m_object.styleRef().clipPath(); 157 ClipPathOperation* clipPathOperation = m_object.styleRef().clipPath();
158 if (!clipPathOperation) 158 if (!clipPathOperation)
159 return; 159 return;
160 m_clipPathClipper.emplace(paintInfo().context, *clipPathOperation, m_object, 160 if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled()) {
161 m_object.objectBoundingBox(), FloatPoint()); 161 m_clipPathClipper.emplace(paintInfo().context, *clipPathOperation, m_object,
162 m_object.objectBoundingBox(), FloatPoint());
163 }
162 } 164 }
163 165
164 bool SVGPaintContext::applyMaskIfNecessary(SVGResources* resources) { 166 bool SVGPaintContext::applyMaskIfNecessary(SVGResources* resources) {
165 if (LayoutSVGResourceMasker* masker = 167 if (LayoutSVGResourceMasker* masker =
166 resources ? resources->masker() : nullptr) { 168 resources ? resources->masker() : nullptr) {
167 if (!SVGMaskPainter(*masker).prepareEffect(m_object, paintInfo().context)) 169 if (!SVGMaskPainter(*masker).prepareEffect(m_object, paintInfo().context))
168 return false; 170 return false;
169 m_masker = masker; 171 m_masker = masker;
170 } 172 }
171 return true; 173 return true;
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 // so elements outside the initial paint (due to scrolling, etc) paint. 207 // so elements outside the initial paint (due to scrolling, etc) paint.
206 m_filterPaintInfo->m_cullRect.m_rect = LayoutRect::infiniteIntRect(); 208 m_filterPaintInfo->m_cullRect.m_rect = LayoutRect::infiniteIntRect();
207 return true; 209 return true;
208 } 210 }
209 211
210 bool SVGPaintContext::isIsolationInstalled() const { 212 bool SVGPaintContext::isIsolationInstalled() const {
211 if (m_compositingRecorder) 213 if (m_compositingRecorder)
212 return true; 214 return true;
213 if (m_masker || m_filter) 215 if (m_masker || m_filter)
214 return true; 216 return true;
215 if (m_clipPathClipper && m_clipPathClipper->usingMask()) 217 if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled() && m_clipPathClipper &&
218 m_clipPathClipper->usingMask())
216 return true; 219 return true;
217 return false; 220 return false;
218 } 221 }
219 222
220 void SVGPaintContext::paintResourceSubtree(GraphicsContext& context, 223 void SVGPaintContext::paintResourceSubtree(GraphicsContext& context,
221 const LayoutObject* item) { 224 const LayoutObject* item) {
222 DCHECK(item); 225 DCHECK(item);
223 DCHECK(!item->needsLayout()); 226 DCHECK(!item->needsLayout());
224 227
225 PaintInfo info(context, LayoutRect::infiniteIntRect(), PaintPhaseForeground, 228 PaintInfo info(context, LayoutRect::infiniteIntRect(), PaintPhaseForeground,
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 // though. 272 // though.
270 // Additionally, it's not really safe/guaranteed to be correct, as 273 // Additionally, it's not really safe/guaranteed to be correct, as
271 // something down the flags pipe may want to farther tweak the color 274 // something down the flags pipe may want to farther tweak the color
272 // filter, which could yield incorrect results. (Consider just using 275 // filter, which could yield incorrect results. (Consider just using
273 // saveLayer() w/ this color filter explicitly instead.) 276 // saveLayer() w/ this color filter explicitly instead.)
274 flags.setColorFilter(sk_ref_sp(paintInfo.context.getColorFilter())); 277 flags.setColorFilter(sk_ref_sp(paintInfo.context.getColorFilter()));
275 return true; 278 return true;
276 } 279 }
277 280
278 } // namespace blink 281 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/paint/SVGMaskPainter.cpp ('k') | third_party/WebKit/Source/core/paint/ScrollRecorder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698