| 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 <cmath> | 5 #include <cmath> |
| 6 | 6 |
| 7 #include "cc/output/filter_operations.h" |
| 8 |
| 9 #include "base/values.h" |
| 7 #include "cc/output/filter_operation.h" | 10 #include "cc/output/filter_operation.h" |
| 8 #include "cc/output/filter_operations.h" | |
| 9 | 11 |
| 10 namespace cc { | 12 namespace cc { |
| 11 | 13 |
| 12 FilterOperations::FilterOperations() {} | 14 FilterOperations::FilterOperations() {} |
| 13 | 15 |
| 14 FilterOperations::FilterOperations(const FilterOperations& other) | 16 FilterOperations::FilterOperations(const FilterOperations& other) |
| 15 : operations_(other.operations_) {} | 17 : operations_(other.operations_) {} |
| 16 | 18 |
| 17 FilterOperations::~FilterOperations() {} | 19 FilterOperations::~FilterOperations() {} |
| 18 | 20 |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 } | 140 } |
| 139 | 141 |
| 140 for (size_t i = 0; i < size(); i++) { | 142 for (size_t i = 0; i < size(); i++) { |
| 141 blended_filters.Append( | 143 blended_filters.Append( |
| 142 FilterOperation::Blend(&from.at(i), &at(i), progress)); | 144 FilterOperation::Blend(&from.at(i), &at(i), progress)); |
| 143 } | 145 } |
| 144 | 146 |
| 145 return blended_filters; | 147 return blended_filters; |
| 146 } | 148 } |
| 147 | 149 |
| 150 scoped_ptr<base::Value> FilterOperations::AsValue() const { |
| 151 scoped_ptr<base::ListValue> value(new ListValue); |
| 152 for (size_t i = 0; i < operations_.size(); ++i) |
| 153 value->Append(operations_[i].AsValue().release()); |
| 154 return value.PassAs<base::Value>(); |
| 155 } |
| 156 |
| 148 } // namespace cc | 157 } // namespace cc |
| OLD | NEW |