| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2011 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 } | 103 } |
| 104 | 104 |
| 105 // True if the alpha channel of any pixel can change under this operation. | 105 // True if the alpha channel of any pixel can change under this operation. |
| 106 virtual bool AffectsOpacity() const { return false; } | 106 virtual bool AffectsOpacity() const { return false; } |
| 107 // True if the the value of one pixel can affect the value of another pixel | 107 // True if the the value of one pixel can affect the value of another pixel |
| 108 // under this operation, such as blur. | 108 // under this operation, such as blur. |
| 109 virtual bool MovesPixels() const { return false; } | 109 virtual bool MovesPixels() const { return false; } |
| 110 | 110 |
| 111 // Maps "forward" to determine which pixels in a destination rect are | 111 // Maps "forward" to determine which pixels in a destination rect are |
| 112 // affected by pixels in the source rect. | 112 // affected by pixels in the source rect. |
| 113 // See also FilterEffect::mapRect. | 113 // See also FilterEffect::MapRect. |
| 114 virtual FloatRect MapRect(const FloatRect& rect) const { return rect; } | 114 virtual FloatRect MapRect(const FloatRect& rect) const { return rect; } |
| 115 | 115 |
| 116 protected: | 116 protected: |
| 117 FilterOperation(OperationType type) : type_(type) {} | 117 FilterOperation(OperationType type) : type_(type) {} |
| 118 | 118 |
| 119 OperationType type_; | 119 OperationType type_; |
| 120 | 120 |
| 121 private: | 121 private: |
| 122 virtual FilterOperation* Blend(const FilterOperation* from, | 122 virtual FilterOperation* Blend(const FilterOperation* from, |
| 123 double progress) const = 0; | 123 double progress) const = 0; |
| (...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 338 BoxReflectFilterOperation(const BoxReflection& reflection) | 338 BoxReflectFilterOperation(const BoxReflection& reflection) |
| 339 : FilterOperation(BOX_REFLECT), reflection_(reflection) {} | 339 : FilterOperation(BOX_REFLECT), reflection_(reflection) {} |
| 340 | 340 |
| 341 BoxReflection reflection_; | 341 BoxReflection reflection_; |
| 342 }; | 342 }; |
| 343 DEFINE_FILTER_OPERATION_TYPE_CASTS(BoxReflectFilterOperation, BOX_REFLECT); | 343 DEFINE_FILTER_OPERATION_TYPE_CASTS(BoxReflectFilterOperation, BOX_REFLECT); |
| 344 | 344 |
| 345 } // namespace blink | 345 } // namespace blink |
| 346 | 346 |
| 347 #endif // FilterOperation_h | 347 #endif // FilterOperation_h |
| OLD | NEW |