OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "cc/paint/draw_image.h" | 5 #include "cc/paint/draw_image.h" |
6 | 6 |
7 namespace cc { | 7 namespace cc { |
8 namespace { | 8 namespace { |
9 | 9 |
10 // Helper funciton to extract a scale from the matrix. Returns true on success | 10 // Helper funciton to extract a scale from the matrix. Returns true on success |
(...skipping 15 matching lines...) Expand all Loading... |
26 : image_(nullptr), | 26 : image_(nullptr), |
27 src_rect_(SkIRect::MakeXYWH(0, 0, 0, 0)), | 27 src_rect_(SkIRect::MakeXYWH(0, 0, 0, 0)), |
28 filter_quality_(kNone_SkFilterQuality), | 28 filter_quality_(kNone_SkFilterQuality), |
29 matrix_(SkMatrix::I()), | 29 matrix_(SkMatrix::I()), |
30 scale_(SkSize::Make(1.f, 1.f)), | 30 scale_(SkSize::Make(1.f, 1.f)), |
31 matrix_is_decomposable_(true) {} | 31 matrix_is_decomposable_(true) {} |
32 | 32 |
33 DrawImage::DrawImage(sk_sp<const SkImage> image, | 33 DrawImage::DrawImage(sk_sp<const SkImage> image, |
34 const SkIRect& src_rect, | 34 const SkIRect& src_rect, |
35 SkFilterQuality filter_quality, | 35 SkFilterQuality filter_quality, |
36 const SkMatrix& matrix) | 36 const SkMatrix& matrix, |
| 37 const gfx::ColorSpace& target_color_space) |
37 : image_(std::move(image)), | 38 : image_(std::move(image)), |
38 src_rect_(src_rect), | 39 src_rect_(src_rect), |
39 filter_quality_(filter_quality), | 40 filter_quality_(filter_quality), |
40 matrix_(matrix) { | 41 matrix_(matrix), |
| 42 target_color_space_(target_color_space) { |
41 matrix_is_decomposable_ = ExtractScale(matrix_, &scale_); | 43 matrix_is_decomposable_ = ExtractScale(matrix_, &scale_); |
42 } | 44 } |
43 | 45 |
44 DrawImage::DrawImage(const DrawImage& other) = default; | 46 DrawImage::DrawImage(const DrawImage& other) = default; |
45 | 47 |
46 DrawImage::~DrawImage() = default; | 48 DrawImage::~DrawImage() = default; |
47 | 49 |
48 } // namespace cc | 50 } // namespace cc |
OLD | NEW |