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 "cc/output/filter_operations.h" |
| 6 |
5 #include <cmath> | 7 #include <cmath> |
6 | 8 |
7 #include "cc/output/filter_operations.h" | 9 #include "base/debug/trace_event_argument.h" |
8 | |
9 #include "base/values.h" | 10 #include "base/values.h" |
10 #include "cc/output/filter_operation.h" | 11 #include "cc/output/filter_operation.h" |
11 | 12 |
12 namespace cc { | 13 namespace cc { |
13 | 14 |
14 FilterOperations::FilterOperations() {} | 15 FilterOperations::FilterOperations() {} |
15 | 16 |
16 FilterOperations::FilterOperations(const FilterOperations& other) | 17 FilterOperations::FilterOperations(const FilterOperations& other) |
17 : operations_(other.operations_) {} | 18 : operations_(other.operations_) {} |
18 | 19 |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 FilterOperation::Blend(&from.at(i), NULL, progress)); | 190 FilterOperation::Blend(&from.at(i), NULL, progress)); |
190 } | 191 } |
191 } else { | 192 } else { |
192 for (size_t i = shorter_size; i < longer_size; i++) | 193 for (size_t i = shorter_size; i < longer_size; i++) |
193 blended_filters.Append(FilterOperation::Blend(NULL, &at(i), progress)); | 194 blended_filters.Append(FilterOperation::Blend(NULL, &at(i), progress)); |
194 } | 195 } |
195 | 196 |
196 return blended_filters; | 197 return blended_filters; |
197 } | 198 } |
198 | 199 |
199 scoped_ptr<base::Value> FilterOperations::AsValue() const { | 200 void FilterOperations::AsValueInto(base::debug::TracedValue* value) const { |
200 scoped_ptr<base::ListValue> value(new base::ListValue); | 201 for (size_t i = 0; i < operations_.size(); ++i) { |
201 for (size_t i = 0; i < operations_.size(); ++i) | 202 value->BeginDictionary(); |
202 value->Append(operations_[i].AsValue().release()); | 203 operations_[i].AsValueInto(value); |
203 return value.PassAs<base::Value>(); | 204 value->EndDictionary(); |
| 205 } |
204 } | 206 } |
205 | 207 |
206 } // namespace cc | 208 } // namespace cc |
OLD | NEW |