| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_OUTPUT_FILTER_OPERATION_H_ | 5 #ifndef CC_OUTPUT_FILTER_OPERATION_H_ |
| 6 #define CC_OUTPUT_FILTER_OPERATION_H_ | 6 #define CC_OUTPUT_FILTER_OPERATION_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 224 // or if |from| and |to| are non-null but of different types, returns a | 224 // or if |from| and |to| are non-null but of different types, returns a |
| 225 // no-op filter. | 225 // no-op filter. |
| 226 static FilterOperation Blend(const FilterOperation* from, | 226 static FilterOperation Blend(const FilterOperation* from, |
| 227 const FilterOperation* to, | 227 const FilterOperation* to, |
| 228 double progress); | 228 double progress); |
| 229 | 229 |
| 230 void AsValueInto(base::trace_event::TracedValue* value) const; | 230 void AsValueInto(base::trace_event::TracedValue* value) const; |
| 231 | 231 |
| 232 // Maps "forward" to determine which pixels in a destination rect are affected | 232 // Maps "forward" to determine which pixels in a destination rect are affected |
| 233 // by pixels in the source rect. | 233 // by pixels in the source rect. |
| 234 gfx::Rect MapRect(const gfx::Rect& rect) const; | 234 gfx::Rect MapRect(const gfx::Rect& rect, const SkMatrix& matrix) const; |
| 235 | 235 |
| 236 private: | 236 private: |
| 237 FilterOperation(FilterType type, float amount); | 237 FilterOperation(FilterType type, float amount); |
| 238 | 238 |
| 239 FilterOperation(FilterType type, | 239 FilterOperation(FilterType type, |
| 240 const gfx::Point& offset, | 240 const gfx::Point& offset, |
| 241 float stdDeviation, | 241 float stdDeviation, |
| 242 SkColor color); | 242 SkColor color); |
| 243 | 243 |
| 244 FilterOperation(FilterType, SkScalar matrix[20]); | 244 FilterOperation(FilterType, SkScalar matrix[20]); |
| (...skipping 14 matching lines...) Expand all Loading... |
| 259 SkColor drop_shadow_color_; | 259 SkColor drop_shadow_color_; |
| 260 sk_sp<SkImageFilter> image_filter_; | 260 sk_sp<SkImageFilter> image_filter_; |
| 261 SkScalar matrix_[20]; | 261 SkScalar matrix_[20]; |
| 262 int zoom_inset_; | 262 int zoom_inset_; |
| 263 SkRegion region_; | 263 SkRegion region_; |
| 264 }; | 264 }; |
| 265 | 265 |
| 266 } // namespace cc | 266 } // namespace cc |
| 267 | 267 |
| 268 #endif // CC_OUTPUT_FILTER_OPERATION_H_ | 268 #endif // CC_OUTPUT_FILTER_OPERATION_H_ |
| OLD | NEW |