| OLD | NEW |
| (Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CC_OUTPUT_FILTER_OPERATIONS_H_ |
| 6 #define CC_OUTPUT_FILTER_OPERATIONS_H_ |
| 7 |
| 8 #include <vector> |
| 9 |
| 10 #include "base/logging.h" |
| 11 #include "cc/output/filter_operation.h" |
| 12 |
| 13 namespace cc { |
| 14 |
| 15 // An ordered list of filter operations. |
| 16 class CC_EXPORT FilterOperations { |
| 17 public: |
| 18 FilterOperations(); |
| 19 |
| 20 FilterOperations(const FilterOperations& other); |
| 21 |
| 22 ~FilterOperations(); |
| 23 |
| 24 FilterOperations& operator=(const FilterOperations& other); |
| 25 |
| 26 bool operator==(const FilterOperations& other) const; |
| 27 |
| 28 bool operator!=(const FilterOperations& other) const { |
| 29 return !(*this == other); |
| 30 } |
| 31 |
| 32 void Append(const FilterOperation& filter); |
| 33 |
| 34 // Removes all filter operations. |
| 35 void Clear(); |
| 36 |
| 37 bool IsEmpty() const; |
| 38 |
| 39 void GetOutsets(int* top, int* right, int* bottom, int* left) const; |
| 40 bool HasFilterThatMovesPixels() const; |
| 41 bool HasFilterThatAffectsOpacity() const; |
| 42 |
| 43 size_t size() const { |
| 44 return operations_.size(); |
| 45 } |
| 46 |
| 47 FilterOperation at(size_t index) const { |
| 48 DCHECK_LT(index, size()); |
| 49 return operations_[index]; |
| 50 } |
| 51 |
| 52 private: |
| 53 std::vector<FilterOperation> operations_; |
| 54 }; |
| 55 |
| 56 } // namespace cc |
| 57 |
| 58 #endif // CC_OUTPUT_FILTER_OPERATIONS_H_ |
| OLD | NEW |