New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 667411 link

Starred by 4 users

Issue metadata

Status: WontFix
Owner:
Closed: Mar 2017
Cc:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug


Sign in to add a comment

Make blink::GraphicsLayer pre-convert all raster input to a coherent color space

Project Member Reported by ccameron@chromium.org, Nov 21 2016

Issue description

blink::GraphicsLayer does not coherently handle color.
- its CSS colors are sRGB
- some of its images are sRGB
- some of its images are output color space

In legacy mode, we will pre-convert all input colors (CSS colors and images) to the output color space. At rasterization time we will do no color correction, and we will interpret the resulting cc::Resource as being in the color space that all inputs were pre-converted to.

In color correct rasterization (aka true color mode), we can just tag all images with their color space, and the result will be color correct at raster time.

See details in:
https://docs.google.com/document/d/1BMyXXTmiAragmt5ukVBIIOLDthd7JcJBgGMt-PwuTHY/edit#

This bug is to cover:
- adding pre-conversion of inputs to blink::GraphicsLayer
- plumbing this "implied" color space through from blink::GraphicsLayer to the cc::Resource


 
Blockedon: 667420
Blocking: 667431
Blocking: -44872
Project Member

Comment 4 by bugdroid1@chromium.org, Nov 30 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b7210d35c666575a48ed600d7758c451220b09b8

commit b7210d35c666575a48ed600d7758c451220b09b8
Author: ccameron <ccameron@chromium.org>
Date: Wed Nov 30 11:02:40 2016

Raster: Allow a RasterSource to specify its color space

The pictures recorded by GraphicsLayers in Blink have a particular
implied color space in the recorded content. This is the color space
that the decoded images are in (and soon to be the color space that
CSS colors are converted into from sRGB).

We need to communicate that information from Blink to cc, so that
the resulting cc::Resources can be tagged with the appropriate color
space.

Plumb this through the same channel in WebDisplayItemList that is
used for "IsSuitableForGpuRasterization".

Of note is that "true color mode" content (content that does linear
blending) has the luxury of being able to decide the target color
space at raster time -- it does not have an implied color space.

BUG= 667411 
CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel

Review-Url: https://codereview.chromium.org/2525453002
Cr-Commit-Position: refs/heads/master@{#435212}

[modify] https://crrev.com/b7210d35c666575a48ed600d7758c451220b09b8/cc/blink/web_display_item_list_impl.cc
[modify] https://crrev.com/b7210d35c666575a48ed600d7758c451220b09b8/cc/blink/web_display_item_list_impl.h
[modify] https://crrev.com/b7210d35c666575a48ed600d7758c451220b09b8/cc/playback/display_item_list.h
[modify] https://crrev.com/b7210d35c666575a48ed600d7758c451220b09b8/cc/playback/raster_source.cc
[modify] https://crrev.com/b7210d35c666575a48ed600d7758c451220b09b8/cc/playback/raster_source.h
[modify] https://crrev.com/b7210d35c666575a48ed600d7758c451220b09b8/cc/raster/bitmap_raster_buffer_provider.cc
[modify] https://crrev.com/b7210d35c666575a48ed600d7758c451220b09b8/cc/raster/gpu_raster_buffer_provider.cc
[modify] https://crrev.com/b7210d35c666575a48ed600d7758c451220b09b8/cc/raster/one_copy_raster_buffer_provider.cc
[modify] https://crrev.com/b7210d35c666575a48ed600d7758c451220b09b8/cc/raster/zero_copy_raster_buffer_provider.cc
[modify] https://crrev.com/b7210d35c666575a48ed600d7758c451220b09b8/cc/resources/resource_provider.cc
[modify] https://crrev.com/b7210d35c666575a48ed600d7758c451220b09b8/cc/resources/resource_provider.h
[modify] https://crrev.com/b7210d35c666575a48ed600d7758c451220b09b8/cc/tiles/tile_manager.cc
[modify] https://crrev.com/b7210d35c666575a48ed600d7758c451220b09b8/third_party/WebKit/Source/platform/graphics/ContentLayerDelegate.cpp
[modify] https://crrev.com/b7210d35c666575a48ed600d7758c451220b09b8/third_party/WebKit/public/platform/WebDisplayItemList.h

Blocking: 634542
Project Member

Comment 6 by bugdroid1@chromium.org, Dec 9 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a9ee0245d3f3207903200bcde863021f04b6e704

commit a9ee0245d3f3207903200bcde863021f04b6e704
Author: ccameron <ccameron@chromium.org>
Date: Fri Dec 09 21:00:53 2016

Add ColorBehavior to GraphicsLayer and GraphicsContext

Specify the ColorBehavior from GraphicsLayer to GraphicsContext.

Use the GraphicsLayer's ColorBehavior to determine if the
WebDisplayItemList has an implied color space.

This does not change any behavior, but makes implied behavior
explicit.

The ColorBehavior in GraphicsLayer is unused, but will be used by
future patches.

BUG= 667411 

Review-Url: https://codereview.chromium.org/2552893005
Cr-Commit-Position: refs/heads/master@{#437648}

[modify] https://crrev.com/a9ee0245d3f3207903200bcde863021f04b6e704/third_party/WebKit/Source/platform/graphics/ContentLayerDelegate.cpp
[modify] https://crrev.com/a9ee0245d3f3207903200bcde863021f04b6e704/third_party/WebKit/Source/platform/graphics/GraphicsContext.cpp
[modify] https://crrev.com/a9ee0245d3f3207903200bcde863021f04b6e704/third_party/WebKit/Source/platform/graphics/GraphicsContext.h
[modify] https://crrev.com/a9ee0245d3f3207903200bcde863021f04b6e704/third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp
[modify] https://crrev.com/a9ee0245d3f3207903200bcde863021f04b6e704/third_party/WebKit/Source/platform/graphics/GraphicsLayer.h

We're going to be using the output-blending interface in Skia for this, instead of pre-transforming all input.
https://bugs.chromium.org/p/skia/issues/detail?id=6242

I'll remove the tendrils that started going through there.
Project Member

Comment 8 by bugdroid1@chromium.org, Feb 23 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/76f24f08581342212fcd7b74717fb6a4960b486a

commit 76f24f08581342212fcd7b74717fb6a4960b486a
Author: ccameron <ccameron@chromium.org>
Date: Thu Feb 23 05:24:44 2017

color: Remove implied color space

This is no longer a needed concept, now that we will be using Skia's
color conversion at rasterization time.

BUG= 667411 
TBR=chrishtr
CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel

Review-Url: https://codereview.chromium.org/2702633002
Cr-Commit-Position: refs/heads/master@{#452405}

[modify] https://crrev.com/76f24f08581342212fcd7b74717fb6a4960b486a/cc/blink/web_display_item_list_impl.cc
[modify] https://crrev.com/76f24f08581342212fcd7b74717fb6a4960b486a/cc/blink/web_display_item_list_impl.h
[modify] https://crrev.com/76f24f08581342212fcd7b74717fb6a4960b486a/cc/playback/display_item_list.h
[modify] https://crrev.com/76f24f08581342212fcd7b74717fb6a4960b486a/cc/playback/raster_source.cc
[modify] https://crrev.com/76f24f08581342212fcd7b74717fb6a4960b486a/cc/playback/raster_source.h
[modify] https://crrev.com/76f24f08581342212fcd7b74717fb6a4960b486a/cc/raster/bitmap_raster_buffer_provider.cc
[modify] https://crrev.com/76f24f08581342212fcd7b74717fb6a4960b486a/cc/raster/gpu_raster_buffer_provider.cc
[modify] https://crrev.com/76f24f08581342212fcd7b74717fb6a4960b486a/cc/raster/one_copy_raster_buffer_provider.cc
[modify] https://crrev.com/76f24f08581342212fcd7b74717fb6a4960b486a/cc/raster/zero_copy_raster_buffer_provider.cc
[modify] https://crrev.com/76f24f08581342212fcd7b74717fb6a4960b486a/cc/resources/resource_provider.cc
[modify] https://crrev.com/76f24f08581342212fcd7b74717fb6a4960b486a/cc/resources/resource_provider.h
[modify] https://crrev.com/76f24f08581342212fcd7b74717fb6a4960b486a/cc/tiles/tile_manager.cc
[modify] https://crrev.com/76f24f08581342212fcd7b74717fb6a4960b486a/third_party/WebKit/Source/platform/graphics/ContentLayerDelegate.cpp
[modify] https://crrev.com/76f24f08581342212fcd7b74717fb6a4960b486a/third_party/WebKit/public/platform/WebDisplayItemList.h

Blockedon: 672295
Blockedon: 672306
Blockedon: 672309
Blockedon: 672315
Blockedon: 672316
Blockedon: 679080
Project Member

Comment 15 by bugdroid1@chromium.org, Mar 2 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/0713546fe2092b05fb75c52ba9da223adda2681f

commit 0713546fe2092b05fb75c52ba9da223adda2681f
Author: ccameron <ccameron@chromium.org>
Date: Thu Mar 02 02:29:29 2017

color: Remove blink pre-conversion code

This removes ColorBehavior as a parameter to Image::draw. We will be
specifying color behavior on the SkSurface that we render to, so this
parameter is unneeded.

Make most callers to ColorBehavior specify ColorBehavior::defaultBehavior,
which will check runtime parameters to decide if pre-conversion or tagging
is appropriate.

Delete all references to "true color mode" -- Blink will not behave differently
in the two modes (it will always tag its inputs with their SkColorSpace).

Leave ColorBehavior as an argument to ImageDecoder, because some
interfaces (WebGL in particular) will want to specify the "ignore" behavior.

Don't remove ColorBehavior as an argument to imageForCurrentFrame, at
least yet. The SkImage created will need to specify some color space,
and allowing the caller to parameterize that is reasonable.

R=junov,chrishtr
TBR=esprehn
BUG= 667411 
BUG= 667420 
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel

Review-Url: https://codereview.chromium.org/2712083002
Cr-Commit-Position: refs/heads/master@{#454155}

[modify] https://crrev.com/0713546fe2092b05fb75c52ba9da223adda2681f/third_party/WebKit/Source/core/layout/ImageQualityControllerTest.cpp
[modify] https://crrev.com/0713546fe2092b05fb75c52ba9da223adda2681f/third_party/WebKit/Source/core/layout/shapes/Shape.cpp
[modify] https://crrev.com/0713546fe2092b05fb75c52ba9da223adda2681f/third_party/WebKit/Source/core/svg/graphics/SVGImage.cpp
[modify] https://crrev.com/0713546fe2092b05fb75c52ba9da223adda2681f/third_party/WebKit/Source/core/svg/graphics/SVGImage.h
[modify] https://crrev.com/0713546fe2092b05fb75c52ba9da223adda2681f/third_party/WebKit/Source/core/svg/graphics/SVGImageForContainer.cpp
[modify] https://crrev.com/0713546fe2092b05fb75c52ba9da223adda2681f/third_party/WebKit/Source/core/svg/graphics/SVGImageForContainer.h
[modify] https://crrev.com/0713546fe2092b05fb75c52ba9da223adda2681f/third_party/WebKit/Source/core/svg/graphics/SVGImageTest.cpp
[modify] https://crrev.com/0713546fe2092b05fb75c52ba9da223adda2681f/third_party/WebKit/Source/modules/canvas2d/BaseRenderingContext2D.cpp
[modify] https://crrev.com/0713546fe2092b05fb75c52ba9da223adda2681f/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
[modify] https://crrev.com/0713546fe2092b05fb75c52ba9da223adda2681f/third_party/WebKit/Source/platform/DragImageTest.cpp
[modify] https://crrev.com/0713546fe2092b05fb75c52ba9da223adda2681f/third_party/WebKit/Source/platform/graphics/AcceleratedStaticBitmapImage.cpp
[modify] https://crrev.com/0713546fe2092b05fb75c52ba9da223adda2681f/third_party/WebKit/Source/platform/graphics/AcceleratedStaticBitmapImage.h
[modify] https://crrev.com/0713546fe2092b05fb75c52ba9da223adda2681f/third_party/WebKit/Source/platform/graphics/BitmapImage.cpp
[modify] https://crrev.com/0713546fe2092b05fb75c52ba9da223adda2681f/third_party/WebKit/Source/platform/graphics/BitmapImage.h
[modify] https://crrev.com/0713546fe2092b05fb75c52ba9da223adda2681f/third_party/WebKit/Source/platform/graphics/CrossfadeGeneratedImage.cpp
[modify] https://crrev.com/0713546fe2092b05fb75c52ba9da223adda2681f/third_party/WebKit/Source/platform/graphics/CrossfadeGeneratedImage.h
[modify] https://crrev.com/0713546fe2092b05fb75c52ba9da223adda2681f/third_party/WebKit/Source/platform/graphics/GradientGeneratedImage.cpp
[modify] https://crrev.com/0713546fe2092b05fb75c52ba9da223adda2681f/third_party/WebKit/Source/platform/graphics/GradientGeneratedImage.h
[modify] https://crrev.com/0713546fe2092b05fb75c52ba9da223adda2681f/third_party/WebKit/Source/platform/graphics/GraphicsContext.cpp
[modify] https://crrev.com/0713546fe2092b05fb75c52ba9da223adda2681f/third_party/WebKit/Source/platform/graphics/GraphicsContext.h
[modify] https://crrev.com/0713546fe2092b05fb75c52ba9da223adda2681f/third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp
[modify] https://crrev.com/0713546fe2092b05fb75c52ba9da223adda2681f/third_party/WebKit/Source/platform/graphics/GraphicsLayer.h
[modify] https://crrev.com/0713546fe2092b05fb75c52ba9da223adda2681f/third_party/WebKit/Source/platform/graphics/Image.cpp
[modify] https://crrev.com/0713546fe2092b05fb75c52ba9da223adda2681f/third_party/WebKit/Source/platform/graphics/Image.h
[modify] https://crrev.com/0713546fe2092b05fb75c52ba9da223adda2681f/third_party/WebKit/Source/platform/graphics/ImageLayerChromiumTest.cpp
[modify] https://crrev.com/0713546fe2092b05fb75c52ba9da223adda2681f/third_party/WebKit/Source/platform/graphics/PaintGeneratedImage.cpp
[modify] https://crrev.com/0713546fe2092b05fb75c52ba9da223adda2681f/third_party/WebKit/Source/platform/graphics/PaintGeneratedImage.h
[modify] https://crrev.com/0713546fe2092b05fb75c52ba9da223adda2681f/third_party/WebKit/Source/platform/graphics/PlaceholderImage.cpp
[modify] https://crrev.com/0713546fe2092b05fb75c52ba9da223adda2681f/third_party/WebKit/Source/platform/graphics/PlaceholderImage.h
[modify] https://crrev.com/0713546fe2092b05fb75c52ba9da223adda2681f/third_party/WebKit/Source/platform/graphics/StaticBitmapImage.h
[modify] https://crrev.com/0713546fe2092b05fb75c52ba9da223adda2681f/third_party/WebKit/Source/platform/graphics/UnacceleratedStaticBitmapImage.cpp
[modify] https://crrev.com/0713546fe2092b05fb75c52ba9da223adda2681f/third_party/WebKit/Source/platform/graphics/UnacceleratedStaticBitmapImage.h

Project Member

Comment 16 by bugdroid1@chromium.org, Mar 7 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/4121a1f03af37216d8f219cfdc4899e71ee2f4cf

commit 4121a1f03af37216d8f219cfdc4899e71ee2f4cf
Author: ccameron <ccameron@chromium.org>
Date: Tue Mar 07 23:57:18 2017

Remove ColorBehavior argument to Image::imageForCurrentFrame

This will need to eventually tag the SkImage with an appropriate
SkColorSpace for all sub-classes.

For callers that expect a certain output color space, we should provide
a new entrypoint indicates the expected color space and performs the
required conversion.

R=junov
TBR=esprehn
BUG= 667411 
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel

Review-Url: https://codereview.chromium.org/2727133002
Cr-Commit-Position: refs/heads/master@{#455299}

[modify] https://crrev.com/4121a1f03af37216d8f219cfdc4899e71ee2f4cf/third_party/WebKit/Source/bindings/core/v8/serialization/V8ScriptValueSerializerTest.cpp
[modify] https://crrev.com/4121a1f03af37216d8f219cfdc4899e71ee2f4cf/third_party/WebKit/Source/core/frame/ImageBitmap.cpp
[modify] https://crrev.com/4121a1f03af37216d8f219cfdc4899e71ee2f4cf/third_party/WebKit/Source/core/frame/ImageBitmapTest.cpp
[modify] https://crrev.com/4121a1f03af37216d8f219cfdc4899e71ee2f4cf/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp
[modify] https://crrev.com/4121a1f03af37216d8f219cfdc4899e71ee2f4cf/third_party/WebKit/Source/core/html/ImageData.cpp
[modify] https://crrev.com/4121a1f03af37216d8f219cfdc4899e71ee2f4cf/third_party/WebKit/Source/core/layout/ImageQualityControllerTest.cpp
[modify] https://crrev.com/4121a1f03af37216d8f219cfdc4899e71ee2f4cf/third_party/WebKit/Source/core/svg/graphics/SVGImage.cpp
[modify] https://crrev.com/4121a1f03af37216d8f219cfdc4899e71ee2f4cf/third_party/WebKit/Source/core/svg/graphics/SVGImage.h
[modify] https://crrev.com/4121a1f03af37216d8f219cfdc4899e71ee2f4cf/third_party/WebKit/Source/core/svg/graphics/SVGImageForContainer.cpp
[modify] https://crrev.com/4121a1f03af37216d8f219cfdc4899e71ee2f4cf/third_party/WebKit/Source/core/svg/graphics/SVGImageForContainer.h
[modify] https://crrev.com/4121a1f03af37216d8f219cfdc4899e71ee2f4cf/third_party/WebKit/Source/core/svg/graphics/filters/SVGFEImage.cpp
[modify] https://crrev.com/4121a1f03af37216d8f219cfdc4899e71ee2f4cf/third_party/WebKit/Source/modules/accessibility/AXLayoutObject.cpp
[modify] https://crrev.com/4121a1f03af37216d8f219cfdc4899e71ee2f4cf/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2DTest.cpp
[modify] https://crrev.com/4121a1f03af37216d8f219cfdc4899e71ee2f4cf/third_party/WebKit/Source/modules/imagebitmap/ImageBitmapRenderingContext.cpp
[modify] https://crrev.com/4121a1f03af37216d8f219cfdc4899e71ee2f4cf/third_party/WebKit/Source/modules/shapedetection/ShapeDetector.cpp
[modify] https://crrev.com/4121a1f03af37216d8f219cfdc4899e71ee2f4cf/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
[modify] https://crrev.com/4121a1f03af37216d8f219cfdc4899e71ee2f4cf/third_party/WebKit/Source/platform/DragImage.cpp
[modify] https://crrev.com/4121a1f03af37216d8f219cfdc4899e71ee2f4cf/third_party/WebKit/Source/platform/DragImageTest.cpp
[modify] https://crrev.com/4121a1f03af37216d8f219cfdc4899e71ee2f4cf/third_party/WebKit/Source/platform/exported/WebImage.cpp
[modify] https://crrev.com/4121a1f03af37216d8f219cfdc4899e71ee2f4cf/third_party/WebKit/Source/platform/graphics/AcceleratedStaticBitmapImage.cpp
[modify] https://crrev.com/4121a1f03af37216d8f219cfdc4899e71ee2f4cf/third_party/WebKit/Source/platform/graphics/AcceleratedStaticBitmapImage.h
[modify] https://crrev.com/4121a1f03af37216d8f219cfdc4899e71ee2f4cf/third_party/WebKit/Source/platform/graphics/BitmapImage.cpp
[modify] https://crrev.com/4121a1f03af37216d8f219cfdc4899e71ee2f4cf/third_party/WebKit/Source/platform/graphics/BitmapImage.h
[modify] https://crrev.com/4121a1f03af37216d8f219cfdc4899e71ee2f4cf/third_party/WebKit/Source/platform/graphics/BitmapImageTest.cpp
[modify] https://crrev.com/4121a1f03af37216d8f219cfdc4899e71ee2f4cf/third_party/WebKit/Source/platform/graphics/GeneratedImage.cpp
[modify] https://crrev.com/4121a1f03af37216d8f219cfdc4899e71ee2f4cf/third_party/WebKit/Source/platform/graphics/GeneratedImage.h
[modify] https://crrev.com/4121a1f03af37216d8f219cfdc4899e71ee2f4cf/third_party/WebKit/Source/platform/graphics/GraphicsContext.h
[modify] https://crrev.com/4121a1f03af37216d8f219cfdc4899e71ee2f4cf/third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp
[modify] https://crrev.com/4121a1f03af37216d8f219cfdc4899e71ee2f4cf/third_party/WebKit/Source/platform/graphics/GraphicsLayer.h
[modify] https://crrev.com/4121a1f03af37216d8f219cfdc4899e71ee2f4cf/third_party/WebKit/Source/platform/graphics/Image.cpp
[modify] https://crrev.com/4121a1f03af37216d8f219cfdc4899e71ee2f4cf/third_party/WebKit/Source/platform/graphics/Image.h
[modify] https://crrev.com/4121a1f03af37216d8f219cfdc4899e71ee2f4cf/third_party/WebKit/Source/platform/graphics/ImageLayerChromiumTest.cpp
[modify] https://crrev.com/4121a1f03af37216d8f219cfdc4899e71ee2f4cf/third_party/WebKit/Source/platform/graphics/ImagePattern.cpp
[modify] https://crrev.com/4121a1f03af37216d8f219cfdc4899e71ee2f4cf/third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcherImpl.cpp
[modify] https://crrev.com/4121a1f03af37216d8f219cfdc4899e71ee2f4cf/third_party/WebKit/Source/platform/graphics/PlaceholderImage.cpp
[modify] https://crrev.com/4121a1f03af37216d8f219cfdc4899e71ee2f4cf/third_party/WebKit/Source/platform/graphics/PlaceholderImage.h
[modify] https://crrev.com/4121a1f03af37216d8f219cfdc4899e71ee2f4cf/third_party/WebKit/Source/platform/graphics/StaticBitmapImage.h
[modify] https://crrev.com/4121a1f03af37216d8f219cfdc4899e71ee2f4cf/third_party/WebKit/Source/platform/graphics/UnacceleratedStaticBitmapImage.cpp
[modify] https://crrev.com/4121a1f03af37216d8f219cfdc4899e71ee2f4cf/third_party/WebKit/Source/platform/graphics/UnacceleratedStaticBitmapImage.h
[modify] https://crrev.com/4121a1f03af37216d8f219cfdc4899e71ee2f4cf/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp

Status: WontFix (was: Assigned)
 issue 701942  has replaced this.
Blockedon: -672316

Sign in to add a comment