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

Side by Side Diff: third_party/WebKit/Source/core/layout/svg/LayoutSVGShape.cpp

Issue 2858913002: Simplify the SVGGraphicsElement ...CTM methods (Closed)
Patch Set: Created 3 years, 7 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 | « no previous file | third_party/WebKit/Source/core/svg/SVGGraphicsElement.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org> 2 * Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org>
3 * Copyright (C) 2004, 2005, 2008 Rob Buis <buis@kde.org> 3 * Copyright (C) 2004, 2005, 2008 Rob Buis <buis@kde.org>
4 * Copyright (C) 2005, 2007 Eric Seidel <eric@webkit.org> 4 * Copyright (C) 2005, 2007 Eric Seidel <eric@webkit.org>
5 * Copyright (C) 2009 Google, Inc. 5 * Copyright (C) 2009 Google, Inc.
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 2010. All rights reserved. 7 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
8 * Copyright (C) 2009 Jeff Schiller <codedread@gmail.com> 8 * Copyright (C) 2009 Jeff Schiller <codedread@gmail.com>
9 * Copyright (C) 2011 Renata Hodovan <reni@webkit.org> 9 * Copyright (C) 2011 Renata Hodovan <reni@webkit.org>
10 * Copyright (C) 2011 University of Szeged 10 * Copyright (C) 2011 University of Szeged
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 return &rare_data.cached_non_scaling_stroke_path_; 221 return &rare_data.cached_non_scaling_stroke_path_;
222 222
223 rare_data.cached_non_scaling_stroke_path_ = *path; 223 rare_data.cached_non_scaling_stroke_path_ = *path;
224 rare_data.cached_non_scaling_stroke_path_.Transform(stroke_transform); 224 rare_data.cached_non_scaling_stroke_path_.Transform(stroke_transform);
225 rare_data.cached_non_scaling_stroke_transform_ = stroke_transform; 225 rare_data.cached_non_scaling_stroke_transform_ = stroke_transform;
226 return &rare_data.cached_non_scaling_stroke_path_; 226 return &rare_data.cached_non_scaling_stroke_path_;
227 } 227 }
228 228
229 AffineTransform LayoutSVGShape::NonScalingStrokeTransform() const { 229 AffineTransform LayoutSVGShape::NonScalingStrokeTransform() const {
230 AffineTransform t = 230 AffineTransform t =
231 ToSVGGraphicsElement(GetElement()) 231 ToSVGGraphicsElement(GetElement())->ComputeCTM(SVGElement::kScreenScope);
232 ->GetScreenCTM(SVGGraphicsElement::kDisallowStyleUpdate);
233 // Width of non-scaling stroke is independent of translation, so zero it out 232 // Width of non-scaling stroke is independent of translation, so zero it out
234 // here. 233 // here.
235 t.SetE(0); 234 t.SetE(0);
236 t.SetF(0); 235 t.SetF(0);
237 return t; 236 return t;
238 } 237 }
239 238
240 void LayoutSVGShape::Paint(const PaintInfo& paint_info, 239 void LayoutSVGShape::Paint(const PaintInfo& paint_info,
241 const LayoutPoint&) const { 240 const LayoutPoint&) const {
242 SVGShapePainter(*this).Paint(paint_info); 241 SVGShapePainter(*this).Paint(paint_info);
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 return length_context.ValueForLength(Style()->SvgStyle().StrokeWidth()); 334 return length_context.ValueForLength(Style()->SvgStyle().StrokeWidth());
336 } 335 }
337 336
338 LayoutSVGShapeRareData& LayoutSVGShape::EnsureRareData() const { 337 LayoutSVGShapeRareData& LayoutSVGShape::EnsureRareData() const {
339 if (!rare_data_) 338 if (!rare_data_)
340 rare_data_ = WTF::MakeUnique<LayoutSVGShapeRareData>(); 339 rare_data_ = WTF::MakeUnique<LayoutSVGShapeRareData>();
341 return *rare_data_.get(); 340 return *rare_data_.get();
342 } 341 }
343 342
344 } // namespace blink 343 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/svg/SVGGraphicsElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698