Make CanvasStyle's CMYKAValues allocated on the heap and move the pointer in the...
authorbenjamin@webkit.org <benjamin@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 8 May 2013 03:18:12 +0000 (03:18 +0000)
committerbenjamin@webkit.org <benjamin@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 8 May 2013 03:18:12 +0000 (03:18 +0000)
commit6bc96039830aeda5882e1a02e370f76bd8a8ff3f
tree7dbd20f442c6d07784f5947d590bb9e0c368f09c
parent61d3322613b40a49045f6c194ab1fb8a5c8b257d
Make CanvasStyle's CMYKAValues allocated on the heap and move the pointer in the union.
https://bugs.webkit.org/show_bug.cgi?id=115764

Patch by Benjamin Poulain <bpoulain@apple.com> on 2013-05-07
Reviewed by Andreas Kling.

CMYKA input is uncommon enough that we should not pay the price for
every CanvasStyle.
Make those values heap allocated and put the pointer in the union. Since
the RGBA32 values are needed for CMYKA, a RGBA32 value is added to the structure.

* html/canvas/CanvasStyle.cpp:
(WebCore::CanvasStyle::CanvasStyle):
(WebCore::CanvasStyle::~CanvasStyle):
(WebCore::CanvasStyle::isEquivalentColor):
(WebCore::CanvasStyle::isEquivalentCMYKA):
(WebCore::CanvasStyle::applyStrokeColor):
(WebCore::CanvasStyle::applyFillColor):
* html/canvas/CanvasStyle.h:
(CanvasStyle):
(CMYKAValues):
(WebCore::CanvasStyle::CMYKAValues::CMYKAValues):
(WebCore::CanvasStyle::color):
(WebCore):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@149710 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/html/canvas/CanvasStyle.cpp
Source/WebCore/html/canvas/CanvasStyle.h