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

Unified Diff: cc/tiles/software_image_decode_cache.h

Issue 2797583002: cc: Add color space to image decode caches (Closed)
Patch Set: Fix perf test compile Created 3 years, 9 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 9032385278dd3207dd2fcad71f86daae236ae9a7..e44a886a015cf4033b68e2e102227d5cb0af694f 100644
--- a/cc/tiles/software_image_decode_cache.h
+++ b/cc/tiles/software_image_decode_cache.h
@@ -46,6 +46,7 @@ class CC_EXPORT ImageDecodeCacheKey {
// If not, then we have to compare every field.
return image_id_ == other.image_id_ &&
can_use_original_decode_ == other.can_use_original_decode_ &&
+ target_color_space_ == other.target_color_space_ &&
(can_use_original_decode_ ||
(src_rect_ == other.src_rect_ &&
target_size_ == other.target_size_ &&
@@ -60,6 +61,9 @@ class CC_EXPORT ImageDecodeCacheKey {
SkFilterQuality filter_quality() const { return filter_quality_; }
gfx::Rect src_rect() const { return src_rect_; }
gfx::Size target_size() const { return target_size_; }
+ const gfx::ColorSpace& target_color_space() const {
+ return target_color_space_;
+ }
bool can_use_original_decode() const { return can_use_original_decode_; }
bool should_use_subrect() const { return should_use_subrect_; }
@@ -81,6 +85,7 @@ class CC_EXPORT ImageDecodeCacheKey {
ImageDecodeCacheKey(uint32_t image_id,
const gfx::Rect& src_rect,
const gfx::Size& size,
+ const gfx::ColorSpace& target_color_space,
SkFilterQuality filter_quality,
bool can_use_original_decode,
bool should_use_subrect);
@@ -88,6 +93,7 @@ class CC_EXPORT ImageDecodeCacheKey {
uint32_t image_id_;
gfx::Rect src_rect_;
gfx::Size target_size_;
+ gfx::ColorSpace target_color_space_;
SkFilterQuality filter_quality_;
bool can_use_original_decode_;
bool should_use_subrect_;

Powered by Google App Engine
This is Rietveld 408576698