Bug 27844 - SVG Filter and linearRGB, sRGB platform support
Summary: SVG Filter and linearRGB, sRGB platform support
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Dirk Schulze
URL:
Keywords:
Depends on:
Blocks: 68469 6033 26389
  Show dependency treegraph
 
Reported: 2009-07-30 11:34 PDT by Dirk Schulze
Modified: 2014-05-12 05:54 PDT (History)
5 users (show)

See Also:


Attachments
linearRGB, sRGB support for platforms (31.27 KB, patch)
2009-07-30 11:45 PDT, Dirk Schulze
oliver: review+
Details | Formatted Diff | Diff
linearRGB, sRGB support for platforms (without code duplication) (30.97 KB, patch)
2009-08-03 12:02 PDT, Dirk Schulze
oliver: review+
Details | Formatted Diff | Diff
linearRGB, sRGB support for platforms (without code duplication) (30.98 KB, patch)
2009-08-03 12:16 PDT, Dirk Schulze
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dirk Schulze 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.
Comment 1 Dirk Schulze 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.
Comment 2 Eric Seidel (no email) 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.
Comment 3 Oliver Hunt 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.
Comment 4 Adam Barth 2009-07-31 22:07:09 PDT
Assigning to Dirk for landing.
Comment 5 Dirk Schulze 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
Comment 6 Oliver Hunt 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
Comment 7 Dirk Schulze 2009-08-03 12:16:37 PDT
Created attachment 33996 [details]
linearRGB, sRGB support for platforms (without code duplication)

(no tabs)
Comment 8 Dirk Schulze 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.
Comment 9 Dirk Schulze 2009-08-08 13:03:24 PDT
landed in r46956.
Comment 10 Dimitri Glazkov (Google) 2009-08-08 18:32:15 PDT
Chromium build fix landed as http://trac.webkit.org/changeset/46961.