Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(309)

Side by Side Diff: src/codec/SkMasks.cpp

Issue 1316233002: Style Change: NULL->nullptr (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-08-27 (Thursday) 10:25:06 EDT Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/codec/SkMaskSwizzler.cpp ('k') | src/codec/SkScaledCodec.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 masks.red &= (1 << bitsPerPixel) - 1; 132 masks.red &= (1 << bitsPerPixel) - 1;
133 masks.green &= (1 << bitsPerPixel) - 1; 133 masks.green &= (1 << bitsPerPixel) - 1;
134 masks.blue &= (1 << bitsPerPixel) - 1; 134 masks.blue &= (1 << bitsPerPixel) - 1;
135 masks.alpha &= (1 << bitsPerPixel) - 1; 135 masks.alpha &= (1 << bitsPerPixel) - 1;
136 } 136 }
137 137
138 // Check that masks do not overlap 138 // Check that masks do not overlap
139 if (((masks.red & masks.green) | (masks.red & masks.blue) | 139 if (((masks.red & masks.green) | (masks.red & masks.blue) |
140 (masks.red & masks.alpha) | (masks.green & masks.blue) | 140 (masks.red & masks.alpha) | (masks.green & masks.blue) |
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 nullptr;
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 new 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 {}
OLDNEW
« no previous file with comments | « src/codec/SkMaskSwizzler.cpp ('k') | src/codec/SkScaledCodec.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698