| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_RASTER_RASTER_SOURCE_H_ | 5 #ifndef CC_RASTER_RASTER_SOURCE_H_ |
| 6 #define CC_RASTER_RASTER_SOURCE_H_ | 6 #define CC_RASTER_RASTER_SOURCE_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 virtual void PlaybackToCanvas(SkCanvas* canvas, | 86 virtual void PlaybackToCanvas(SkCanvas* canvas, |
| 87 const gfx::ColorSpace& target_color_space, | 87 const gfx::ColorSpace& target_color_space, |
| 88 const PlaybackSettings& settings) const; | 88 const PlaybackSettings& settings) const; |
| 89 | 89 |
| 90 // Returns whether the given rect at given scale is of solid color in | 90 // Returns whether the given rect at given scale is of solid color in |
| 91 // this raster source, as well as the solid color value. | 91 // this raster source, as well as the solid color value. |
| 92 bool PerformSolidColorAnalysis(const gfx::Rect& content_rect, | 92 bool PerformSolidColorAnalysis(const gfx::Rect& content_rect, |
| 93 float contents_scale, | 93 float contents_scale, |
| 94 SkColor* color) const; | 94 SkColor* color) const; |
| 95 | 95 |
| 96 // Returns true iff there exists content in the raster source that was not |
| 97 // originally specified in SRGB color space. |
| 98 bool HasNonSRGBContent() const; |
| 99 |
| 96 // Returns true iff the whole raster source is of solid color. | 100 // Returns true iff the whole raster source is of solid color. |
| 97 bool IsSolidColor() const; | 101 bool IsSolidColor() const; |
| 98 | 102 |
| 99 // Returns the color of the raster source if it is solid color. The results | 103 // Returns the color of the raster source if it is solid color. The results |
| 100 // are unspecified if IsSolidColor returns false. | 104 // are unspecified if IsSolidColor returns false. |
| 101 SkColor GetSolidColor() const; | 105 SkColor GetSolidColor() const; |
| 102 | 106 |
| 103 // Returns the size of this raster source. | 107 // Returns the size of this raster source. |
| 104 gfx::Size GetSize() const; | 108 gfx::Size GetSize() const; |
| 105 | 109 |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 SkPicture::AbortCallback* callback) const; | 175 SkPicture::AbortCallback* callback) const; |
| 172 | 176 |
| 173 void PrepareForPlaybackToCanvas(SkCanvas* canvas) const; | 177 void PrepareForPlaybackToCanvas(SkCanvas* canvas) const; |
| 174 | 178 |
| 175 DISALLOW_COPY_AND_ASSIGN(RasterSource); | 179 DISALLOW_COPY_AND_ASSIGN(RasterSource); |
| 176 }; | 180 }; |
| 177 | 181 |
| 178 } // namespace cc | 182 } // namespace cc |
| 179 | 183 |
| 180 #endif // CC_RASTER_RASTER_SOURCE_H_ | 184 #endif // CC_RASTER_RASTER_SOURCE_H_ |
| OLD | NEW |