| 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 <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 | 47 |
| 48 // Removes all filter operations. | 48 // Removes all filter operations. |
| 49 void Clear(); | 49 void Clear(); |
| 50 | 50 |
| 51 bool IsEmpty() const; | 51 bool IsEmpty() const; |
| 52 | 52 |
| 53 // Maps "forward" to determine which pixels in a destination rect are affected | 53 // Maps "forward" to determine which pixels in a destination rect are affected |
| 54 // by pixels in the source rect. | 54 // by pixels in the source rect. |
| 55 gfx::Rect MapRect(const gfx::Rect& rect, const SkMatrix& matrix) const; | 55 gfx::Rect MapRect(const gfx::Rect& rect, const SkMatrix& matrix) const; |
| 56 | 56 |
| 57 // Maps "backward" to determine which pixels in the source affect the pixels |
| 58 // in the destination rect. |
| 59 gfx::Rect MapRectReverse(const gfx::Rect& rect, const SkMatrix& matrix) const; |
| 60 |
| 57 void GetOutsets(int* top, int* right, int* bottom, int* left) const; | 61 void GetOutsets(int* top, int* right, int* bottom, int* left) const; |
| 58 bool HasFilterThatMovesPixels() const; | 62 bool HasFilterThatMovesPixels() const; |
| 59 bool HasFilterThatAffectsOpacity() const; | 63 bool HasFilterThatAffectsOpacity() const; |
| 60 bool HasReferenceFilter() const; | 64 bool HasReferenceFilter() const; |
| 61 | 65 |
| 62 size_t size() const { | 66 size_t size() const { |
| 63 return operations_.size(); | 67 return operations_.size(); |
| 64 } | 68 } |
| 65 | 69 |
| 66 const FilterOperation& at(size_t index) const { | 70 const FilterOperation& at(size_t index) const { |
| (...skipping 15 matching lines...) Expand all Loading... |
| 82 | 86 |
| 83 void AsValueInto(base::trace_event::TracedValue* value) const; | 87 void AsValueInto(base::trace_event::TracedValue* value) const; |
| 84 | 88 |
| 85 private: | 89 private: |
| 86 std::vector<FilterOperation> operations_; | 90 std::vector<FilterOperation> operations_; |
| 87 }; | 91 }; |
| 88 | 92 |
| 89 } // namespace cc | 93 } // namespace cc |
| 90 | 94 |
| 91 #endif // CC_OUTPUT_FILTER_OPERATIONS_H_ | 95 #endif // CC_OUTPUT_FILTER_OPERATIONS_H_ |
| OLD | NEW |