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 #include <algorithm> | 5 #include <algorithm> |
6 | 6 |
7 #include "base/values.h" | 7 #include "base/values.h" |
8 #include "cc/base/math_util.h" | 8 #include "cc/base/math_util.h" |
9 #include "cc/output/filter_operation.h" | 9 #include "cc/output/filter_operation.h" |
10 #include "third_party/skia/include/core/SkMath.h" | 10 #include "third_party/skia/include/core/SkMath.h" |
(...skipping 22 matching lines...) Expand all Loading... |
33 drop_shadow_offset_(0, 0), | 33 drop_shadow_offset_(0, 0), |
34 drop_shadow_color_(0), | 34 drop_shadow_color_(0), |
35 zoom_inset_(0) { | 35 zoom_inset_(0) { |
36 DCHECK_NE(type_, DROP_SHADOW); | 36 DCHECK_NE(type_, DROP_SHADOW); |
37 DCHECK_NE(type_, COLOR_MATRIX); | 37 DCHECK_NE(type_, COLOR_MATRIX); |
38 DCHECK_NE(type_, REFERENCE); | 38 DCHECK_NE(type_, REFERENCE); |
39 memset(matrix_, 0, sizeof(matrix_)); | 39 memset(matrix_, 0, sizeof(matrix_)); |
40 } | 40 } |
41 | 41 |
42 FilterOperation::FilterOperation(FilterType type, | 42 FilterOperation::FilterOperation(FilterType type, |
43 gfx::Point offset, | 43 const gfx::Point& offset, |
44 float stdDeviation, | 44 float stdDeviation, |
45 SkColor color) | 45 SkColor color) |
46 : type_(type), | 46 : type_(type), |
47 amount_(stdDeviation), | 47 amount_(stdDeviation), |
48 drop_shadow_offset_(offset), | 48 drop_shadow_offset_(offset), |
49 drop_shadow_color_(color), | 49 drop_shadow_color_(color), |
50 zoom_inset_(0) { | 50 zoom_inset_(0) { |
51 DCHECK_EQ(type_, DROP_SHADOW); | 51 DCHECK_EQ(type_, DROP_SHADOW); |
52 memset(matrix_, 0, sizeof(matrix_)); | 52 memset(matrix_, 0, sizeof(matrix_)); |
53 } | 53 } |
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
260 value->SetBoolean("is_null", !image_filter_); | 260 value->SetBoolean("is_null", !image_filter_); |
261 value->SetInteger("count_inputs", count_inputs); | 261 value->SetInteger("count_inputs", count_inputs); |
262 value->SetBoolean("can_filter_image_gpu", can_filter_image_gpu); | 262 value->SetBoolean("can_filter_image_gpu", can_filter_image_gpu); |
263 break; | 263 break; |
264 } | 264 } |
265 } | 265 } |
266 return value.PassAs<base::Value>(); | 266 return value.PassAs<base::Value>(); |
267 } | 267 } |
268 | 268 |
269 } // namespace cc | 269 } // namespace cc |
OLD | NEW |