| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2006 The Android Open Source Project | 3 * Copyright 2006 The Android Open Source Project |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 | 9 |
| 10 #ifndef SkColorFilter_DEFINED | 10 #ifndef SkColorFilter_DEFINED |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 */ | 91 */ |
| 92 kHasFilter16_Flag = 0x02 | 92 kHasFilter16_Flag = 0x02 |
| 93 }; | 93 }; |
| 94 | 94 |
| 95 /** Returns the flags for this filter. Override in subclasses to return | 95 /** Returns the flags for this filter. Override in subclasses to return |
| 96 custom flags. | 96 custom flags. |
| 97 */ | 97 */ |
| 98 virtual uint32_t getFlags() const { return 0; } | 98 virtual uint32_t getFlags() const { return 0; } |
| 99 | 99 |
| 100 /** | 100 /** |
| 101 * If this subclass can optimally createa composition with the inner filter
, return it as |
| 102 * a new filter (which the caller must unref() when it is done). If no such
optimization |
| 103 * is known, return NULL. |
| 104 * |
| 105 * e.g. result(color) == this_filter(inner(color)) |
| 106 */ |
| 107 virtual SkColorFilter* newComposed(const SkColorFilter* /*inner*/) const { r
eturn NULL; } |
| 108 |
| 109 /** |
| 101 * Apply this colorfilter to the specified SkColor. This routine handles | 110 * Apply this colorfilter to the specified SkColor. This routine handles |
| 102 * converting to SkPMColor, calling the filter, and then converting back | 111 * converting to SkPMColor, calling the filter, and then converting back |
| 103 * to SkColor. This method is not virtual, but will call filterSpan() | 112 * to SkColor. This method is not virtual, but will call filterSpan() |
| 104 * which is virtual. | 113 * which is virtual. |
| 105 */ | 114 */ |
| 106 SkColor filterColor(SkColor) const; | 115 SkColor filterColor(SkColor) const; |
| 107 | 116 |
| 108 /** Create a colorfilter that uses the specified color and mode. | 117 /** Create a colorfilter that uses the specified color and mode. |
| 109 If the Mode is DST, this function will return NULL (since that | 118 If the Mode is DST, this function will return NULL (since that |
| 110 mode will have no effect on the result). | 119 mode will have no effect on the result). |
| (...skipping 29 matching lines...) Expand all Loading... |
| 140 SK_DEFINE_FLATTENABLE_TYPE(SkColorFilter) | 149 SK_DEFINE_FLATTENABLE_TYPE(SkColorFilter) |
| 141 | 150 |
| 142 protected: | 151 protected: |
| 143 SkColorFilter() {} | 152 SkColorFilter() {} |
| 144 | 153 |
| 145 private: | 154 private: |
| 146 typedef SkFlattenable INHERITED; | 155 typedef SkFlattenable INHERITED; |
| 147 }; | 156 }; |
| 148 | 157 |
| 149 #endif | 158 #endif |
| OLD | NEW |