Have GPU Image Decode Cache handle Bitmap images |
|||
Issue descriptionCurrently, the image decode caches ignore bitmap images, letting Skia use them directly. and in the GPU case, perform the upload. We can probably manage the uploaded memory better as part of our image cache. We should see if the GPU cache can be adapted to process Bitmaps efficiently. I suspect this is just a case of skipping the decode task and adding a bit of handling to the upload task.
,
Feb 26 2018
,
Feb 26 2018
Handling of bitmaps is in but everything is done at-raster right now. 2 things that remain: 1) Create upload task without a decode dependency instead of doing it at-raster. 2) Make sure we save the result of color conversion for greater than max texture size image.
,
Mar 22 2018
I presume for bitmap images, you mean non-lazy decoded images ? So for "1" we shouldnt skip the the upload here, https://cs.chromium.org/chromium/src/cc/tiles/gpu_image_decode_cache.cc?type=cs&q=GetTaskForImageAndRefInternal&sq=package:chromium&l=664 But, i couldnt find any cond when we will not use the deferred img decoding (lazy decode) https://cs.chromium.org/chromium/src/third_party/WebKit/Source/platform/graphics/BitmapImage.cpp?type=cs&l=179 Is there some use case when we are using non-lazy decode ?
,
Mar 22 2018
,
Mar 22 2018
These images are not coming from BitmapImage, you can create an SkImage backed by a SkBitmap. It would be better to use upload tasks for them instead of doing the upload at-raster. And yes, you should be able to do that by not skipping the upload task in GetTaskForImageAndRefInternal.
,
May 4 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/ce15d2f4607d6db583533c55999c8610ebb5e31f commit ce15d2f4607d6db583533c55999c8610ebb5e31f Author: Khushal <khushalsagar@chromium.org> Date: Fri May 04 23:47:41 2018 cc: Cache color converted bitmaps > max_texture_size in GpuCache. Ensure that we cache the result of color conversion in the GpuImageDecodeCache for images larger than max_texture_size, which are color converted on the cpu during scaling. R=ericrk@chromium.org Bug: 791828 , 759188 Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;master.tryserver.blink:linux_trusty_blink_rel Change-Id: I0940e516ef6b36ccac961c1c15057eee2c73d64e Reviewed-on: https://chromium-review.googlesource.com/1041465 Commit-Queue: Khushal <khushalsagar@chromium.org> Reviewed-by: Eric Karl <ericrk@chromium.org> Cr-Commit-Position: refs/heads/master@{#556257} [modify] https://crrev.com/ce15d2f4607d6db583533c55999c8610ebb5e31f/cc/tiles/gpu_image_decode_cache.cc [modify] https://crrev.com/ce15d2f4607d6db583533c55999c8610ebb5e31f/cc/tiles/gpu_image_decode_cache.h [modify] https://crrev.com/ce15d2f4607d6db583533c55999c8610ebb5e31f/cc/tiles/gpu_image_decode_cache_unittest.cc
,
May 4 2018
|
|||
►
Sign in to add a comment |
|||
Comment 1 by ericrk@chromium.org
, Feb 26 2018