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 #ifndef CC_PLAYBACK_DRAW_IMAGE_H_ | 5 #ifndef CC_PLAYBACK_DRAW_IMAGE_H_ |
6 #define CC_PLAYBACK_DRAW_IMAGE_H_ | 6 #define CC_PLAYBACK_DRAW_IMAGE_H_ |
7 | 7 |
8 #include "third_party/skia/include/core/SkFilterQuality.h" | 8 #include "third_party/skia/include/core/SkFilterQuality.h" |
9 #include "third_party/skia/include/core/SkImage.h" | 9 #include "third_party/skia/include/core/SkImage.h" |
10 #include "third_party/skia/include/core/SkMatrix.h" | 10 #include "third_party/skia/include/core/SkMatrix.h" |
(...skipping 17 matching lines...) Expand all Loading... |
28 image_, SkSize::Make(scale_.width() * scale, scale_.height() * scale), | 28 image_, SkSize::Make(scale_.width() * scale, scale_.height() * scale), |
29 filter_quality_); | 29 filter_quality_); |
30 } | 30 } |
31 | 31 |
32 private: | 32 private: |
33 const SkImage* image_; | 33 const SkImage* image_; |
34 SkSize scale_; | 34 SkSize scale_; |
35 SkFilterQuality filter_quality_; | 35 SkFilterQuality filter_quality_; |
36 }; | 36 }; |
37 | 37 |
| 38 class DecodedDrawImage { |
| 39 public: |
| 40 DecodedDrawImage(const SkImage* image, |
| 41 const SkSize& scale_adjustment, |
| 42 SkFilterQuality filter_quality) |
| 43 : image_(image), |
| 44 scale_adjustment_(scale_adjustment), |
| 45 filter_quality_(filter_quality) {} |
| 46 |
| 47 const SkImage* image() const { return image_; } |
| 48 const SkSize& scale_adjustment() const { return scale_adjustment_; } |
| 49 SkFilterQuality filter_quality() const { return filter_quality_; } |
| 50 |
| 51 private: |
| 52 const SkImage* image_; |
| 53 SkSize scale_adjustment_; |
| 54 SkFilterQuality filter_quality_; |
| 55 }; |
| 56 |
38 } // namespace cc | 57 } // namespace cc |
39 | 58 |
40 #endif // CC_PLAYBACK_DRAW_IMAGE_H_ | 59 #endif // CC_PLAYBACK_DRAW_IMAGE_H_ |
OLD | NEW |