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

Issue 2797583002: cc: Add color space to image decode caches (Closed)

Created:
3 years, 8 months ago by ccameron
Modified:
3 years, 8 months ago
Reviewers:
msarett1, vmpstr, ericrk
CC:
chromium-reviews, cc-bugs_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

cc: Add color space to image decode caches Add a color space argument to the image decode caches, so that they can - create SkImages in the correct color space - not re-use SkImages decoded into different color spaces Add a gfx::ColorSpace argument to DrawImage, which is used (roughly) as a key in SoftwareImageDecodeCache and GpuImageDecodeCache. Ensure that the caches respect this key and add tests. Do not ensure that the caches always create SkImages using this color space, because that functionality still needs some work. Specify a gfx::ColorSpace to the ImageHijackCanvas, indicating the target color space for images to be put in and pulled from the image caches. Update RasterSource::GetDiscardableImagesInRect to specify the color space for images, and plumb this through to DiscardableImageMap::GetDiscardableImagesInRect, which will populate the color spaces for decoding tasks. This patch will have no effect while color correct rendering is disabled, because the ColorSpace objects being passed around will all be invalid. BUG=706613 CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel Review-Url: https://codereview.chromium.org/2797583002 Cr-Commit-Position: refs/heads/master@{#462371} Committed: https://chromium.googlesource.com/chromium/src/+/bdb2737223ac58596bffeb66a079dc6a80c3e5cc

Patch Set 1 #

Patch Set 2 : Force raster space to nil when disabled #

Patch Set 3 : Fix perf test compile #

Patch Set 4 : Fix perf test compile #

Total comments: 27

Patch Set 5 : Review feedback, except the sk_sp bit... #

Total comments: 5

Patch Set 6 : Add comment #

Patch Set 7 : Add TODOs for conversion #

Patch Set 8 : Rebase #

Total comments: 6

Patch Set 9 : Rebase but don't break the build #

Patch Set 10 : Remove dead code #

Unified diffs Side-by-side diffs Delta from patch set Stats (+677 lines, -311 lines) Patch
M cc/layers/recording_source_unittest.cc View 15 chunks +31 lines, -26 lines 0 comments Download
M cc/paint/discardable_image_map.h View 1 chunk +1 line, -0 lines 0 comments Download
M cc/paint/discardable_image_map.cc View 1 2 3 4 2 chunks +14 lines, -5 lines 0 comments Download
M cc/paint/discardable_image_map_unittest.cc View 1 2 3 4 2 chunks +8 lines, -2 lines 0 comments Download
M cc/paint/display_item_list.h View 1 chunk +1 line, -0 lines 0 comments Download
M cc/paint/display_item_list.cc View 1 chunk +3 lines, -1 line 0 comments Download
M cc/paint/draw_image.h View 1 2 3 4 4 chunks +13 lines, -2 lines 0 comments Download
M cc/paint/draw_image.cc View 1 chunk +4 lines, -2 lines 0 comments Download
M cc/raster/image_hijack_canvas.h View 3 chunks +4 lines, -1 line 0 comments Download
M cc/raster/image_hijack_canvas.cc View 11 chunks +24 lines, -18 lines 0 comments Download
M cc/raster/image_hijack_canvas_unittest.cc View 1 2 3 4 5 6 7 2 chunks +6 lines, -2 lines 0 comments Download
M cc/raster/raster_source.h View 1 2 3 4 5 6 7 4 chunks +3 lines, -3 lines 0 comments Download
M cc/raster/raster_source.cc View 1 2 3 4 5 6 7 6 chunks +24 lines, -23 lines 0 comments Download
M cc/raster/raster_source_unittest.cc View 1 2 3 4 5 6 7 1 chunk +15 lines, -4 lines 0 comments Download
M cc/tiles/checker_image_tracker_unittest.cc View 1 chunk +2 lines, -1 line 0 comments Download
M cc/tiles/gpu_image_decode_cache.h View 1 2 3 4 5 6 7 8 9 3 chunks +21 lines, -2 lines 0 comments Download
M cc/tiles/gpu_image_decode_cache.cc View 1 2 3 4 5 6 7 17 chunks +63 lines, -37 lines 0 comments Download
M cc/tiles/gpu_image_decode_cache_unittest.cc View 1 2 3 4 5 6 7 8 54 chunks +162 lines, -62 lines 0 comments Download
M cc/tiles/image_controller.cc View 1 chunk +7 lines, -1 line 0 comments Download
M cc/tiles/software_image_decode_cache.h View 1 2 3 4 5 6 7 3 chunks +14 lines, -5 lines 0 comments Download
M cc/tiles/software_image_decode_cache.cc View 1 2 3 4 5 6 7 12 chunks +43 lines, -25 lines 0 comments Download
M cc/tiles/software_image_decode_cache_perftest.cc View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M cc/tiles/software_image_decode_cache_unittest.cc View 1 2 3 4 5 6 7 8 61 chunks +206 lines, -86 lines 0 comments Download
M cc/tiles/tile_manager.cc View 1 2 3 4 5 6 7 2 chunks +4 lines, -2 lines 0 comments Download
M cc/trees/layer_tree_host_impl.cc View 1 2 3 4 5 6 7 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 48 (30 generated)
ccameron
ptal -- this is the stuff that we were discussing earlier, all grown up and ...
3 years, 8 months ago (2017-04-04 00:43:06 UTC) #9
vmpstr
Also +ericrk for gpu images https://codereview.chromium.org/2797583002/diff/60001/cc/paint/discardable_image_map.cc File cc/paint/discardable_image_map.cc (right): https://codereview.chromium.org/2797583002/diff/60001/cc/paint/discardable_image_map.cc#newcode284 cc/paint/discardable_image_map.cc:284: images->push_back(all_images_[index].first.ApplyScaleAndColorSpace( nit: Can you ...
3 years, 8 months ago (2017-04-04 01:16:43 UTC) #12
ericrk
A few comments on the GPU part. My biggest concerns: - ColorProfile objects are large ...
3 years, 8 months ago (2017-04-04 02:38:04 UTC) #13
ccameron
Updated. I could pass around an sk_sp<SkColorSpace> instead of a gfx::ColorSpace. I'm sort-of-agnostic on this ...
3 years, 8 months ago (2017-04-04 06:41:10 UTC) #15
ericrk
https://codereview.chromium.org/2797583002/diff/60001/cc/tiles/gpu_image_decode_cache.h File cc/tiles/gpu_image_decode_cache.h (right): https://codereview.chromium.org/2797583002/diff/60001/cc/tiles/gpu_image_decode_cache.h#newcode276 cc/tiles/gpu_image_decode_cache.h:276: gfx::ColorSpace target_color_space; On 2017/04/04 06:41:10, ccameron wrote: > On ...
3 years, 8 months ago (2017-04-04 16:28:40 UTC) #16
vmpstr
Around now would actually be a good time to try and run this through cluster ...
3 years, 8 months ago (2017-04-04 17:30:09 UTC) #17
ccameron
Sg -- I'll update this to use an sk_sp<SkColorSpace> instead. I'll update here when I'm ...
3 years, 8 months ago (2017-04-04 17:42:03 UTC) #18
ccameron
So, I started replacing this with sk_sp<SkColorSpace> and ... it just gets messy, cause we ...
3 years, 8 months ago (2017-04-04 19:31:08 UTC) #23
ericrk
lgtm I'm OK landing this if we have a plan to convert to ref-counted gfx::ColorSpace ...
3 years, 8 months ago (2017-04-05 22:05:05 UTC) #24
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/2797583002/120001
3 years, 8 months ago (2017-04-05 22:19:54 UTC) #26
commit-bot: I haz the power
Try jobs failed on following builders: linux_trusty_blink_rel on master.tryserver.blink (JOB_FAILED, http://build.chromium.org/p/tryserver.blink/builders/linux_trusty_blink_rel/builds/7605) ios-device-xcode-clang on master.tryserver.chromium.mac (JOB_FAILED, ...
3 years, 8 months ago (2017-04-05 22:24:30 UTC) #28
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/2797583002/160001
3 years, 8 months ago (2017-04-05 23:45:59 UTC) #35
vmpstr
lgtm with comments https://codereview.chromium.org/2797583002/diff/140001/cc/tiles/gpu_image_decode_cache.cc File cc/tiles/gpu_image_decode_cache.cc (right): https://codereview.chromium.org/2797583002/diff/140001/cc/tiles/gpu_image_decode_cache.cc#newcode1110 cc/tiles/gpu_image_decode_cache.cc:1110: DLOG(ERROR) << "scalePixels failed."; Are DLOGs ...
3 years, 8 months ago (2017-04-06 00:18:50 UTC) #36
ccameron
Oop. Fixed. https://codereview.chromium.org/2797583002/diff/140001/cc/tiles/gpu_image_decode_cache.cc File cc/tiles/gpu_image_decode_cache.cc (right): https://codereview.chromium.org/2797583002/diff/140001/cc/tiles/gpu_image_decode_cache.cc#newcode1110 cc/tiles/gpu_image_decode_cache.cc:1110: DLOG(ERROR) << "scalePixels failed."; On 2017/04/06 00:18:50, ...
3 years, 8 months ago (2017-04-06 01:36:28 UTC) #38
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/2797583002/180001
3 years, 8 months ago (2017-04-06 01:37:09 UTC) #41
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/423341)
3 years, 8 months ago (2017-04-06 01:42:55 UTC) #43
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/2797583002/180001
3 years, 8 months ago (2017-04-06 04:25:56 UTC) #45
commit-bot: I haz the power
3 years, 8 months ago (2017-04-06 06:29:18 UTC) #48
Message was sent while issue was closed.
Committed patchset #10 (id:180001) as
https://chromium.googlesource.com/chromium/src/+/bdb2737223ac58596bffeb66a079...

Powered by Google App Engine
This is Rietveld 408576698