We need at least support for linearRGB and sRGB on platforms to change the color space on SVG Filters.
Created attachment 33796 [details] linearRGB, sRGB support for platforms This is an inital patch to add support of linearRGB as well as sRGB. It uses the native version of color space transformations from platforms if available.
Comment on attachment 33796 [details] linearRGB, sRGB support for platforms I'm not sure this is the right colorspace abstraction. it seems very specific to images, where it should probably be based off of another colorspace or Color class in platform. See bug 20558.
Comment on attachment 33796 [details] linearRGB, sRGB support for platforms > +void ImageBuffer::transformColorSpace(ImageColorSpace srcColorSpace, ImageColorSpace dstColorSpace) > +{ ... > + if (dstColorSpace == LinearRGB) { > + if (m_linearRgbLUT.isEmpty()) { ... > + lookUpTable = m_linearRgbLUT; > + } > + if (dstColorSpace == DeviceRGB) { ... > + } should be 'else if' here > + case LinearRGB: > + colorSpace = CGColorSpaceCreateWithName(kCGColorSpaceGenericRGBLinear); indenting :D I share eric's concern about the placement of the colour matching logic -- logically it should be in GraphicsContext, but i don't think it's feasible to do the required logic to ensure that behaviour is correct outside of the underlying graphics library so this placement seems the only place it can really go for now.
Assigning to Dirk for landing.
Created attachment 33994 [details] linearRGB, sRGB support for platforms (without code duplication) same code as above, moved the calculation of the lut's into a new file ImageBuffer.cpp
Comment on attachment 33994 [details] linearRGB, sRGB support for platforms (without code duplication) r=me fix the tabs
Created attachment 33996 [details] linearRGB, sRGB support for platforms (without code duplication) (no tabs)
I'll upload the patch as soon as possible. run-webkit-test is not working for me at the moment and I don't want to upload untested (by layouttests) patches to the tree.
landed in r46956.
Chromium build fix landed as http://trac.webkit.org/changeset/46961.