Bug 44983 - Reorganize Geometry and Math classes
Summary: Reorganize Geometry and Math classes
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Platform (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-31 14:02 PDT by Chris Marrin
Modified: 2010-08-31 15:24 PDT (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Marrin 2010-08-31 14:02:32 PDT
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.
Comment 1 Kenneth Russell 2010-08-31 14:23:08 PDT
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.
Comment 2 Chris Marrin 2010-08-31 14:42:38 PDT
(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?
Comment 3 Chris Rogers 2010-08-31 15:16:25 PDT
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.
Comment 4 Kenneth Russell 2010-08-31 15:24:39 PDT
(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.