New issue
Advanced search Search tips

Issue 815354 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner: ----
Closed: Apr 2018
Cc:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug

Blocking:
issue 737629



Sign in to add a comment

Serialize image colorspaces

Project Member Reported by enne@chromium.org, Feb 24 2018

Issue description

Currently there are TODOs for image color space serialization.

SkColorSpaces need to be serialized along with images so that colorspace conversion can happen as a part of upload in the gpu process.

Additionally, the RasterColorSpace should probably be changed to be an SkColorSpace as it used that way in the gpu process, and then we won't have two different serialization methods.

Some thought needs to be given to how to figure out if two colorspaces are the same (equality?).  Pointer comparison seems a little fraught.  Perhaps we need a cache of the last N (non-srgb) color spaces like gfx::ColorSpace does, with a pointer comparison as a first pass before an equality check.  This cache could hold onto the transfer cache ids that it used to transfer them and check if it can still lock them.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Mar 5 2018

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

commit 4376d5f49c616a0a8eb75a5dc1c1ade47356f45c
Author: Adrienne Walker <enne@chromium.org>
Date: Mon Mar 05 19:01:13 2018

oop: add oop pixel test for images

This adds support to oop_pixeltest for rastering with images.
GpuImageDecodeCache requires a ContextProvider and not just a
GLES2Implementation, so hoist that up.  Unfortunately, this also
removes the splitting of the raster interface from the gl interface
inside of the oop pixel test, because GpuImageDecodeCache uses
both currently.   When the raster interface/implementation is more
real this can change back.

Bug:  815354 
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.android:android_optional_gpu_tests_rel
Change-Id: Iecb08ddc2764e2fe21568d519e6451e4dfa85e42
Reviewed-on: https://chromium-review.googlesource.com/944059
Commit-Queue: enne <enne@chromium.org>
Reviewed-by: Eric Karl <ericrk@chromium.org>
Reviewed-by: Khushal <khushalsagar@chromium.org>
Cr-Commit-Position: refs/heads/master@{#540888}
[modify] https://crrev.com/4376d5f49c616a0a8eb75a5dc1c1ade47356f45c/cc/paint/oop_pixeltest.cc
[modify] https://crrev.com/4376d5f49c616a0a8eb75a5dc1c1ade47356f45c/cc/test/layer_tree_pixel_test.cc
[modify] https://crrev.com/4376d5f49c616a0a8eb75a5dc1c1ade47356f45c/cc/test/pixel_test.cc
[modify] https://crrev.com/4376d5f49c616a0a8eb75a5dc1c1ade47356f45c/cc/test/test_in_process_context_provider.cc
[modify] https://crrev.com/4376d5f49c616a0a8eb75a5dc1c1ade47356f45c/cc/test/test_in_process_context_provider.h
[modify] https://crrev.com/4376d5f49c616a0a8eb75a5dc1c1ade47356f45c/cc/trees/layer_tree_host_pixeltest_scrollbars.cc

Project Member

Comment 2 by bugdroid1@chromium.org, Mar 6 2018

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

commit e279d32f1b0a0b94f5cfab0c77b40e9759da75a7
Author: Adrienne Walker <enne@chromium.org>
Date: Tue Mar 06 03:07:45 2018

oop: Serialize transfer cache image color spaces

This patch fixes some TODOs in image transfer cache serialization around
SkColorSpace.  Because SkImages are stored in the transfer cache, this
patch does not send the SkColorSpace separately in the transfer cache
and serializes it along with the image itself.

The SkColorSpace serialization in PaintOpReader/Writer is not exercised
by existing fuzzers, so the followup to this patch is to write a
transfer cache service-side deserialization fuzzer.

This patch also modifies the logic of the GpuImageDecodeCache to be
more consistent about when it applies color conversion.  Previously,
if color_type_ was 4444 then color space conversion would not be
applied to uploaded images but would be applied to "too large"
images that were kept as software bitmaps.  With this patch, no
color space conversion is applied in any mode if the color_type_
is not supported.

Bug:  815354 
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.android:android_optional_gpu_tests_rel
Change-Id: I100acafb89bed2f7d8e80f0a0e6af2997b7d5590
Reviewed-on: https://chromium-review.googlesource.com/939725
Commit-Queue: enne <enne@chromium.org>
Reviewed-by: Khushal <khushalsagar@chromium.org>
Reviewed-by: Eric Karl <ericrk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#541037}
[modify] https://crrev.com/e279d32f1b0a0b94f5cfab0c77b40e9759da75a7/cc/paint/image_transfer_cache_entry.cc
[modify] https://crrev.com/e279d32f1b0a0b94f5cfab0c77b40e9759da75a7/cc/paint/image_transfer_cache_entry.h
[modify] https://crrev.com/e279d32f1b0a0b94f5cfab0c77b40e9759da75a7/cc/paint/oop_pixeltest.cc
[modify] https://crrev.com/e279d32f1b0a0b94f5cfab0c77b40e9759da75a7/cc/paint/paint_op_reader.cc
[modify] https://crrev.com/e279d32f1b0a0b94f5cfab0c77b40e9759da75a7/cc/paint/paint_op_reader.h
[modify] https://crrev.com/e279d32f1b0a0b94f5cfab0c77b40e9759da75a7/cc/paint/paint_op_writer.cc
[modify] https://crrev.com/e279d32f1b0a0b94f5cfab0c77b40e9759da75a7/cc/paint/paint_op_writer.h
[modify] https://crrev.com/e279d32f1b0a0b94f5cfab0c77b40e9759da75a7/cc/test/transfer_cache_test_helper.cc
[modify] https://crrev.com/e279d32f1b0a0b94f5cfab0c77b40e9759da75a7/cc/test/transfer_cache_test_helper.h
[modify] https://crrev.com/e279d32f1b0a0b94f5cfab0c77b40e9759da75a7/cc/tiles/gpu_image_decode_cache.cc
[modify] https://crrev.com/e279d32f1b0a0b94f5cfab0c77b40e9759da75a7/cc/tiles/gpu_image_decode_cache.h
[modify] https://crrev.com/e279d32f1b0a0b94f5cfab0c77b40e9759da75a7/cc/tiles/gpu_image_decode_cache_unittest.cc

Comment 3 by enne@chromium.org, Apr 5 2018

Status: Fixed (was: Available)

Sign in to add a comment