| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #include "SkCodecPriv.h" | 8 #include "SkCodecPriv.h" |
| 9 #include "SkMasks.h" | 9 #include "SkMasks.h" |
| 10 #include "SkTypes.h" | 10 #include "SkTypes.h" |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 (masks.green & masks.alpha) | (masks.blue & masks.alpha)) != 0) { | 141 (masks.green & masks.alpha) | (masks.blue & masks.alpha)) != 0) { |
| 142 return NULL; | 142 return NULL; |
| 143 } | 143 } |
| 144 | 144 |
| 145 // Collect information about the masks | 145 // Collect information about the masks |
| 146 const MaskInfo red = process_mask(masks.red, bitsPerPixel); | 146 const MaskInfo red = process_mask(masks.red, bitsPerPixel); |
| 147 const MaskInfo green = process_mask(masks.green, bitsPerPixel); | 147 const MaskInfo green = process_mask(masks.green, bitsPerPixel); |
| 148 const MaskInfo blue = process_mask(masks.blue, bitsPerPixel); | 148 const MaskInfo blue = process_mask(masks.blue, bitsPerPixel); |
| 149 const MaskInfo alpha = process_mask(masks.alpha, bitsPerPixel); | 149 const MaskInfo alpha = process_mask(masks.alpha, bitsPerPixel); |
| 150 | 150 |
| 151 return SkNEW_ARGS(SkMasks, (red, green, blue, alpha)); | 151 return new SkMasks(red, green, blue, alpha); |
| 152 } | 152 } |
| 153 | 153 |
| 154 | 154 |
| 155 SkMasks::SkMasks(const MaskInfo red, const MaskInfo green, | 155 SkMasks::SkMasks(const MaskInfo red, const MaskInfo green, |
| 156 const MaskInfo blue, const MaskInfo alpha) | 156 const MaskInfo blue, const MaskInfo alpha) |
| 157 : fRed(red) | 157 : fRed(red) |
| 158 , fGreen(green) | 158 , fGreen(green) |
| 159 , fBlue(blue) | 159 , fBlue(blue) |
| 160 , fAlpha(alpha) | 160 , fAlpha(alpha) |
| 161 {} | 161 {} |
| OLD | NEW |