gecko-dev/image
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
..
build Bug 1357107 - Move the handling of the permissions.default.image pref to ImageBlocker.cpp. Original patch by ehsan. r=bzbarsky 2020-01-22 10:45:15 +00:00
decoders Bug 1619946 - Ensure PNG decoder does not recreate sRGB transforms unnecessarily. r=tnikkel 2020-03-05 11:51:15 +00:00
encoders Bug 1552317 - Fix codespell errors for image/. r=tnikkel 2019-09-12 09:00:52 +00:00
test 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
AnimationFrameBuffer.cpp Bug 1612589 - Improve image memory reporting even further. r=tnikkel 2020-02-05 22:22:13 +00:00
AnimationFrameBuffer.h
AnimationParams.h
AnimationSurfaceProvider.cpp Bug 1570499 - Part 1: Replace MOZ_FALLTHROUGH macro with C++17's [[fallthrough]] attribute. r=froydnj 2019-12-20 07:16:43 +00:00
AnimationSurfaceProvider.h
BMPHeaders.h Bug 1615394 - Add color management support to the BMP decoder. r=tnikkel 2020-03-03 14:16:00 +00:00
ClippedImage.cpp Bug 1609996 - Reorder some includes affected by the previous patches. r=froydnj 2020-01-20 16:19:48 +00:00
ClippedImage.h Bug 1547792 - AspectRatio should be a single ratio, not a size. r=dholbert 2019-05-02 23:28:21 +00:00
CopyOnWrite.h
DecodedSurfaceProvider.cpp Bug 1563139 - Remove StaticPrefs.h. r=glandium 2019-07-26 01:10:23 +00:00
DecodedSurfaceProvider.h
DecodePool.cpp Bug 1602710 - Do not shut down threads not found in the image decode thread pool. r=tnikkel 2020-01-06 23:40:08 +00:00
DecodePool.h
Decoder.cpp Bug 1255105 - Use SurfacePipe in the BMP decoder. r=tnikkel 2020-03-02 23:24:12 +00:00
Decoder.h Bug 1615394 - Add color management support to the BMP decoder. r=tnikkel 2020-03-03 14:16:00 +00:00
DecoderFactory.cpp Bug 1561491 - Make image.* static prefs follow the naming convention. r=KrisWright 2019-06-26 13:24:21 +10:00
DecoderFactory.h
DecoderFlags.h
Downscaler.cpp Bug 1550422 - P23. Remove now unused gfxPrefs. r=jrmuizel 2019-05-26 14:31:53 +00:00
Downscaler.h
DownscalingFilter.h Bug 1594425 - Part 2. Switch image decoders to use SurfaceFormat::OS_RGBA. r=tnikkel 2019-11-12 18:22:33 +00:00
DynamicImage.cpp Bug 1594425 - Part 2. Switch image decoders to use SurfaceFormat::OS_RGBA. r=tnikkel 2019-11-12 18:22:33 +00:00
DynamicImage.h
FrameAnimator.cpp Bug 1609996 - Reorder some includes affected by the previous patches. r=froydnj 2020-01-20 16:19:48 +00:00
FrameAnimator.h Bug 1613985 - Use MOZ_COUNTED_DEFAULT_CTOR_*/MOZ_COUNTED_DTOR_* macros. r=froydnj 2020-02-20 11:40:14 +00:00
FrameTimeout.h
FrozenImage.cpp Bug 1550523 - Ensure that decoding methods for frozen images request the correct frame. r=tnikkel 2019-05-22 06:22:50 -04:00
FrozenImage.h Bug 1550523 - Ensure that decoding methods for frozen images request the correct frame. r=tnikkel 2019-05-22 06:22:50 -04:00
ICOFileHeaders.h
IDecodingTask.cpp Bug 1550422 - P23. Remove now unused gfxPrefs. r=jrmuizel 2019-05-26 14:31:53 +00:00
IDecodingTask.h Bug 1609815 - Remove Web Replay C++ implementation. r=jgilbert,jandem,gbrown 2020-02-27 17:39:15 +00:00
Image.cpp Bug 1610381 - Part 3. Improve image memory reporting by including validation state. r=jrmuizel 2020-01-21 16:32:11 +00:00
Image.h Bug 1612589 - Improve image memory reporting even further. r=tnikkel 2020-02-05 22:22:13 +00:00
ImageBlocker.cpp Bug 1357107 - Move the handling of the permissions.default.image pref to ImageBlocker.cpp. Original patch by ehsan. r=bzbarsky 2020-01-22 10:45:15 +00:00
ImageBlocker.h Bug 1357107 - Move the handling of the permissions.default.image pref to ImageBlocker.cpp. Original patch by ehsan. r=bzbarsky 2020-01-22 10:45:15 +00:00
ImageCacheKey.cpp Bug 1609996 - Reorder some includes affected by the previous patches. r=froydnj 2020-01-20 16:19:48 +00:00
ImageCacheKey.h Bug 1558915 - Use infallible nsIURI::SchemeIs in image/ r=tnikkel 2019-08-03 09:44:12 +00:00
ImageFactory.cpp Bug 1600545 - Remove useless inclusions of header files generated from IDL files in accessible/, browser/, caps/, chrome/, devtools/, docshell/, editor/, extensions/, gfx/, hal/, image/, intl/, ipc/, js/, layout/, and media/ r=Ehsan 2019-12-06 09:16:44 +00:00
ImageFactory.h
ImageLogging.h
ImageMemoryReporter.cpp Bug 1563139 - Remove StaticPrefs.h. r=glandium 2019-07-26 01:10:23 +00:00
ImageMemoryReporter.h Bug 1552317 - Fix codespell errors for image/. r=tnikkel 2019-09-12 09:00:52 +00:00
ImageMetadata.h
ImageOps.cpp Bug 1545567 - Ensure ImageOps decode methods can handle unbuffered input streams properly. r=baku 2019-04-26 11:58:24 -04:00
ImageOps.h Bug 1613985 - Use default for equivalent-to-default constructors/destructors in image. r=tnikkel 2020-03-04 09:09:43 +00:00
ImageRegion.h
ImageWrapper.cpp Bug 1550523 - Ensure that decoding methods for frozen images request the correct frame. r=tnikkel 2019-05-22 06:22:50 -04:00
ImageWrapper.h
ImgDrawResult.h Bug 1614198 - Use cbindgen instead of nsStyleImage. r=aosmond 2020-02-11 20:56:20 +00:00
imgFrame.cpp Bug 1617880 - Make RecyclingSourceSurface use NotNull for member pointers. r=tnikkel 2020-02-25 17:20:43 +00:00
imgFrame.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
imgICache.idl
imgIContainer.idl Bug 1610381 - Part 2. Improve image memory reporting with more state information. r=jrmuizel 2020-01-21 14:39:59 +00:00
imgIContainerDebug.idl
imgIEncoder.idl
imgILoader.idl Bug 1552317 - Fix codespell errors for image/. r=tnikkel 2019-09-12 09:00:52 +00:00
imgINotificationObserver.idl
imgIRequest.idl Bug 1554847 - Improve cross-origin checks in canvas API - imgIRequest.hadCrossOriginRedirects, r=aosmond 2019-06-04 06:31:42 +00:00
imgIScriptedNotificationObserver.idl
imgITools.idl Bug 1530402 - Provide imgTools.decodeFromChannelAsync. r=aosmond,snorp 2019-11-18 16:48:53 +00:00
imgLoader.cpp Bug 1616570 - Part 1: Rename CookieSettings to CookieJarSettings. r=Ehsan 2020-03-04 08:59:08 +00:00
imgLoader.h Bug 1613985 - Use default for equivalent-to-default constructors/destructors in image. r=tnikkel 2020-03-04 09:09:43 +00:00
imgRequest.cpp Bug 1558915 - Use infallible nsIURI::SchemeIs everywhere. r=smaug 2019-08-09 15:17:06 +00:00
imgRequest.h Bug 1580820. Update the inner window id as well as the context (document) pointer on an imgRequest if we validate it for that document/inner window id. r=aosmond 2019-09-17 13:16:19 +00:00
imgRequestProxy.cpp Bug 1609996 - Reorder some includes affected by the previous patches. r=froydnj 2020-01-20 16:19:48 +00:00
imgRequestProxy.h Bug 1552317 - Fix codespell errors for image/. r=tnikkel 2019-09-12 09:00:52 +00:00
imgTools.cpp Bug 1611415 - Prefer using std::move over forget. r=froydnj 2020-02-13 14:38:48 +00:00
imgTools.h
IProgressObserver.h Bug 1613985 - Use default for equivalent-to-default constructors/destructors in image. r=tnikkel 2020-03-04 09:09:43 +00:00
ISurfaceProvider.h
LookupResult.h Bug 1609996 - Reorder some includes affected by the previous patches. r=froydnj 2020-01-20 16:19:48 +00:00
moz.build Bug 1357107 - Move the handling of the permissions.default.image pref to ImageBlocker.cpp. Original patch by ehsan. r=bzbarsky 2020-01-22 10:45:15 +00:00
MultipartImage.cpp
MultipartImage.h
nsIIconURI.idl
Orientation.h
OrientedImage.cpp Bug 1594425 - Part 2. Switch image decoders to use SurfaceFormat::OS_RGBA. r=tnikkel 2019-11-12 18:22:33 +00:00
OrientedImage.h Bug 1547792 - AspectRatio should be a single ratio, not a size. r=dholbert 2019-05-02 23:28:21 +00:00
PlaybackType.h
ProgressTracker.cpp Bug 1600545 - Remove useless inclusions of header files generated from IDL files in accessible/, browser/, caps/, chrome/, devtools/, docshell/, editor/, extensions/, gfx/, hal/, image/, intl/, ipc/, js/, layout/, and media/ r=Ehsan 2019-12-06 09:16:44 +00:00
ProgressTracker.h Bug 1552317 - Fix codespell errors for image/. r=tnikkel 2019-09-12 09:00:52 +00:00
RasterImage.cpp Bug 1609996 - Reorder some includes affected by the previous patches. r=froydnj 2020-01-20 16:19:48 +00:00
RasterImage.h Bug 1600545 - Remove useless inclusions of header files generated from IDL files in accessible/, browser/, caps/, chrome/, devtools/, docshell/, editor/, extensions/, gfx/, hal/, image/, intl/, ipc/, js/, layout/, and media/ r=Ehsan 2019-12-06 09:16:44 +00:00
RecyclingSourceSurface.h Bug 1617880 - Make RecyclingSourceSurface use NotNull for member pointers. r=tnikkel 2020-02-25 17:20:43 +00:00
ScriptedNotificationObserver.cpp
ScriptedNotificationObserver.h
ShutdownTracker.cpp
ShutdownTracker.h
SourceBuffer.cpp
SourceBuffer.h Bug 1609996 - Reorder some includes affected by the previous patches. r=froydnj 2020-01-20 16:19:48 +00:00
StreamingLexer.h Bug 1609996 - Reorder some includes affected by the previous patches. r=froydnj 2020-01-20 16:19:48 +00:00
SurfaceCache.cpp Bug 1609815 - Remove Web Replay C++ implementation. r=jgilbert,jandem,gbrown 2020-02-27 17:39:15 +00:00
SurfaceCache.h Bug 1543584 - Always rasterize SVGs but clamp the maximum size. r=tnikkel 2019-04-18 14:35:58 -04:00
SurfaceCacheUtils.cpp
SurfaceCacheUtils.h
SurfaceFilters.h Bug 1609996 - Remove mozilla::Swap in favor of std::swap. r=froydnj 2020-01-20 16:17:06 +00:00
SurfaceFlags.h
SurfacePipe.cpp Bug 1551088 - Part 5. Expose SurfaceFilter input row directly to avoid copy if possible. r=tnikkel 2019-10-02 13:37:28 +00:00
SurfacePipe.h Bug 1609996 - Reorder some includes affected by the previous patches. r=froydnj 2020-01-20 16:19:48 +00:00
SurfacePipeFactory.h Bug 1594425 - Part 2. Switch image decoders to use SurfaceFormat::OS_RGBA. r=tnikkel 2019-11-12 18:22:33 +00:00
SVGDocumentWrapper.cpp Bug 1523638 - Part 9: Use provided 'WindowGlobalChild' actors to create the initial about:blank document, r=kmag 2019-08-08 16:07:12 +00:00
SVGDocumentWrapper.h Bug 1544215 - Make nsIContentVewer::GetPresShell() return mozilla::PresShell instead of nsIPresShell r=bzbarsky 2019-04-16 02:47:26 +00:00
SVGDrawingParameters.h
VectorImage.cpp Bug 1610165 - Failing to insert an SVG into the surface cache continuously repaints the image. r=tnikkel 2020-01-19 23:02:52 +00:00
VectorImage.h Bug 1598480 - Make SVG images respond to theme changes. r=tnikkel,emilio 2019-12-13 02:04:07 +00:00