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/debug/trace_event_argument.h" | 7 #include "base/debug/trace_event_argument.h" |
8 #include "base/values.h" | 8 #include "base/values.h" |
9 #include "cc/base/math_util.h" | 9 #include "cc/base/math_util.h" |
10 #include "cc/output/filter_operation.h" | 10 #include "cc/output/filter_operation.h" |
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
265 case FilterOperation::INVERT: | 265 case FilterOperation::INVERT: |
266 case FilterOperation::BRIGHTNESS: | 266 case FilterOperation::BRIGHTNESS: |
267 case FilterOperation::CONTRAST: | 267 case FilterOperation::CONTRAST: |
268 case FilterOperation::OPACITY: | 268 case FilterOperation::OPACITY: |
269 case FilterOperation::BLUR: | 269 case FilterOperation::BLUR: |
270 case FilterOperation::SATURATING_BRIGHTNESS: | 270 case FilterOperation::SATURATING_BRIGHTNESS: |
271 value->SetDouble("amount", amount_); | 271 value->SetDouble("amount", amount_); |
272 break; | 272 break; |
273 case FilterOperation::DROP_SHADOW: | 273 case FilterOperation::DROP_SHADOW: |
274 value->SetDouble("std_deviation", amount_); | 274 value->SetDouble("std_deviation", amount_); |
275 value->BeginArray("offset"); | 275 MathUtil::AddToTracedValue("offset", drop_shadow_offset_, value); |
276 MathUtil::AddToTracedValue(drop_shadow_offset_, value); | |
277 value->EndArray(); | |
278 value->SetInteger("color", drop_shadow_color_); | 276 value->SetInteger("color", drop_shadow_color_); |
279 break; | 277 break; |
280 case FilterOperation::COLOR_MATRIX: { | 278 case FilterOperation::COLOR_MATRIX: { |
281 value->BeginArray("matrix"); | 279 value->BeginArray("matrix"); |
282 for (size_t i = 0; i < arraysize(matrix_); ++i) | 280 for (size_t i = 0; i < arraysize(matrix_); ++i) |
283 value->AppendDouble(matrix_[i]); | 281 value->AppendDouble(matrix_[i]); |
284 value->EndArray(); | 282 value->EndArray(); |
285 break; | 283 break; |
286 } | 284 } |
287 case FilterOperation::ZOOM: | 285 case FilterOperation::ZOOM: |
(...skipping 23 matching lines...) Expand all Loading... |
311 value->AppendInteger(it.rect().width()); | 309 value->AppendInteger(it.rect().width()); |
312 value->AppendInteger(it.rect().height()); | 310 value->AppendInteger(it.rect().height()); |
313 } | 311 } |
314 value->EndArray(); | 312 value->EndArray(); |
315 } | 313 } |
316 break; | 314 break; |
317 } | 315 } |
318 } | 316 } |
319 | 317 |
320 } // namespace cc | 318 } // namespace cc |
OLD | NEW |