RESOLVED FIXED 27844
SVG Filter and linearRGB, sRGB platform support
https://bugs.webkit.org/show_bug.cgi?id=27844
Summary SVG Filter and linearRGB, sRGB platform support
Dirk Schulze
Reported 2009-07-30 11:34:23 PDT
We need at least support for linearRGB and sRGB on platforms to change the color space on SVG Filters.
Attachments
linearRGB, sRGB support for platforms (31.27 KB, patch)
2009-07-30 11:45 PDT, Dirk Schulze
oliver: review+
linearRGB, sRGB support for platforms (without code duplication) (30.97 KB, patch)
2009-08-03 12:02 PDT, Dirk Schulze
oliver: review+
linearRGB, sRGB support for platforms (without code duplication) (30.98 KB, patch)
2009-08-03 12:16 PDT, Dirk Schulze
no flags
Dirk Schulze
Comment 1 2009-07-30 11:45:52 PDT
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.
Eric Seidel (no email)
Comment 2 2009-07-31 15:15:10 PDT
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.
Oliver Hunt
Comment 3 2009-07-31 16:14:25 PDT
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.
Adam Barth
Comment 4 2009-07-31 22:07:09 PDT
Assigning to Dirk for landing.
Dirk Schulze
Comment 5 2009-08-03 12:02:41 PDT
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
Oliver Hunt
Comment 6 2009-08-03 12:09:32 PDT
Comment on attachment 33994 [details] linearRGB, sRGB support for platforms (without code duplication) r=me fix the tabs
Dirk Schulze
Comment 7 2009-08-03 12:16:37 PDT
Created attachment 33996 [details] linearRGB, sRGB support for platforms (without code duplication) (no tabs)
Dirk Schulze
Comment 8 2009-08-04 11:08:39 PDT
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.
Dirk Schulze
Comment 9 2009-08-08 13:03:24 PDT
landed in r46956.
Dimitri Glazkov (Google)
Comment 10 2009-08-08 18:32:15 PDT
Chromium build fix landed as http://trac.webkit.org/changeset/46961.
Note You need to log in before you can comment on or make changes to this bug.