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

Side by Side Diff: Source/platform/transforms/AffineTransform.h

Issue 701433002: Lazily allocate svg shape transforms, shrink RenderSVGShape by 44B (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Refactor for cleanliness Created 6 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/svg/SVGGraphicsElement.cpp ('k') | no next file » | 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) 2005, 2006 Apple Computer, Inc. All rights reserved. 2 * Copyright (C) 2005, 2006 Apple Computer, Inc. All rights reserved.
3 * 2010 Dirk Schulze <krit@webkit.org> 3 * 2010 Dirk Schulze <krit@webkit.org>
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 class PLATFORM_EXPORT AffineTransform { 44 class PLATFORM_EXPORT AffineTransform {
45 WTF_MAKE_FAST_ALLOCATED; 45 WTF_MAKE_FAST_ALLOCATED;
46 public: 46 public:
47 typedef double Transform[6]; 47 typedef double Transform[6];
48 48
49 AffineTransform(); 49 AffineTransform();
50 AffineTransform(double a, double b, double c, double d, double e, double f); 50 AffineTransform(double a, double b, double c, double d, double e, double f);
51 51
52 void setMatrix(double a, double b, double c, double d, double e, double f); 52 void setMatrix(double a, double b, double c, double d, double e, double f);
53 53
54 void setTransform(const AffineTransform& other) { setMatrix(other.m_transfor m); }
55
54 void map(double x, double y, double& x2, double& y2) const; 56 void map(double x, double y, double& x2, double& y2) const;
55 57
56 // Rounds the mapped point to the nearest integer value. 58 // Rounds the mapped point to the nearest integer value.
57 IntPoint mapPoint(const IntPoint&) const; 59 IntPoint mapPoint(const IntPoint&) const;
58 60
59 FloatPoint mapPoint(const FloatPoint&) const; 61 FloatPoint mapPoint(const FloatPoint&) const;
60 62
61 IntSize mapSize(const IntSize&) const; 63 IntSize mapSize(const IntSize&) const;
62 64
63 FloatSize mapSize(const FloatSize&) const; 65 FloatSize mapSize(const FloatSize&) const;
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 if (m && m != m_transform) 175 if (m && m != m_transform)
174 memcpy(m_transform, m, sizeof(Transform)); 176 memcpy(m_transform, m, sizeof(Transform));
175 } 177 }
176 178
177 Transform m_transform; 179 Transform m_transform;
178 }; 180 };
179 181
180 } 182 }
181 183
182 #endif 184 #endif
OLDNEW
« no previous file with comments | « Source/core/svg/SVGGraphicsElement.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698