Chromium Code Reviews| Index: cc/output/filter_operation.h |
| diff --git a/cc/output/filter_operation.h b/cc/output/filter_operation.h |
| index 626d2e7f06bb7e750c4ea9cd8cb2b309ec1b34ec..3de252f562fb8c4b5ca86b2ceee070ac8d6184af 100644 |
| --- a/cc/output/filter_operation.h |
| +++ b/cc/output/filter_operation.h |
| @@ -89,6 +89,11 @@ class CC_EXPORT FilterOperation { |
| return region_; |
| } |
| + float device_scale_factor() const { |
| + DCHECK_EQ(type_, ALPHA_THRESHOLD); |
| + return device_scale_factor_; |
| + } |
| + |
| static FilterOperation CreateGrayscaleFilter(float amount) { |
| return FilterOperation(GRAYSCALE, amount); |
| } |
| @@ -149,10 +154,14 @@ class CC_EXPORT FilterOperation { |
| } |
| static FilterOperation CreateAlphaThresholdFilter(const SkRegion& region, |
| + float device_scale_factor, |
|
danakj
2014/06/17 21:35:28
The fact that you're setting this to the DSF doesn
garykac
2014/07/10 23:02:24
Acknowledged.
|
| float inner_threshold, |
| float outer_threshold) { |
| - return FilterOperation(ALPHA_THRESHOLD, region, |
| - inner_threshold, outer_threshold); |
| + return FilterOperation(ALPHA_THRESHOLD, |
| + region, |
| + device_scale_factor, |
| + inner_threshold, |
| + outer_threshold); |
| } |
| bool operator==(const FilterOperation& other) const; |
| @@ -210,6 +219,11 @@ class CC_EXPORT FilterOperation { |
| region_ = region; |
| } |
| + void set_device_scale_factor(float scale) { |
| + DCHECK_EQ(type_, ALPHA_THRESHOLD); |
| + device_scale_factor_ = scale; |
| + } |
| + |
| // Given two filters of the same type, returns a filter operation created by |
| // linearly interpolating a |progress| fraction from |from| to |to|. If either |
| // |from| or |to| (but not both) is null, it is treated as a no-op filter of |
| @@ -239,6 +253,7 @@ class CC_EXPORT FilterOperation { |
| FilterOperation(FilterType type, |
| const SkRegion& region, |
| + float device_scale_factor, |
| float inner_threshold, |
| float outer_threshold); |
| @@ -251,6 +266,7 @@ class CC_EXPORT FilterOperation { |
| SkScalar matrix_[20]; |
| int zoom_inset_; |
| SkRegion region_; |
| + float device_scale_factor_; |
| }; |
| } // namespace cc |