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

Side by Side Diff: include/core/SkBitmap.h

Issue 2074103004: Revert of More removal of SkColorProfileType... (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 6 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 | « gyp/core.gypi ('k') | include/private/SkImageInfoPriv.h » ('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 2006 The Android Open Source Project 2 * Copyright 2006 The Android Open Source Project
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 SkBitmap_DEFINED 8 #ifndef SkBitmap_DEFINED
9 #define SkBitmap_DEFINED 9 #define SkBitmap_DEFINED
10 10
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 79
80 /////////////////////////////////////////////////////////////////////////// 80 ///////////////////////////////////////////////////////////////////////////
81 81
82 const SkImageInfo& info() const { return fInfo; } 82 const SkImageInfo& info() const { return fInfo; }
83 83
84 int width() const { return fInfo.width(); } 84 int width() const { return fInfo.width(); }
85 int height() const { return fInfo.height(); } 85 int height() const { return fInfo.height(); }
86 SkColorType colorType() const { return fInfo.colorType(); } 86 SkColorType colorType() const { return fInfo.colorType(); }
87 SkAlphaType alphaType() const { return fInfo.alphaType(); } 87 SkAlphaType alphaType() const { return fInfo.alphaType(); }
88 SkColorSpace* colorSpace() const { return fInfo.colorSpace(); } 88 SkColorSpace* colorSpace() const { return fInfo.colorSpace(); }
89 #ifdef SK_SUPPORT_LEGACY_COLORPROFILETYPE
90 SkColorProfileType profileType() const { return fInfo.profileType(); }
91 #endif
89 92
90 /** 93 /**
91 * Return the number of bytes per pixel based on the colortype. If the colo rtype is 94 * Return the number of bytes per pixel based on the colortype. If the colo rtype is
92 * kUnknown_SkColorType, then 0 is returned. 95 * kUnknown_SkColorType, then 0 is returned.
93 */ 96 */
94 int bytesPerPixel() const { return fInfo.bytesPerPixel(); } 97 int bytesPerPixel() const { return fInfo.bytesPerPixel(); }
95 98
96 /** 99 /**
97 * Return the rowbytes expressed as a number of pixels (like width and heig ht). 100 * Return the rowbytes expressed as a number of pixels (like width and heig ht).
98 * If the colortype is kUnknown_SkColorType, then 0 is returned. 101 * If the colortype is kUnknown_SkColorType, then 0 is returned.
(...skipping 726 matching lines...) Expand 10 before | Expand all | Expand 10 after
825 828
826 inline SkPMColor SkBitmap::getIndex8Color(int x, int y) const { 829 inline SkPMColor SkBitmap::getIndex8Color(int x, int y) const {
827 SkASSERT(fPixels); 830 SkASSERT(fPixels);
828 SkASSERT(kIndex_8_SkColorType == this->colorType()); 831 SkASSERT(kIndex_8_SkColorType == this->colorType());
829 SkASSERT((unsigned)x < (unsigned)this->width() && (unsigned)y < (unsigned)th is->height()); 832 SkASSERT((unsigned)x < (unsigned)this->width() && (unsigned)y < (unsigned)th is->height());
830 SkASSERT(fColorTable); 833 SkASSERT(fColorTable);
831 return (*fColorTable)[*((const uint8_t*)fPixels + y * fRowBytes + x)]; 834 return (*fColorTable)[*((const uint8_t*)fPixels + y * fRowBytes + x)];
832 } 835 }
833 836
834 #endif 837 #endif
OLDNEW
« no previous file with comments | « gyp/core.gypi ('k') | include/private/SkImageInfoPriv.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698