Index: cc/paint/draw_image.h |
diff --git a/cc/paint/draw_image.h b/cc/paint/draw_image.h |
index 33479ebc011b0283403c7d13112da26525b2b403..78513b90d1ec55b8530f2c9860d7aac836b47fac 100644 |
--- a/cc/paint/draw_image.h |
+++ b/cc/paint/draw_image.h |
@@ -11,6 +11,7 @@ |
#include "third_party/skia/include/core/SkMatrix.h" |
#include "third_party/skia/include/core/SkRect.h" |
#include "third_party/skia/include/core/SkRefCnt.h" |
+#include "ui/gfx/color_space.h" |
#include "ui/gfx/geometry/size_f.h" |
namespace cc { |
@@ -23,7 +24,8 @@ class CC_PAINT_EXPORT DrawImage { |
DrawImage(sk_sp<const SkImage> image, |
const SkIRect& src_rect, |
SkFilterQuality filter_quality, |
- const SkMatrix& matrix); |
+ const SkMatrix& matrix, |
+ const gfx::ColorSpace& target_color_space); |
DrawImage(const DrawImage& other); |
~DrawImage(); |
@@ -33,11 +35,19 @@ class CC_PAINT_EXPORT DrawImage { |
SkFilterQuality filter_quality() const { return filter_quality_; } |
bool matrix_is_decomposable() const { return matrix_is_decomposable_; } |
const SkMatrix& matrix() const { return matrix_; } |
+ const gfx::ColorSpace& target_color_space() const { |
+ return target_color_space_; |
+ } |
DrawImage ApplyScale(float scale) const { |
SkMatrix scaled_matrix = matrix_; |
scaled_matrix.preScale(scale, scale); |
- return DrawImage(image_, src_rect_, filter_quality_, scaled_matrix); |
+ return DrawImage(image_, src_rect_, filter_quality_, scaled_matrix, |
+ target_color_space_); |
+ } |
+ DrawImage ApplyTargetColorSpace(const gfx::ColorSpace& target_color_space) { |
+ return DrawImage(image_, src_rect_, filter_quality_, matrix_, |
+ target_color_space); |
} |
private: |
@@ -47,6 +57,7 @@ class CC_PAINT_EXPORT DrawImage { |
SkMatrix matrix_; |
SkSize scale_; |
bool matrix_is_decomposable_; |
+ gfx::ColorSpace target_color_space_; |
}; |
} // namespace cc |