[Windows][DirectX] Be more rigors about BeginFigure/EndFigure and Close operations.
authorbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 9 Nov 2018 17:32:32 +0000 (17:32 +0000)
committerbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 9 Nov 2018 17:32:32 +0000 (17:32 +0000)
commit9f99a01cf21953e4560382c281e35ad65aefc3e5
treeb93ee630a11569b0238a5ac7d62166008038bd72
parentaa318d1025b335c7c380beaf13bc8e7618ea1aaa
[Windows][DirectX] Be more rigors about BeginFigure/EndFigure and Close operations.
https://bugs.webkit.org/show_bug.cgi?id=191452
<rdar://problem/45933964>

Reviewed by Zalan Bujtas.

Do a better job of balancing the BeginFigure/EndFigure calls in
the PathDirect2D implementation. Failure to do so puts the Geometry sink
into an error state that prevents it from producing drawing output.

* platform/graphics/Path.h:
* platform/graphics/win/GraphicsContextDirect2D.cpp:
(WebCore::GraphicsContext::drawPath): Flush is needed here.
(WebCore::GraphicsContext::fillPath): Ditto.
(WebCore::GraphicsContext::strokePath): Ditto.
* platform/graphics/win/PathDirect2D.cpp:
(WebCore::Path::drawDidComplete):
(WebCore::Path::closeAnyOpenGeometries):
(WebCore::Path::transform):
(WebCore::Path::openFigureAtCurrentPointIfNecessary):
(WebCore::Path::moveTo):
(WebCore::Path::closeSubpath):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238037 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/Path.h
Source/WebCore/platform/graphics/win/GraphicsContextDirect2D.cpp
Source/WebCore/platform/graphics/win/PathDirect2D.cpp