Bug 44983
| Summary: | Reorganize Geometry and Math classes | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Chris Marrin <cmarrin> |
| Component: | Platform | Assignee: | Nobody <webkit-unassigned> |
| Status: | NEW | ||
| Severity: | Normal | CC: | crogers, eric.carlson, eric, jamesr, kbr, senorblanco |
| Priority: | P2 | ||
| Version: | 528+ (Nightly build) | ||
| Hardware: | PC | ||
| OS: | OS X 10.5 | ||
Chris Marrin
We've been having an ongoing discussion about pulling together all the geometry related classes (FloatPoint, TransformationMatrix, etc.) into a single place. I propose to make this place WebCore/platform/graphics/math. I propose move these classes:
FloatPoint
FloatPoint3D
FloatQuad
FloatRect
FloatSize
IntPoint
IntRect
IntSize
TransformationMatrix
AffineTransform
There may be others scattered around.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Kenneth Russell
platform/graphics/math is too specific a directory name; at least some of these classes need to be referenced from the ongoing web audio work. I would suggest platform/math.
We'll also want to move wtf/Vector3 and wtf/Complex here.
Chris Marrin
(In reply to comment #1)
> platform/graphics/math is too specific a directory name; at least some of these classes need to be referenced from the ongoing web audio work. I would suggest platform/math.
>
> We'll also want to move wtf/Vector3 and wtf/Complex here.
Ok, platform/math seems reasonable. We should get rid of wtf/Vector3 and replace it with FloatPoint3D once you add cross/dot/etc. to it. And Complex is just a simple audio specific wrapper around std::complex, which I think should go into platform/audio directly. I've opened a bug for this work:
https://bugs.webkit.org/show_bug.cgi?id=44991
Ken, can you add the bug number for the FloatPoint3D work and make the above bug depend on it?
Chris Rogers
I don't really care that much where Complex.h lives, but Complex::complexFromMagnitudePhase() is kind of general from a mathematical point of view, even if graphics doesn't really have a use for it.
Kenneth Russell
(In reply to comment #2)
> (In reply to comment #1)
> > platform/graphics/math is too specific a directory name; at least some of these classes need to be referenced from the ongoing web audio work. I would suggest platform/math.
> >
> > We'll also want to move wtf/Vector3 and wtf/Complex here.
>
> Ok, platform/math seems reasonable. We should get rid of wtf/Vector3 and replace it with FloatPoint3D once you add cross/dot/etc. to it. And Complex is just a simple audio specific wrapper around std::complex, which I think should go into platform/audio directly. I've opened a bug for this work:
>
> https://bugs.webkit.org/show_bug.cgi?id=44991
>
> Ken, can you add the bug number for the FloatPoint3D work and make the above bug depend on it?
44991 now depends on 44970, which has already been fixed.