Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(349)

Issue 2660393002: Use gfx::ColorSpace instead of SkColorSpace in Blink (Closed)

Created:
3 years, 10 months ago by ccameron
Modified:
3 years, 10 months ago
Reviewers:
Nico, Justin Novosad
CC:
chromium-reviews, krit, dshwang, drott+blinkwatch_chromium.org, blink-reviews-platform-graphics_chromium.org, ajuma+watch-canvas_chromium.org, Stephen Chennney, blink-reviews-html_chromium.org, pdr+graphicswatchlist_chromium.org, jbroman, haraken, dglazkov+blink, Rik, f(malita), blink-reviews-paint_chromium.org, blink-reviews, kinuko+watch, ajuma+watch_chromium.org, danakj+watch_chromium.org, rwlbuis, esprehn
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Use gfx::ColorSpace instead of SkColorSpace in Blink gfx::ColorSpace is used as input (speciying monitor color space) and output (compositor texture mailbox) format for color spaces. Avoid conversions by using this directly instead of SkColorSpace. The SkColorSpace to pass to Skia APIs is accessible via the method gfx::ColorSpace::ToSkColorSpace. Delete gfx::ColorSpace::FromSkColorSpace and gfx::ICCProfile::FromSkColorSpace, since they could not be implemented reliably. For CanvasRenderingContext and Canvas2DLayerBridge, create a distinction between the gfx::ColorSpace that the canvas is to be interpreted in by the compositor, and the SkColorSpace that is to be used by SkSurfaces during rendering (for canvases that are not using Skia's color conversion, but still need to specify their color space to the compositor). BUG=634102 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2 Review-Url: https://codereview.chromium.org/2660393002 Cr-Commit-Position: refs/heads/master@{#447969} Committed: https://chromium.googlesource.com/chromium/src/+/628896ee553990e2f0dc60a5a2c7b0b44535a10f

Patch Set 1 #

Total comments: 6

Patch Set 2 : Incorporate review feedback #

Patch Set 3 : Fix test compile #

Patch Set 4 : Rebase #

Patch Set 5 : Rebase (again) #

Unified diffs Side-by-side diffs Delta from patch set Stats (+213 lines, -269 lines) Patch
M third_party/WebKit/PRESUBMIT.py View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/frame/ImageBitmap.cpp View 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/frame/ImageBitmapTest.cpp View 3 chunks +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp View 1 2 3 4 4 chunks +8 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/core/html/ImageData.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/html/canvas/CanvasRenderingContext.h View 1 2 3 4 1 chunk +7 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/html/canvas/CanvasRenderingContext.cpp View 1 1 chunk +23 lines, -43 lines 0 comments Download
M third_party/WebKit/Source/core/paint/HTMLCanvasPainterTest.cpp View 1 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2DTest.cpp View 1 8 chunks +27 lines, -31 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/Canvas2DImageBufferSurface.h View 1 2 3 4 2 chunks +10 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.h View 1 2 3 4 4 chunks +9 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.cpp View 1 2 3 4 8 chunks +17 lines, -37 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridgeTest.cpp View 1 2 3 4 14 chunks +29 lines, -23 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/ColorBehavior.h View 4 chunks +12 lines, -22 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/ColorBehavior.cpp View 1 2 3 4 4 chunks +16 lines, -22 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/ContentLayerDelegate.cpp View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/platform/image-decoders/ImageDecoder.cpp View 1 1 chunk +6 lines, -4 lines 0 comments Download
M ui/gfx/color_space.h View 1 2 3 4 4 chunks +7 lines, -2 lines 0 comments Download
M ui/gfx/color_space.cc View 1 2 3 4 4 chunks +22 lines, -15 lines 0 comments Download
M ui/gfx/color_space_win.cc View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M ui/gfx/icc_profile.h View 1 4 1 chunk +0 lines, -2 lines 0 comments Download
M ui/gfx/icc_profile.cc View 1 4 1 chunk +0 lines, -25 lines 0 comments Download
M ui/gfx/icc_profile_unittest.cc View 1 2 3 chunks +8 lines, -19 lines 0 comments Download

Messages

Total messages: 36 (25 generated)
ccameron
ptal https://codereview.chromium.org/2660393002/diff/1/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.cpp File third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.cpp (left): https://codereview.chromium.org/2660393002/diff/1/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.cpp#oldcode885 third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.cpp:885: static gfx::ColorSpace SkColorSpaceToColorSpace( Also avoiding this conversion is ...
3 years, 10 months ago (2017-01-30 22:50:49 UTC) #6
Justin Novosad
It seem like you are only going half way in the CL. Is this because ...
3 years, 10 months ago (2017-01-30 23:58:28 UTC) #7
Justin Novosad
https://codereview.chromium.org/2660393002/diff/1/third_party/WebKit/Source/core/html/canvas/CanvasRenderingContext.cpp File third_party/WebKit/Source/core/html/canvas/CanvasRenderingContext.cpp (right): https://codereview.chromium.org/2660393002/diff/1/third_party/WebKit/Source/core/html/canvas/CanvasRenderingContext.cpp#newcode67 third_party/WebKit/Source/core/html/canvas/CanvasRenderingContext.cpp:67: m_gfxColorSpace = gfx::ColorSpace( I am a bit concerned about ...
3 years, 10 months ago (2017-01-31 00:15:59 UTC) #8
ccameron
Oh -- I think this is as far as I'm planning to push this. Some ...
3 years, 10 months ago (2017-01-31 05:34:27 UTC) #9
ccameron
(new version uploaded, ptal)
3 years, 10 months ago (2017-01-31 05:35:25 UTC) #11
ccameron
ping again
3 years, 10 months ago (2017-02-02 17:22:03 UTC) #19
Justin Novosad
lgtm
3 years, 10 months ago (2017-02-02 18:35:43 UTC) #20
ccameron
Adding thakis@ for third_party/WebKit/PRESUBMIT.py
3 years, 10 months ago (2017-02-03 07:50:44 UTC) #28
Nico
LGTM esprehn, what's the guideline for allowing gfx types in blink (see presubmit change)? (But ...
3 years, 10 months ago (2017-02-03 08:20:02 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2660393002/80001
3 years, 10 months ago (2017-02-03 08:40:57 UTC) #33
commit-bot: I haz the power
3 years, 10 months ago (2017-02-03 09:29:50 UTC) #36
Message was sent while issue was closed.
Committed patchset #5 (id:80001) as
https://chromium.googlesource.com/chromium/src/+/628896ee553990e2f0dc60a5a2c7...

Powered by Google App Engine
This is Rietveld 408576698