Move code that maps a CompositeOperator and BlendMode to a CGBlendMode into a helper...
authorsimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 5 Nov 2017 05:40:16 +0000 (05:40 +0000)
committersimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 5 Nov 2017 05:40:16 +0000 (05:40 +0000)
commitcd4141a1800dc72739d0c2d1b4cbb3bbc309ab8d
tree5df196bfe8bb14a016af49d8e737fe6a6c14018c
parentfe23fe09e2e0b90628ffd05ca0015d2b62cc36c6
Move code that maps a CompositeOperator and BlendMode to a CGBlendMode into a helper function
https://bugs.webkit.org/show_bug.cgi?id=179290

Reviewed by Darin Adler.

Move the code, and use nested switch rather than conditionals.

* platform/graphics/GraphicsTypes.h:
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::compositeAndBlendToCGBlendMode):
(WebCore::GraphicsContext::setPlatformCompositeOperation):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@224465 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/GraphicsTypes.h
Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp