Instead of creating a Path object from the non animating pathByteStream() every time we need to updatePathFromPathElement(), the Path object can be cached once it is created and used for later calls.
Created attachment 323775[details]
Archive of layout-test-results from ews100 for mac-elcapitan
The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews100 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Created attachment 323784[details]
Archive of layout-test-results from ews100 for mac-elcapitan
The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews100 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Created attachment 323787[details]
Archive of layout-test-results from ews104 for mac-elcapitan-wk2
The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews104 Port: mac-elcapitan-wk2 Platform: Mac OS X 10.11.6
Created attachment 323790[details]
Archive of layout-test-results from ews117 for mac-elcapitan
The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews117 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Created attachment 323792[details]
Archive of layout-test-results from ews126 for ios-simulator-wk2
The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews126 Port: ios-simulator-wk2 Platform: Mac OS X 10.12.6
Created attachment 323836[details]
Archive of layout-test-results from ews102 for mac-elcapitan
The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews102 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Created attachment 323837[details]
Archive of layout-test-results from ews104 for mac-elcapitan-wk2
The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews104 Port: mac-elcapitan-wk2 Platform: Mac OS X 10.11.6
Created attachment 323838[details]
Archive of layout-test-results from ews117 for mac-elcapitan
The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews117 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Created attachment 323839[details]
Archive of layout-test-results from ews126 for ios-simulator-wk2
The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews126 Port: ios-simulator-wk2 Platform: Mac OS X 10.12.6
Comment on attachment 323875[details]
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=323875&action=review>> Source/WebCore/platform/graphics/cg/PathCG.cpp:119
>> + other.m_path = nullptr;
>
> Can this just be m_path = WTFMove(other.m_path)?
A raw pointer does not necessarily represent an ownership relationship. So WTFMove() or std::move does not set the raw pointer to nullptr after moving it. m_path = WTFMove(other.m_path) can only work if PlatformPathPtr is a std::unique_ptr<> or a RefPtr<>.
>> Source/WebCore/rendering/svg/SVGPathData.cpp:49
>> + return path;
>
> Maybe return { } and move the declaration of path lower down.
Done.
Comment on attachment 323875[details]
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=323875&action=review>>> Source/WebCore/platform/graphics/cg/PathCG.cpp:119
>>> + other.m_path = nullptr;
>>
>> Can this just be m_path = WTFMove(other.m_path)?
>
> A raw pointer does not necessarily represent an ownership relationship. So WTFMove() or std::move does not set the raw pointer to nullptr after moving it. m_path = WTFMove(other.m_path) can only work if PlatformPathPtr is a std::unique_ptr<> or a RefPtr<>.
For raw pointers, a good idiom is:
m_path = std::exchange(other.m_path, nullptr);
2017-10-13 15:18 PDT, Said Abou-Hallawa
2017-10-13 17:06 PDT, Build Bot
2017-10-13 17:06 PDT, Said Abou-Hallawa
2017-10-13 18:33 PDT, Build Bot
2017-10-13 18:49 PDT, Build Bot
2017-10-13 19:24 PDT, Build Bot
2017-10-13 19:59 PDT, Build Bot
2017-10-14 21:06 PDT, Said Abou-Hallawa
2017-10-14 22:22 PDT, Build Bot
2017-10-14 22:23 PDT, Build Bot
2017-10-14 22:33 PDT, Build Bot
2017-10-14 22:44 PDT, Build Bot
2017-10-15 23:40 PDT, Said Abou-Hallawa
2017-10-20 18:26 PDT, Said Abou-Hallawa