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

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

Issue 2465983002: Rename "paint invalidation rect" etc. to "visual rect". (Closed)
Patch Set: - Created 4 years, 1 month 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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 void SVGPaintContext::applyCompositingIfNecessary() { 111 void SVGPaintContext::applyCompositingIfNecessary() {
112 ASSERT(!paintInfo().isRenderingClipPathAsMaskImage()); 112 ASSERT(!paintInfo().isRenderingClipPathAsMaskImage());
113 113
114 const ComputedStyle& style = m_object.styleRef(); 114 const ComputedStyle& style = m_object.styleRef();
115 float opacity = style.opacity(); 115 float opacity = style.opacity();
116 WebBlendMode blendMode = style.hasBlendMode() && m_object.isBlendingAllowed() 116 WebBlendMode blendMode = style.hasBlendMode() && m_object.isBlendingAllowed()
117 ? style.blendMode() 117 ? style.blendMode()
118 : WebBlendModeNormal; 118 : WebBlendModeNormal;
119 if (opacity < 1 || blendMode != WebBlendModeNormal) { 119 if (opacity < 1 || blendMode != WebBlendModeNormal) {
120 const FloatRect compositingBounds = 120 const FloatRect compositingBounds =
121 m_object.paintInvalidationRectInLocalSVGCoordinates(); 121 m_object.visualRectInLocalSVGCoordinates();
122 m_compositingRecorder = wrapUnique(new CompositingRecorder( 122 m_compositingRecorder = wrapUnique(new CompositingRecorder(
123 paintInfo().context, m_object, 123 paintInfo().context, m_object,
124 WebCoreCompositeToSkiaComposite(CompositeSourceOver, blendMode), 124 WebCoreCompositeToSkiaComposite(CompositeSourceOver, blendMode),
125 opacity, &compositingBounds)); 125 opacity, &compositingBounds));
126 } 126 }
127 } 127 }
128 128
129 void SVGPaintContext::applyClipIfNecessary() { 129 void SVGPaintContext::applyClipIfNecessary() {
130 ClipPathOperation* clipPathOperation = m_object.styleRef().clipPath(); 130 ClipPathOperation* clipPathOperation = m_object.styleRef().clipPath();
131 if (!clipPathOperation) 131 if (!clipPathOperation)
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 // though. 240 // though.
241 // Additionally, it's not really safe/guaranteed to be correct, as 241 // Additionally, it's not really safe/guaranteed to be correct, as
242 // something down the paint pipe may want to farther tweak the color 242 // something down the paint pipe may want to farther tweak the color
243 // filter, which could yield incorrect results. (Consider just using 243 // filter, which could yield incorrect results. (Consider just using
244 // saveLayer() w/ this color filter explicitly instead.) 244 // saveLayer() w/ this color filter explicitly instead.)
245 paint.setColorFilter(sk_ref_sp(paintInfo.context.getColorFilter())); 245 paint.setColorFilter(sk_ref_sp(paintInfo.context.getColorFilter()));
246 return true; 246 return true;
247 } 247 }
248 248
249 } // namespace blink 249 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/paint/SVGMaskPainter.cpp ('k') | third_party/WebKit/Source/core/paint/SVGShapePainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698