[Win][Direct2D] Provide Direct2D-based geometry and transform cast operations
authorbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 13 Sep 2016 19:54:53 +0000 (19:54 +0000)
committerbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 13 Sep 2016 19:54:53 +0000 (19:54 +0000)
commit5ce6ca7b2f7d87140522e51d7bdd505393f3ec37
treef1419ac44da94bfdba7e532dc214346678ecb207
parent2e2b186034a71217d48ff87845ccc0a7134fd550
[Win][Direct2D] Provide Direct2D-based geometry and transform cast operations
https://bugs.webkit.org/show_bug.cgi?id=161818

Reviewed by Dean Jackson.

Source/WebCore:

Tested by new TestWebKitAPI tests.

Add new casting operators to and from various Direct2D data types.

* PlatformWin.cmake:
* platform/graphics/FloatPoint.h:
(WebCore::FloatPoint::FloatPoint):
* platform/graphics/FloatRect.h:
* platform/graphics/FloatSize.h:
(WebCore::FloatSize::FloatSize):
* platform/graphics/IntPoint.h:
* platform/graphics/IntRect.h:
* platform/graphics/IntSize.h:
* platform/graphics/transforms/AffineTransform.h:
* platform/graphics/transforms/TransformationMatrix.h:
* platform/graphics/win/FloatPointDirect2D.cpp:
* platform/graphics/win/FloatRectDirect2D.cpp:
* platform/graphics/win/FloatSizeDirect2D.cpp:
* platform/graphics/win/IntPointWin.cpp:
(WebCore::IntPoint::IntPoint):
(WebCore::IntPoint::operator D2D1_POINT_2F):
(WebCore::IntPoint::operator D2D1_POINT_2U):
* platform/graphics/win/IntRectWin.cpp:
(WebCore::IntRect::IntRect):
(WebCore::IntRect::operator D2D1_RECT_F):
(WebCore::IntRect::operator D2D1_RECT_U):
* platform/graphics/win/IntSizeWin.cpp:
(WebCore::IntSize::IntSize):
(WebCore::IntSize::operator D2D1_SIZE_U):
(WebCore::IntSize::operator D2D1_SIZE_F):
* platform/graphics/win/TransformationMatrixDirect2D.cpp: Added.
(WebCore::TransformationMatrix::TransformationMatrix):
(WebCore::TransformationMatrix::operator D2D1_MATRIX_3X2_F):
(WebCore::AffineTransform::AffineTransform):
(WebCore::AffineTransform::operator D2D1_MATRIX_3X2_F):

Source/WebKit:

* PlatformWin.cmake: Link to Direct2D on Windows.

Tools:

Add several new test suites for the various geometric primitives in WebCore.

* TestWebKitAPI/PlatformWin.cmake: Add new files for test cases.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: Ditto.
* TestWebKitAPI/Tests/WebCore/AffineTransform.cpp: Added.
* TestWebKitAPI/Tests/WebCore/FloatPoint.cpp: Added.
* TestWebKitAPI/Tests/WebCore/FloatRect.cpp: Added.
* TestWebKitAPI/Tests/WebCore/FloatSize.cpp: Added.
* TestWebKitAPI/Tests/WebCore/IntPoint.cpp: Added.
* TestWebKitAPI/Tests/WebCore/IntRect.cpp: Added.
* TestWebKitAPI/Tests/WebCore/IntSize.cpp: Added.
* TestWebKitAPI/Tests/WebCore/TransformationMatrix.cpp: Add some new
Windows-focused test cases.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@205871 268f45cc-cd09-0410-ab3c-d52691b4dbfc
30 files changed:
Source/WebCore/ChangeLog
Source/WebCore/PlatformWin.cmake
Source/WebCore/platform/graphics/FloatPoint.h
Source/WebCore/platform/graphics/FloatRect.h
Source/WebCore/platform/graphics/FloatSize.h
Source/WebCore/platform/graphics/IntPoint.h
Source/WebCore/platform/graphics/IntRect.h
Source/WebCore/platform/graphics/IntSize.h
Source/WebCore/platform/graphics/transforms/AffineTransform.h
Source/WebCore/platform/graphics/transforms/TransformationMatrix.h
Source/WebCore/platform/graphics/win/FloatPointDirect2D.cpp [new file with mode: 0644]
Source/WebCore/platform/graphics/win/FloatRectDirect2D.cpp [new file with mode: 0644]
Source/WebCore/platform/graphics/win/FloatSizeDirect2D.cpp [new file with mode: 0644]
Source/WebCore/platform/graphics/win/IntPointWin.cpp
Source/WebCore/platform/graphics/win/IntRectWin.cpp
Source/WebCore/platform/graphics/win/IntSizeWin.cpp
Source/WebCore/platform/graphics/win/TransformationMatrixDirect2D.cpp [new file with mode: 0644]
Source/WebKit/ChangeLog
Source/WebKit/PlatformWin.cmake
Tools/ChangeLog
Tools/TestWebKitAPI/PlatformWin.cmake
Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
Tools/TestWebKitAPI/Tests/WebCore/AffineTransform.cpp [new file with mode: 0644]
Tools/TestWebKitAPI/Tests/WebCore/FloatPoint.cpp [new file with mode: 0644]
Tools/TestWebKitAPI/Tests/WebCore/FloatRect.cpp [new file with mode: 0644]
Tools/TestWebKitAPI/Tests/WebCore/FloatSize.cpp [new file with mode: 0644]
Tools/TestWebKitAPI/Tests/WebCore/IntPoint.cpp [new file with mode: 0644]
Tools/TestWebKitAPI/Tests/WebCore/IntRect.cpp [new file with mode: 0644]
Tools/TestWebKitAPI/Tests/WebCore/IntSize.cpp [new file with mode: 0644]
Tools/TestWebKitAPI/Tests/WebCore/TransformationMatrix.cpp