| 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 #ifndef CC_OUTPUT_FILTER_OPERATIONS_H_ | 5 #ifndef CC_OUTPUT_FILTER_OPERATIONS_H_ |
| 6 #define CC_OUTPUT_FILTER_OPERATIONS_H_ | 6 #define CC_OUTPUT_FILTER_OPERATIONS_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| 11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| 12 #include "cc/output/filter_operation.h" | 12 #include "cc/output/filter_operation.h" |
| 13 | 13 |
| 14 namespace base { | 14 namespace base { |
| 15 namespace debug { |
| 16 class TracedValue; |
| 17 } |
| 15 class Value; | 18 class Value; |
| 16 } | 19 } |
| 17 | 20 |
| 18 namespace cc { | 21 namespace cc { |
| 19 | 22 |
| 20 // An ordered list of filter operations. | 23 // An ordered list of filter operations. |
| 21 class CC_EXPORT FilterOperations { | 24 class CC_EXPORT FilterOperations { |
| 22 public: | 25 public: |
| 23 FilterOperations(); | 26 FilterOperations(); |
| 24 | 27 |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 // contain any reference filters, returns a FilterOperations formed by | 63 // contain any reference filters, returns a FilterOperations formed by |
| 61 // linearly interpolating at each position a |progress| fraction of the way | 64 // linearly interpolating at each position a |progress| fraction of the way |
| 62 // from the filter in |from| to the filter in this. If |from| and this are of | 65 // from the filter in |from| to the filter in this. If |from| and this are of |
| 63 // different lengths, they are treated as having the same length by padding | 66 // different lengths, they are treated as having the same length by padding |
| 64 // the shorter sequence with no-op filters of the same type as the filters in | 67 // the shorter sequence with no-op filters of the same type as the filters in |
| 65 // the corresponding positions in the longer sequence. If either sequence has | 68 // the corresponding positions in the longer sequence. If either sequence has |
| 66 // a reference filter or if there is a type mismatch at some position, returns | 69 // a reference filter or if there is a type mismatch at some position, returns |
| 67 // a copy of this. | 70 // a copy of this. |
| 68 FilterOperations Blend(const FilterOperations& from, double progress) const; | 71 FilterOperations Blend(const FilterOperations& from, double progress) const; |
| 69 | 72 |
| 70 | 73 void AsValueInto(base::debug::TracedValue* value) const; |
| 71 scoped_ptr<base::Value> AsValue() const; | |
| 72 | 74 |
| 73 private: | 75 private: |
| 74 std::vector<FilterOperation> operations_; | 76 std::vector<FilterOperation> operations_; |
| 75 }; | 77 }; |
| 76 | 78 |
| 77 } // namespace cc | 79 } // namespace cc |
| 78 | 80 |
| 79 #endif // CC_OUTPUT_FILTER_OPERATIONS_H_ | 81 #endif // CC_OUTPUT_FILTER_OPERATIONS_H_ |
| OLD | NEW |