| Index: Source/platform/graphics/ColorSpace.h
|
| diff --git a/Source/platform/graphics/ColorSpace.h b/Source/platform/graphics/ColorSpace.h
|
| index 06918f7ff1f9217d43aca2426ab69fdd4597a244..9b1735a24638ba163f2d14abc68f367690d7059d 100644
|
| --- a/Source/platform/graphics/ColorSpace.h
|
| +++ b/Source/platform/graphics/ColorSpace.h
|
| @@ -27,6 +27,7 @@
|
| #define ColorSpace_h
|
|
|
| #include "platform/PlatformExport.h"
|
| +#include "platform/graphics/Color.h"
|
|
|
| namespace WebCore {
|
|
|
| @@ -36,6 +37,20 @@ enum ColorSpace {
|
| ColorSpaceLinearRGB
|
| };
|
|
|
| +namespace ColorSpaceUtilities {
|
| +
|
| +// Get a pointer to a 8-bit lookup table that will convert color components
|
| +// in the |srcColorSpace| to the |dstColorSpace|.
|
| +// If the conversion cannot be performed, or is a no-op (identity transform),
|
| +// then 0 is returned.
|
| +// (Note that a round-trip - f(B,A)[f(A,B)[x]] - is not lossless in general.)
|
| +const uint8_t* getConversionLUT(ColorSpace dstColorSpace, ColorSpace srcColorSpace = ColorSpaceDeviceRGB);
|
| +
|
| +// Convert a Color assumed to be in the |srcColorSpace| into the |dstColorSpace|.
|
| +Color convertColor(const Color& srcColor, ColorSpace dstColorSpace, ColorSpace srcColorSpace = ColorSpaceDeviceRGB);
|
| +
|
| +} // namespace ColorSpaceUtilities
|
| +
|
| } // namespace WebCore
|
|
|
| #endif // ColorSpace_h
|
|
|