| 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 | 51 |
| 52 // Removes all filter operations. | 52 // Removes all filter operations. |
| 53 void Clear(); | 53 void Clear(); |
| 54 | 54 |
| 55 bool IsEmpty() const; | 55 bool IsEmpty() const; |
| 56 | 56 |
| 57 // Maps "forward" to determine which pixels in a destination rect are affected | 57 // Maps "forward" to determine which pixels in a destination rect are affected |
| 58 // by pixels in the source rect. | 58 // by pixels in the source rect. |
| 59 gfx::Rect MapRect(const gfx::Rect& rect, const SkMatrix& matrix) const; | 59 gfx::Rect MapRect(const gfx::Rect& rect, const SkMatrix& matrix) const; |
| 60 | 60 |
| 61 // Maps "backward" to determine which pixels in the source affect the pixels |
| 62 // in the destination rect. |
| 63 gfx::Rect MapRectReverse(const gfx::Rect& rect, const SkMatrix& matrix) const; |
| 64 |
| 61 void GetOutsets(int* top, int* right, int* bottom, int* left) const; | 65 void GetOutsets(int* top, int* right, int* bottom, int* left) const; |
| 62 bool HasFilterThatMovesPixels() const; | 66 bool HasFilterThatMovesPixels() const; |
| 63 bool HasFilterThatAffectsOpacity() const; | 67 bool HasFilterThatAffectsOpacity() const; |
| 64 bool HasReferenceFilter() const; | 68 bool HasReferenceFilter() const; |
| 65 | 69 |
| 66 size_t size() const { | 70 size_t size() const { |
| 67 return operations_.size(); | 71 return operations_.size(); |
| 68 } | 72 } |
| 69 | 73 |
| 70 const std::vector<FilterOperation>& operations() const { return operations_; } | 74 const std::vector<FilterOperation>& operations() const { return operations_; } |
| (...skipping 17 matching lines...) Expand all Loading... |
| 88 | 92 |
| 89 void AsValueInto(base::trace_event::TracedValue* value) const; | 93 void AsValueInto(base::trace_event::TracedValue* value) const; |
| 90 | 94 |
| 91 private: | 95 private: |
| 92 std::vector<FilterOperation> operations_; | 96 std::vector<FilterOperation> operations_; |
| 93 }; | 97 }; |
| 94 | 98 |
| 95 } // namespace cc | 99 } // namespace cc |
| 96 | 100 |
| 97 #endif // CC_OUTPUT_FILTER_OPERATIONS_H_ | 101 #endif // CC_OUTPUT_FILTER_OPERATIONS_H_ |
| OLD | NEW |