Avoid a hash lookup in FilterInfo::remove()
authorsimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 8 Aug 2017 02:52:05 +0000 (02:52 +0000)
committersimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 8 Aug 2017 02:52:05 +0000 (02:52 +0000)
commit7e58f36d3313c45729afabafc88f1bf677c31684
treeed0e1978121723d17275abd8df2ff817fd806a82
parentc7867dcc7939984c4cb3328d6e137f1067148f5c
Avoid a hash lookup in FilterInfo::remove()
https://bugs.webkit.org/show_bug.cgi?id=175301

Reviewed by Sam Weinig.

FilterInfo::remove() always called map().remove(&layer)), even when layer.m_hasFilterInfo
was false (and even asserted that layer.m_hasFilterInfo == map().contains(&layer)).

So we can early return if layer.m_hasFilterInfo is false.

* rendering/RenderLayerFilterInfo.cpp:
(WebCore::RenderLayer::FilterInfo::getIfExists):
(WebCore::RenderLayer::FilterInfo::remove):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@220380 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderLayerFilterInfo.cpp