| 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" | 5 #include "cc/output/filter_operations.h" |
| 6 | 6 |
| 7 #include <cmath> | 7 #include <cmath> |
| 8 | 8 |
| 9 #include "base/debug/trace_event_argument.h" | 9 #include "base/debug/trace_event_argument.h" |
| 10 #include "base/values.h" | 10 #include "base/values.h" |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 | 180 |
| 181 FilterOperations blended_filters; | 181 FilterOperations blended_filters; |
| 182 for (size_t i = 0; i < shorter_size; i++) { | 182 for (size_t i = 0; i < shorter_size; i++) { |
| 183 blended_filters.Append( | 183 blended_filters.Append( |
| 184 FilterOperation::Blend(&from.at(i), &at(i), progress)); | 184 FilterOperation::Blend(&from.at(i), &at(i), progress)); |
| 185 } | 185 } |
| 186 | 186 |
| 187 if (from_is_longer) { | 187 if (from_is_longer) { |
| 188 for (size_t i = shorter_size; i < longer_size; i++) { | 188 for (size_t i = shorter_size; i < longer_size; i++) { |
| 189 blended_filters.Append( | 189 blended_filters.Append( |
| 190 FilterOperation::Blend(&from.at(i), NULL, progress)); | 190 FilterOperation::Blend(&from.at(i), nullptr, progress)); |
| 191 } | 191 } |
| 192 } else { | 192 } else { |
| 193 for (size_t i = shorter_size; i < longer_size; i++) | 193 for (size_t i = shorter_size; i < longer_size; i++) |
| 194 blended_filters.Append(FilterOperation::Blend(NULL, &at(i), progress)); | 194 blended_filters.Append(FilterOperation::Blend(nullptr, &at(i), progress)); |
| 195 } | 195 } |
| 196 | 196 |
| 197 return blended_filters; | 197 return blended_filters; |
| 198 } | 198 } |
| 199 | 199 |
| 200 void FilterOperations::AsValueInto(base::debug::TracedValue* value) const { | 200 void FilterOperations::AsValueInto(base::debug::TracedValue* value) const { |
| 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->BeginDictionary(); |
| 203 operations_[i].AsValueInto(value); | 203 operations_[i].AsValueInto(value); |
| 204 value->EndDictionary(); | 204 value->EndDictionary(); |
| 205 } | 205 } |
| 206 } | 206 } |
| 207 | 207 |
| 208 } // namespace cc | 208 } // namespace cc |
| OLD | NEW |