OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 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 #ifndef SkImageInfo_DEFINED | 8 #ifndef SkImageInfo_DEFINED |
9 #define SkImageInfo_DEFINED | 9 #define SkImageInfo_DEFINED |
10 | 10 |
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
292 return sk_64_asS32(size); | 292 return sk_64_asS32(size); |
293 } | 293 } |
294 | 294 |
295 bool validRowBytes(size_t rowBytes) const { | 295 bool validRowBytes(size_t rowBytes) const { |
296 uint64_t rb = sk_64_mul(fWidth, this->bytesPerPixel()); | 296 uint64_t rb = sk_64_mul(fWidth, this->bytesPerPixel()); |
297 return rowBytes >= rb; | 297 return rowBytes >= rb; |
298 } | 298 } |
299 | 299 |
300 SkDEBUGCODE(void validate() const;) | 300 SkDEBUGCODE(void validate() const;) |
301 | 301 |
302 #ifdef SK_SUPPORT_LEGACY_PUBLIC_IMAGEINFO_FIELDS | |
303 public: | |
304 #else | |
305 private: | 302 private: |
306 #endif | |
307 int fWidth; | 303 int fWidth; |
308 int fHeight; | 304 int fHeight; |
309 SkColorType fColorType; | 305 SkColorType fColorType; |
310 SkAlphaType fAlphaType; | 306 SkAlphaType fAlphaType; |
| 307 SkColorProfileType fProfileType; |
311 | 308 |
312 private: | |
313 SkImageInfo(int width, int height, SkColorType ct, SkAlphaType at, SkColorPr
ofileType pt) | 309 SkImageInfo(int width, int height, SkColorType ct, SkAlphaType at, SkColorPr
ofileType pt) |
314 : fWidth(width) | 310 : fWidth(width) |
315 , fHeight(height) | 311 , fHeight(height) |
316 , fColorType(ct) | 312 , fColorType(ct) |
317 , fAlphaType(at) | 313 , fAlphaType(at) |
318 , fProfileType(pt) | 314 , fProfileType(pt) |
319 {} | 315 {} |
320 | |
321 SkColorProfileType fProfileType; | |
322 }; | 316 }; |
323 | 317 |
324 #endif | 318 #endif |
OLD | NEW |