Serialize image colorspaces |
||
Issue descriptionCurrently 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.
,
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
,
Apr 5 2018
|
||
►
Sign in to add a comment |
||
Comment 1 by bugdroid1@chromium.org
, Mar 5 2018