| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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/output/render_surface_filters.h" | 5 #include "cc/output/render_surface_filters.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "cc/output/filter_operation.h" | 10 #include "cc/output/filter_operation.h" |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 break; | 202 break; |
| 203 case FilterOperation::BLUR: | 203 case FilterOperation::BLUR: |
| 204 image_filter = skia::AdoptRef(SkBlurImageFilter::Create( | 204 image_filter = skia::AdoptRef(SkBlurImageFilter::Create( |
| 205 op.amount(), op.amount(), image_filter.get())); | 205 op.amount(), op.amount(), image_filter.get())); |
| 206 break; | 206 break; |
| 207 case FilterOperation::DROP_SHADOW: | 207 case FilterOperation::DROP_SHADOW: |
| 208 image_filter = skia::AdoptRef(SkDropShadowImageFilter::Create( | 208 image_filter = skia::AdoptRef(SkDropShadowImageFilter::Create( |
| 209 SkIntToScalar(op.drop_shadow_offset().x()), | 209 SkIntToScalar(op.drop_shadow_offset().x()), |
| 210 SkIntToScalar(op.drop_shadow_offset().y()), | 210 SkIntToScalar(op.drop_shadow_offset().y()), |
| 211 SkIntToScalar(op.amount()), | 211 SkIntToScalar(op.amount()), |
| 212 SkIntToScalar(op.amount()), |
| 212 op.drop_shadow_color(), | 213 op.drop_shadow_color(), |
| 213 image_filter.get())); | 214 image_filter.get())); |
| 214 break; | 215 break; |
| 215 case FilterOperation::COLOR_MATRIX: | 216 case FilterOperation::COLOR_MATRIX: |
| 216 image_filter = CreateMatrixImageFilter(op.matrix(), image_filter); | 217 image_filter = CreateMatrixImageFilter(op.matrix(), image_filter); |
| 217 break; | 218 break; |
| 218 case FilterOperation::ZOOM: { | 219 case FilterOperation::ZOOM: { |
| 219 skia::RefPtr<SkImageFilter> zoom_filter = | 220 skia::RefPtr<SkImageFilter> zoom_filter = |
| 220 skia::AdoptRef(SkMagnifierImageFilter::Create( | 221 skia::AdoptRef(SkMagnifierImageFilter::Create( |
| 221 SkRect::MakeXYWH( | 222 SkRect::MakeXYWH( |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 273 image_filter = alpha_filter; | 274 image_filter = alpha_filter; |
| 274 } | 275 } |
| 275 break; | 276 break; |
| 276 } | 277 } |
| 277 } | 278 } |
| 278 } | 279 } |
| 279 return image_filter; | 280 return image_filter; |
| 280 } | 281 } |
| 281 | 282 |
| 282 } // namespace cc | 283 } // namespace cc |
| OLD | NEW |