gecko-dev/layout/svg
Andrew Osmond 91b071ed14 Bug 1618345 - Enforce proper color management by splitting gfx::Color into sRGBColor and DeviceColor types. r=jrmuizel
gfx::Color is currently misused in many places. The DrawTargets expect
the color space to be in device space, e.g. what we are actually going
to draw using. Everything sitting above generally deals with sRGB, as
specified in CSS. Sometimes we missed the conversion from sRGB to device
space when issuing draw calls, and similarly sometimes we converted the
color to device space twice.

This patch splits the type in two. sRGBColor and DeviceColor now
represent sRGB and device color spaces respectively. DrawTarget only
accepts DeviceColor, and one can get a DeviceColor from an sRGBColor via
the ToDeviceColor helper API. The reftests now pass with color
management enabled for everything (e.g. CSS) instead of just tagged
raster images.

There will be a follow up patch to enable color management everywhere by
default on all supported platforms.

Differential Revision: https://phabricator.services.mozilla.com/D64771

--HG--
extra : moz-landing-system : lando
2020-03-09 14:16:17 +00:00
..
crashtests Bug 1605223. Handle SVG_FECOMPONENTTRANSFER_TYPE_UNKNOWN when computing webrender filter information for component transfer filters. r=mstange 2020-01-28 10:00:25 +00:00
tests Bug 1620542 - Automatically fix ESLint errors in .eslintrc.js files. r=mossop 2020-03-07 10:09:44 +00:00
AutoReferenceChainGuard.h
SVGContextPaint.cpp Bug 1618345 - Enforce proper color management by splitting gfx::Color into sRGBColor and DeviceColor types. r=jrmuizel 2020-03-09 14:16:17 +00:00
SVGContextPaint.h Bug 1618345 - Enforce proper color management by splitting gfx::Color into sRGBColor and DeviceColor types. r=jrmuizel 2020-03-09 14:16:17 +00:00
SVGFEContainerFrame.cpp
SVGFEImageFrame.cpp
SVGFELeafFrame.cpp Bug 1590639 part 5: Fix non-unified build issues in layout/svg. r=emilio 2019-10-23 08:16:45 +00:00
SVGFEUnstyledLeafFrame.cpp Bug 1590639 part 5: Fix non-unified build issues in layout/svg. r=emilio 2019-10-23 08:16:45 +00:00
SVGGeometryFrame.cpp Bug 1618345 - Enforce proper color management by splitting gfx::Color into sRGBColor and DeviceColor types. r=jrmuizel 2020-03-09 14:16:17 +00:00
SVGGeometryFrame.h Backed out changeset 6550b62f1fe7 (bug 1555356) for causing reftest failures in SVG files. 2020-02-14 23:59:09 +02:00
SVGImageContext.cpp Bug 1617425 - Use cbindgen for SVG lengths. r=jwatt 2020-02-23 15:43:03 +00:00
SVGImageContext.h
SVGObserverUtils.cpp Bug 1613985 - Use MOZ_COUNTED_DEFAULT_CTOR_*/MOZ_COUNTED_DTOR_* macros. r=froydnj 2020-02-20 11:40:14 +00:00
SVGObserverUtils.h Bug 1593222: part 12) Rename "nsNodeUtils.*" to "MutationObservers.*". r=smaug 2019-11-06 09:08:06 +00:00
SVGTextFrame.cpp Bug 1618345 - Enforce proper color management by splitting gfx::Color into sRGBColor and DeviceColor types. r=jrmuizel 2020-03-09 14:16:17 +00:00
SVGTextFrame.h Bug 1614165 part 1. Improve error messages for SVG text. r=emilio 2020-02-09 02:15:32 +00:00
SVGViewFrame.cpp
moz.build Backed out changeset 6550b62f1fe7 (bug 1555356) for causing reftest failures in SVG files. 2020-02-14 23:59:09 +02:00
nsCSSClipPathInstance.cpp Bug 1614510 - Split clip-path and shape-outside values. r=boris 2020-02-11 23:34:53 +00:00
nsCSSClipPathInstance.h Bug 1614510 - Split clip-path and shape-outside values. r=boris 2020-02-11 23:34:53 +00:00
nsCSSFilterInstance.cpp Bug 1618345 - Enforce proper color management by splitting gfx::Color into sRGBColor and DeviceColor types. r=jrmuizel 2020-03-09 14:16:17 +00:00
nsCSSFilterInstance.h Bug 1618345 - Enforce proper color management by splitting gfx::Color into sRGBColor and DeviceColor types. r=jrmuizel 2020-03-09 14:16:17 +00:00
nsFilterInstance.cpp Bug 1618345 - Enforce proper color management by splitting gfx::Color into sRGBColor and DeviceColor types. r=jrmuizel 2020-03-09 14:16:17 +00:00
nsFilterInstance.h Bug 1590639 part 5: Fix non-unified build issues in layout/svg. r=emilio 2019-10-23 08:16:45 +00:00
nsISVGSVGFrame.h
nsSVGAFrame.cpp Bug 1610387 - Remove nsAutoPtr usage from layout/. r=dbaron 2020-02-01 09:40:36 +00:00
nsSVGClipPathFrame.cpp Bug 1618345 - Enforce proper color management by splitting gfx::Color into sRGBColor and DeviceColor types. r=jrmuizel 2020-03-09 14:16:17 +00:00
nsSVGClipPathFrame.h
nsSVGContainerFrame.cpp Bug 1610387 - Remove nsAutoPtr usage from layout/. r=dbaron 2020-02-01 09:40:36 +00:00
nsSVGContainerFrame.h Bug 1610387 - Remove nsAutoPtr usage from layout/. r=dbaron 2020-02-01 09:40:36 +00:00
nsSVGDisplayableFrame.h
nsSVGFilterFrame.cpp
nsSVGFilterFrame.h
nsSVGFilterInstance.cpp
nsSVGFilterInstance.h
nsSVGFilterPaintCallback.h
nsSVGForeignObjectFrame.cpp Bug 1610387 - Remove nsAutoPtr usage from layout/. r=dbaron 2020-02-01 09:40:36 +00:00
nsSVGForeignObjectFrame.h Bug 1610387 - Remove nsAutoPtr usage from layout/. r=dbaron 2020-02-01 09:40:36 +00:00
nsSVGGFrame.cpp
nsSVGGFrame.h Bug 1610387 - Remove nsAutoPtr usage from layout/. r=dbaron 2020-02-01 09:40:36 +00:00
nsSVGGenericContainerFrame.cpp
nsSVGGenericContainerFrame.h
nsSVGGradientFrame.cpp Bug 1618345 - Enforce proper color management by splitting gfx::Color into sRGBColor and DeviceColor types. r=jrmuizel 2020-03-09 14:16:17 +00:00
nsSVGGradientFrame.h
nsSVGImageFrame.cpp Backed out changeset 6550b62f1fe7 (bug 1555356) for causing reftest failures in SVG files. 2020-02-14 23:59:09 +02:00
nsSVGImageFrame.h Backed out changeset 6550b62f1fe7 (bug 1555356) for causing reftest failures in SVG files. 2020-02-14 23:59:09 +02:00
nsSVGInnerSVGFrame.cpp
nsSVGInnerSVGFrame.h
nsSVGIntegrationUtils.cpp Bug 1618345 - Enforce proper color management by splitting gfx::Color into sRGBColor and DeviceColor types. r=jrmuizel 2020-03-09 14:16:17 +00:00
nsSVGIntegrationUtils.h
nsSVGMarkerFrame.cpp
nsSVGMarkerFrame.h
nsSVGMaskFrame.cpp Bug 1618345 - Enforce proper color management by splitting gfx::Color into sRGBColor and DeviceColor types. r=jrmuizel 2020-03-09 14:16:17 +00:00
nsSVGMaskFrame.h
nsSVGOuterSVGFrame.cpp Bug 1613985 - Use MOZ_COUNTED_DEFAULT_CTOR_*/MOZ_COUNTED_DTOR_* macros. r=froydnj 2020-02-20 11:40:14 +00:00
nsSVGOuterSVGFrame.h Bug 1610387 - Remove nsAutoPtr usage from layout/. r=dbaron 2020-02-01 09:40:36 +00:00
nsSVGPaintServerFrame.h
nsSVGPatternFrame.cpp Bug 1618345 - Enforce proper color management by splitting gfx::Color into sRGBColor and DeviceColor types. r=jrmuizel 2020-03-09 14:16:17 +00:00
nsSVGPatternFrame.h Bug 1610387 - Remove nsAutoPtr usage from layout/. r=dbaron 2020-02-01 09:40:36 +00:00
nsSVGStopFrame.cpp
nsSVGSwitchFrame.cpp Bug 1590639 part 5: Fix non-unified build issues in layout/svg. r=emilio 2019-10-23 08:16:45 +00:00
nsSVGSymbolFrame.cpp
nsSVGSymbolFrame.h
nsSVGUseFrame.cpp
nsSVGUseFrame.h
nsSVGUtils.cpp Bug 1618345 - Enforce proper color management by splitting gfx::Color into sRGBColor and DeviceColor types. r=jrmuizel 2020-03-09 14:16:17 +00:00
nsSVGUtils.h Bug 1617425 - Use cbindgen for SVG lengths. r=jwatt 2020-02-23 15:43:03 +00:00
nsSVGViewportFrame.cpp
nsSVGViewportFrame.h Bug 1610387 - Remove nsAutoPtr usage from layout/. r=dbaron 2020-02-01 09:40:36 +00:00
svg.css