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

Unified Diff: cc/tiles/software_image_decode_cache.h

Issue 2801413002: color: Enable color conversion in image decoder caches (Closed)
Patch Set: Rebase Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: cc/tiles/software_image_decode_cache.h
diff --git a/cc/tiles/software_image_decode_cache.h b/cc/tiles/software_image_decode_cache.h
index 86b9d7f5689fde7e2e234705c1373d061dfd3264..1d3e2ac75c40d603c8a3009edfce9d0885aac908 100644
--- a/cc/tiles/software_image_decode_cache.h
+++ b/cc/tiles/software_image_decode_cache.h
@@ -249,18 +249,20 @@ class CC_EXPORT SoftwareImageDecodeCache
DecodedDrawImage GetDecodedImageForDrawInternal(const ImageKey& key,
const DrawImage& draw_image);
- // GetOriginalImageDecode is called by DecodeImageInternal when the quality
- // does not scale the image. Like DecodeImageInternal, it should be called
- // with no lock acquired and it returns nullptr if the decoding failed.
- std::unique_ptr<DecodedImage> GetOriginalImageDecode(
+ // GetOriginalSizeImageDecode is called by DecodeImageInternal when the
+ // quality does not scale the image. Like DecodeImageInternal, it should be
+ // called with no lock acquired and it returns nullptr if the decoding failed.
+ std::unique_ptr<DecodedImage> GetOriginalSizeImageDecode(
+ const ImageKey& key,
sk_sp<const SkImage> image);
- // GetSubrectImageDecode is similar to GetOriginalImageDecode in that no scale
- // is performed on the image. However, we extract a subrect (copy it out) and
- // only return this subrect in order to cache a smaller amount of memory. Note
- // that this uses GetOriginalImageDecode to get the initial data, which
- // ensures that we cache an unlocked version of the original image in case we
- // need to extract multiple subrects (as would be the case in an atlas).
+ // GetSubrectImageDecode is similar to GetOriginalSizeImageDecode in that no
+ // scale is performed on the image. However, we extract a subrect (copy it
+ // out) and only return this subrect in order to cache a smaller amount of
+ // memory. Note that this uses GetOriginalSizeImageDecode to get the initial
+ // data, which ensures that we cache an unlocked version of the original image
+ // in case we need to extract multiple subrects (as would be the case in an
+ // atlas).
std::unique_ptr<DecodedImage> GetSubrectImageDecode(
const ImageKey& key,
sk_sp<const SkImage> image);

Powered by Google App Engine
This is Rietveld 408576698