aboutsummaryrefslogtreecommitdiffhomepage
path: root/site/user/api/SkBitmap_Reference.md
diff options
context:
space:
mode:
Diffstat (limited to 'site/user/api/SkBitmap_Reference.md')
-rw-r--r--site/user/api/SkBitmap_Reference.md144
1 files changed, 133 insertions, 11 deletions
diff --git a/site/user/api/SkBitmap_Reference.md b/site/user/api/SkBitmap_Reference.md
index edef11b2ec..f53ecaacc9 100644
--- a/site/user/api/SkBitmap_Reference.md
+++ b/site/user/api/SkBitmap_Reference.md
@@ -49,7 +49,13 @@ is useful to position one or more <a href="#Bitmap">Bitmaps</a> within a shared
| name | description |
| --- | --- |
+| <a href="#Allocate">Allocate</a> | allocates storage for pixels |
+| <a href="#Draw">Draw</a> | set pixels to <a href="undocumented#Color">Color</a> |
+| <a href="#Pixels">Pixels</a> | read and write pixel values |
+| <a href="#Property">Property</a> | metrics and attributes |
| <a href="#Row_Bytes">Row Bytes</a> | interval from one row to the next |
+| <a href="#Set">Set</a> | updates values and attributes |
+| <a href="#Utility">Utility</a> | rarely called management functions |
## <a name="Constant"></a> Constant
@@ -71,6 +77,12 @@ is useful to position one or more <a href="#Bitmap">Bitmaps</a> within a shared
| <a href="#SkBitmap_empty_constructor">SkBitmap()</a> | constructs with default values |
| <a href="#SkBitmap_move_SkBitmap">SkBitmap(SkBitmap&& src)</a> | takes ownership of pixels |
| <a href="#SkBitmap_copy_const_SkBitmap">SkBitmap(const SkBitmap& src)</a> | shares ownership of pixels |
+| <a href="#SkBitmap_extractAlpha">extractAlpha</a> | creates <a href="#Bitmap">Bitmap</a> containing <a href="#Alpha">Alpha</a> of pixels |
+| | <a href="#SkBitmap_extractAlpha">extractAlpha(SkBitmap* dst)</a> const |
+| | <a href="#SkBitmap_extractAlpha_2">extractAlpha(SkBitmap* dst, const SkPaint* paint, SkIPoint* offset)</a> const |
+| | <a href="#SkBitmap_extractAlpha_3">extractAlpha(SkBitmap* dst, const SkPaint* paint, Allocator* allocator, SkIPoint* offset)</a> const |
+| <a href="#SkBitmap_extractSubset">extractSubset</a> | creates <a href="#Bitmap">Bitmap</a>, sharing pixels if possible |
+| <a href="#SkBitmap_reset">reset</a> | sets to default values, releases pixel ownership |
| <a href="#SkBitmap_destructor">~SkBitmap()</a> | releases ownership of pixels |
## <a name="Operator"></a> Operator
@@ -493,6 +505,44 @@ two width:1 height:1 colorType:kRGBA_8888_SkColorType alphaType:kOpaque_SkAlphaT
---
+## <a name="Property"></a> Property
+
+| name | description |
+| --- | --- |
+| <a href="#SkBitmap_alphaType">alphaType</a> | returns <a href="SkImageInfo_Reference#Image_Info">Image Info</a> <a href="SkImageInfo_Reference#Alpha_Type">Alpha Type</a> |
+| <a href="#SkBitmap_bounds">bounds</a> | returns <a href="#SkBitmap_width">width</a> and <a href="#SkBitmap_height">height</a> as Rectangle |
+| <a href="#SkBitmap_bytesPerPixel">bytesPerPixel</a> | returns number of bytes in pixel based on <a href="SkImageInfo_Reference#Color_Type">Color Type</a> |
+| <a href="#SkBitmap_colorSpace">colorSpace</a> | returns <a href="SkImageInfo_Reference#Image_Info">Image Info</a> <a href="undocumented#Color_Space">Color Space</a> |
+| <a href="#SkBitmap_colorType">colorType</a> | returns <a href="SkImageInfo_Reference#Image_Info">Image Info</a> <a href="SkImageInfo_Reference#Color_Type">Color Type</a> |
+| <a href="#SkBitmap_dimensions">dimensions</a> | returns <a href="#SkBitmap_width">width</a> and <a href="#SkBitmap_height">height</a> |
+| <a href="#SkBitmap_drawsNothing">drawsNothing</a> | returns true if no <a href="#SkBitmap_width">width</a>, no <a href="#SkBitmap_height">height</a>, or no <a href="undocumented#Pixel_Ref">Pixel Ref</a> |
+| <a href="#SkBitmap_empty">empty</a> | returns true if <a href="SkImageInfo_Reference#Image_Info">Image Info</a> has zero <a href="#SkBitmap_width">width</a> or <a href="#SkBitmap_height">height</a> |
+| <a href="#SkBitmap_getAddr">getAddr</a> | returns readable pixel address as void pointer |
+| <a href="#SkBitmap_getAddr16">getAddr16</a> | returns readable pixel address as 16-bit pointer |
+| <a href="#SkBitmap_getAddr32">getAddr32</a> | returns readable pixel address as 32-bit pointer |
+| <a href="#SkBitmap_getAddr8">getAddr8</a> | returns readable pixel address as 8-bit pointer |
+| <a href="#SkBitmap_getBounds">getBounds</a> | returns <a href="#SkBitmap_width">width</a> and <a href="#SkBitmap_height">height</a> as Rectangle |
+| | <a href="#SkBitmap_getBounds">getBounds(SkRect* bounds)</a> const |
+| | <a href="#SkBitmap_getBounds_2">getBounds(SkIRect* bounds)</a> const |
+| <a href="#SkBitmap_getColor">getColor</a> | returns one pixel as <a href="#Unpremultiply">Unpremultiplied</a> <a href="undocumented#Color">Color</a> |
+| <a href="#SkBitmap_getPixels">getPixels</a> | returns address of pixels |
+| <a href="#SkBitmap_getSubset">getSubset</a> | returns bounds offset by origin |
+| <a href="#SkBitmap_hasHardwareMipMap">hasHardwareMipMap</a> | returns Mip_Map support present; Android only |
+| <a href="#SkBitmap_height">height</a> | returns pixel row count |
+| <a href="#SkBitmap_info">info</a> | returns <a href="SkImageInfo_Reference#Image_Info">Image Info</a> |
+| <a href="#SkBitmap_isImmutable">isImmutable</a> | returns true if pixels will not change |
+| <a href="#SkBitmap_isNull">isNull</a> | returns true if <a href="undocumented#Pixel_Ref">Pixel Ref</a> is nullptr |
+| <a href="#SkBitmap_isOpaque">isOpaque</a> | returns true if <a href="SkImageInfo_Reference#Image_Info">Image Info</a> describes opaque pixels |
+| <a href="#SkBitmap_isVolatile">isVolatile</a> | returns true if pixels should not be cached |
+| <a href="#SkBitmap_pixelRef">pixelRef</a> | returns <a href="undocumented#Pixel_Ref">Pixel Ref</a>, or nullptr |
+| <a href="#SkBitmap_pixelRefOrigin">pixelRefOrigin</a> | returns offset within <a href="undocumented#Pixel_Ref">Pixel Ref</a> |
+| <a href="#SkBitmap_pixmap">pixmap</a> | returns <a href="SkPixmap_Reference#Pixmap">Pixmap</a> |
+| <a href="#SkBitmap_refColorSpace">refColorSpace</a> | returns <a href="SkImageInfo_Reference#Image_Info">Image Info</a> <a href="undocumented#Color_Space">Color Space</a> |
+| <a href="#SkBitmap_rowBytes">rowBytes</a> | returns interval between rows in bytes |
+| <a href="#SkBitmap_rowBytesAsPixels">rowBytesAsPixels</a> | returns interval between rows in pixels |
+| <a href="#SkBitmap_shiftPerPixel">shiftPerPixel</a> | returns bit shift from pixels to bytes |
+| <a href="#SkBitmap_width">width</a> | returns pixel column count |
+
<a name="SkBitmap_pixmap"></a>
## pixmap
@@ -1611,6 +1661,29 @@ enum <a href="#SkBitmap_AllocFlags">AllocFlags</a> {
+## <a name="Allocate"></a> Allocate
+
+| name | description |
+| --- | --- |
+| <a href="#SkBitmap_allocN32Pixels">allocN32Pixels</a> | allocates compatible <a href="#ARGB">Color ARGB</a> pixels, or aborts |
+| <a href="#SkBitmap_allocPixels">allocPixels</a> | allocates pixels from <a href="SkImageInfo_Reference#Image_Info">Image Info</a>, or aborts |
+| | <a href="#SkBitmap_allocPixels">allocPixels(const SkImageInfo& info, size t rowBytes)</a> |
+| | <a href="#SkBitmap_allocPixels_2">allocPixels(const SkImageInfo& info)</a> |
+| | <a href="#SkBitmap_allocPixels_3">allocPixels</a> |
+| | <a href="#SkBitmap_allocPixels_4">allocPixels(Allocator* allocator)</a> |
+| <a href="#SkBitmap_allocPixelsFlags">allocPixelsFlags</a> | allocates pixels from <a href="SkImageInfo_Reference#Image_Info">Image Info</a> with options, or aborts |
+| <a href="#SkBitmap_installPixels">installPixels</a> | creates <a href="undocumented#Pixel_Ref">Pixel Ref</a>, with optional release function |
+| | <a href="#SkBitmap_installPixels">installPixels(const SkImageInfo& info, void* pixels, size t rowBytes, void (*releaseProc)</a> (void* addr, void* context) , void* context) |
+| | <a href="#SkBitmap_installPixels_2">installPixels(const SkImageInfo& info, void* pixels, size t rowBytes)</a> |
+| | <a href="#SkBitmap_installPixels_3">installPixels(const SkPixmap& pixmap)</a> |
+| <a href="#SkBitmap_tryAllocN32Pixels">tryAllocN32Pixels</a> | allocates compatible <a href="#ARGB">Color ARGB</a> pixels if possible |
+| <a href="#SkBitmap_tryAllocPixels">tryAllocPixels</a> | allocates pixels from <a href="SkImageInfo_Reference#Image_Info">Image Info</a> if possible |
+| | <a href="#SkBitmap_tryAllocPixels">tryAllocPixels(const SkImageInfo& info, size t rowBytes)</a> |
+| | <a href="#SkBitmap_tryAllocPixels_2">tryAllocPixels(const SkImageInfo& info)</a> |
+| | <a href="#SkBitmap_tryAllocPixels_3">tryAllocPixels</a> |
+| | <a href="#SkBitmap_tryAllocPixels_4">tryAllocPixels(Allocator* allocator)</a> |
+| <a href="#SkBitmap_tryAllocPixelsFlags">tryAllocPixelsFlags</a> | allocates pixels from <a href="SkImageInfo_Reference#Image_Info">Image Info</a> with options if possible |
+
<a name="SkBitmap_tryAllocPixelsFlags"></a>
## tryAllocPixelsFlags
@@ -2075,7 +2148,7 @@ true if <a href="SkImageInfo_Reference#Image_Info">Image Info</a> was set to pix
### Example
-<div><fiddle-embed name="6e2a8c9358b34aebd2ec586815fe9d3a"><div>Draw a five by five bitmap, and draw it again with a center white pixel.</div></fiddle-embed></div>
+<div><fiddle-embed name="6e2a8c9358b34aebd2ec586815fe9d3a"><div><a href="#Draw">Draw</a> a five by five bitmap, and draw it again with a center white pixel.</div></fiddle-embed></div>
### See Also
@@ -2094,6 +2167,23 @@ soon
---
+## <a name="Pixels"></a> Pixels
+
+| name | description |
+| --- | --- |
+| <a href="#SkBitmap_notifyPixelsChanged">notifyPixelsChanged</a> | marks pixels as changed, altering the unique ID |
+| <a href="#SkBitmap_peekPixels">peekPixels</a> | returns <a href="SkPixmap_Reference#Pixmap">Pixmap</a> if possible |
+| <a href="#SkBitmap_readPixels">readPixels</a> | copies and converts pixels |
+| | <a href="#SkBitmap_readPixels">readPixels(const SkImageInfo& dstInfo, void* dstPixels, size t dstRowBytes, int srcX, int srcY, SkTransferFunctionBehavior behavior)</a> const |
+| | <a href="#SkBitmap_readPixels_2">readPixels(const SkImageInfo& dstInfo, void* dstPixels, size t dstRowBytes, int srcX, int srcY)</a> const |
+| | <a href="#SkBitmap_readPixels_3">readPixels(const SkPixmap& dst, int srcX, int srcY)</a> const |
+| | <a href="#SkBitmap_readPixels_4">readPixels(const SkPixmap& dst)</a> const |
+| <a href="#SkBitmap_setPixels">setPixels</a> | sets <a href="undocumented#Pixel_Ref">Pixel Ref</a> without an offset |
+| <a href="#SkBitmap_writePixels">writePixels</a> | copies and converts pixels |
+| | <a href="#SkBitmap_writePixels">writePixels(const SkPixmap& src, int dstX, int dstY)</a> |
+| | <a href="#SkBitmap_writePixels_2">writePixels(const SkPixmap& src)</a> |
+| | <a href="#SkBitmap_writePixels_3">writePixels(const SkPixmap& src, int x, int y, SkTransferFunctionBehavior behavior)</a> |
+
<a name="SkBitmap_setPixels"></a>
## setPixels
@@ -2189,7 +2279,7 @@ Allocates pixel memory with <a href="#SkBitmap_tryAllocPixels_4_allocator">alloc
The allocation size is determined by <a href="SkImageInfo_Reference#Image_Info">Image Info</a> width, height, and <a href="SkImageInfo_Reference#Color_Type">Color Type</a>.
If <a href="#SkBitmap_tryAllocPixels_4_allocator">allocator</a> is nullptr, use <a href="#SkBitmap_HeapAllocator">HeapAllocator</a> instead.
-Returns false if <a href="#SkBitmap_tryAllocPixels_4_allocator">allocator</a> <a href="#SkBitmap_HeapAllocator_allocPixelRef">allocPixelRef</a> return false.
+Returns false if <a href="#SkBitmap_Allocator_allocPixelRef">Allocator::allocPixelRef</a> return false.
### Parameters
@@ -2225,7 +2315,7 @@ Allocates pixel memory with <a href="#SkBitmap_allocPixels_4_allocator">allocato
The allocation size is determined by <a href="SkImageInfo_Reference#Image_Info">Image Info</a> width, height, and <a href="SkImageInfo_Reference#Color_Type">Color Type</a>.
If <a href="#SkBitmap_allocPixels_4_allocator">allocator</a> is nullptr, use <a href="#SkBitmap_HeapAllocator">HeapAllocator</a> instead.
-Aborts if <a href="#SkBitmap_allocPixels_4_allocator">allocator</a> <a href="#SkBitmap_HeapAllocator_allocPixelRef">allocPixelRef</a> return false. Abort steps may be provided by
+Aborts if <a href="#SkBitmap_Allocator_allocPixelRef">Allocator::allocPixelRef</a> return false. Abort steps may be provided by
the user at compile time by defining SK_ABORT.
### Parameters
@@ -2310,6 +2400,17 @@ subset origin: 32, 64
---
+## <a name="Set"></a> Set
+
+| name | description |
+| --- | --- |
+| <a href="#SkBitmap_setAlphaType">setAlphaType</a> | sets <a href="SkImageInfo_Reference#Alpha_Type">Alpha Type</a> of shared pixels |
+| <a href="#SkBitmap_setHasHardwareMipMap">setHasHardwareMipMap</a> | sets Mip_Map support present; Android only |
+| <a href="#SkBitmap_setImmutable">setImmutable</a> | marks that pixels will not change |
+| <a href="#SkBitmap_setInfo">setInfo</a> | sets height, width, <a href="SkImageInfo_Reference#Color_Type">Color Type</a>, and so on, releasing pixels |
+| <a href="#SkBitmap_setIsVolatile">setIsVolatile</a> | marks if pixels should not be cached |
+| <a href="#SkBitmap_setPixelRef">setPixelRef</a> | sets <a href="undocumented#Pixel_Ref">Pixel Ref</a> and offset |
+
<a name="SkBitmap_setPixelRef"></a>
## setPixelRef
@@ -2428,6 +2529,15 @@ Marks that pixels in <a href="undocumented#Pixel_Ref">Pixel Ref</a> have changed
---
+## <a name="Draw"></a> Draw
+
+| name | description |
+| --- | --- |
+| <a href="#SkBitmap_erase">erase</a> | writes <a href="undocumented#Color">Color</a> to rectangle of pixels |
+| <a href="#SkBitmap_eraseARGB">eraseARGB</a> | writes <a href="undocumented#Color">Color</a> to pixels |
+| <a href="#SkBitmap_eraseColor">eraseColor</a> | writes <a href="undocumented#Color">Color</a> to pixels |
+| <a href="#SkBitmap_eraseRGB">eraseRGB</a> | deprecated |
+
<a name="SkBitmap_eraseColor"></a>
## eraseColor
@@ -2821,7 +2931,7 @@ unsigned 8-bit pointer to pixel at (<a href="#SkBitmap_getAddr8_x">x</a>, <a hre
bool extractSubset(SkBitmap* dst, const SkIRect& subset) const
</pre>
-Shares <a href="undocumented#Pixel_Ref">Pixel Ref</a> with <a href="#SkBitmap_extractSubset_dst">dst</a>. Pixels are not copied; <a href="#Bitmap">Bitmap</a> and <a href="#SkBitmap_extractSubset_dst">dst</a> point
+Shares <a href="undocumented#Pixel_Ref">Pixel Ref</a> with <a href="#SkBitmap_extractSubset_dst">dst</a>. <a href="#Pixels">Pixels</a> are not copied; <a href="#Bitmap">Bitmap</a> and <a href="#SkBitmap_extractSubset_dst">dst</a> point
to the same pixels; <a href="#SkBitmap_extractSubset_dst">dst</a> <a href="#SkBitmap_bounds">bounds</a> are set to the intersection of <a href="#SkBitmap_extractSubset_subset">subset</a>
and the original <a href="#SkBitmap_bounds">bounds</a>.
@@ -2902,7 +3012,7 @@ row to the next. Returns true if pixels are copied. Returns false if:
<td><a href="undocumented#Pixel_Ref">Pixel Ref</a> is nullptr</td> </tr>
</table>
-Pixels are copied only if pixel conversion is possible. If <a href="#Bitmap">Bitmap</a> <a href="#SkBitmap_colorType">colorType</a> is
+<a href="#Pixels">Pixels</a> are copied only if pixel conversion is possible. If <a href="#Bitmap">Bitmap</a> <a href="#SkBitmap_colorType">colorType</a> is
<a href="SkImageInfo_Reference#SkColorType">kGray 8 SkColorType</a>, or <a href="SkImageInfo_Reference#SkColorType">kAlpha 8 SkColorType</a>; <a href="#SkBitmap_readPixels_dstInfo">dstInfo</a>.<a href="#SkBitmap_colorType">colorType</a> must match.
If <a href="#Bitmap">Bitmap</a> <a href="#SkBitmap_colorType">colorType</a> is <a href="SkImageInfo_Reference#SkColorType">kGray 8 SkColorType</a>, <a href="#SkBitmap_readPixels_dstInfo">dstInfo</a>.<a href="#SkBitmap_colorSpace">colorSpace</a> must match.
If <a href="#Bitmap">Bitmap</a> <a href="#SkBitmap_alphaType">alphaType</a> is <a href="SkImageInfo_Reference#SkAlphaType">kOpaque SkAlphaType</a>, <a href="#SkBitmap_readPixels_dstInfo">dstInfo</a>.<a href="#SkBitmap_alphaType">alphaType</a> must
@@ -2969,7 +3079,7 @@ Returns true if pixels are copied. Returns false if:
<td><a href="undocumented#Pixel_Ref">Pixel Ref</a> is nullptr</td> </tr>
</table>
-Pixels are copied only if pixel conversion is possible. If <a href="#Bitmap">Bitmap</a> <a href="#SkBitmap_colorType">colorType</a> is
+<a href="#Pixels">Pixels</a> are copied only if pixel conversion is possible. If <a href="#Bitmap">Bitmap</a> <a href="#SkBitmap_colorType">colorType</a> is
<a href="SkImageInfo_Reference#SkColorType">kGray 8 SkColorType</a>, or <a href="SkImageInfo_Reference#SkColorType">kAlpha 8 SkColorType</a>; <a href="#SkBitmap_readPixels_2_dstInfo">dstInfo</a>.<a href="#SkBitmap_colorType">colorType</a> must match.
If <a href="#Bitmap">Bitmap</a> <a href="#SkBitmap_colorType">colorType</a> is <a href="SkImageInfo_Reference#SkColorType">kGray 8 SkColorType</a>, <a href="#SkBitmap_readPixels_2_dstInfo">dstInfo</a>.<a href="#SkBitmap_colorSpace">colorSpace</a> must match.
If <a href="#Bitmap">Bitmap</a> <a href="#SkBitmap_alphaType">alphaType</a> is <a href="SkImageInfo_Reference#SkAlphaType">kOpaque SkAlphaType</a>, <a href="#SkBitmap_readPixels_2_dstInfo">dstInfo</a>.<a href="#SkBitmap_alphaType">alphaType</a> must
@@ -3029,7 +3139,7 @@ row to the next. Returns true if pixels are copied. Returns false if:
<td><a href="undocumented#Pixel_Ref">Pixel Ref</a> is nullptr</td> </tr>
</table>
-Pixels are copied only if pixel conversion is possible. If <a href="#Bitmap">Bitmap</a> <a href="#SkBitmap_colorType">colorType</a> is
+<a href="#Pixels">Pixels</a> are copied only if pixel conversion is possible. If <a href="#Bitmap">Bitmap</a> <a href="#SkBitmap_colorType">colorType</a> is
<a href="SkImageInfo_Reference#SkColorType">kGray 8 SkColorType</a>, or <a href="SkImageInfo_Reference#SkColorType">kAlpha 8 SkColorType</a>; <a href="#SkBitmap_readPixels_3_dst">dst</a> <a href="SkImageInfo_Reference#Color_Type">Color Type</a> must match.
If <a href="#Bitmap">Bitmap</a> <a href="#SkBitmap_colorType">colorType</a> is <a href="SkImageInfo_Reference#SkColorType">kGray 8 SkColorType</a>, <a href="#SkBitmap_readPixels_3_dst">dst</a> <a href="undocumented#Color_Space">Color Space</a> must match.
If <a href="#Bitmap">Bitmap</a> <a href="#SkBitmap_alphaType">alphaType</a> is <a href="SkImageInfo_Reference#SkAlphaType">kOpaque SkAlphaType</a>, <a href="#SkBitmap_readPixels_3_dst">dst</a> <a href="SkImageInfo_Reference#Alpha_Type">Alpha Type</a> must
@@ -3084,7 +3194,7 @@ row to the next. Returns true if pixels are copied. Returns false if:
<td><a href="undocumented#Pixel_Ref">Pixel Ref</a> is nullptr</td> </tr>
</table>
-Pixels are copied only if pixel conversion is possible. If <a href="#Bitmap">Bitmap</a> <a href="#SkBitmap_colorType">colorType</a> is
+<a href="#Pixels">Pixels</a> are copied only if pixel conversion is possible. If <a href="#Bitmap">Bitmap</a> <a href="#SkBitmap_colorType">colorType</a> is
<a href="SkImageInfo_Reference#SkColorType">kGray 8 SkColorType</a>, or <a href="SkImageInfo_Reference#SkColorType">kAlpha 8 SkColorType</a>; <a href="#SkBitmap_readPixels_4_dst">dst</a> <a href="SkImageInfo_Reference#Color_Type">Color Type</a> must match.
If <a href="#Bitmap">Bitmap</a> <a href="#SkBitmap_colorType">colorType</a> is <a href="SkImageInfo_Reference#SkColorType">kGray 8 SkColorType</a>, <a href="#SkBitmap_readPixels_4_dst">dst</a> <a href="undocumented#Color_Space">Color Space</a> must match.
If <a href="#Bitmap">Bitmap</a> <a href="#SkBitmap_alphaType">alphaType</a> is <a href="SkImageInfo_Reference#SkAlphaType">kOpaque SkAlphaType</a>, <a href="#SkBitmap_readPixels_4_dst">dst</a> <a href="SkImageInfo_Reference#Alpha_Type">Alpha Type</a> must
@@ -3132,7 +3242,7 @@ row to the next. Returns true if pixels are copied. Returns false if:
<td><a href="undocumented#Pixel_Ref">Pixel Ref</a> is nullptr</td> </tr>
</table>
-Pixels are copied only if pixel conversion is possible. If <a href="#Bitmap">Bitmap</a> <a href="#SkBitmap_colorType">colorType</a> is
+<a href="#Pixels">Pixels</a> are copied only if pixel conversion is possible. If <a href="#Bitmap">Bitmap</a> <a href="#SkBitmap_colorType">colorType</a> is
<a href="SkImageInfo_Reference#SkColorType">kGray 8 SkColorType</a>, or <a href="SkImageInfo_Reference#SkColorType">kAlpha 8 SkColorType</a>; <a href="#SkBitmap_writePixels_src">src</a> <a href="SkImageInfo_Reference#Color_Type">Color Type</a> must match.
If <a href="#Bitmap">Bitmap</a> <a href="#SkBitmap_colorType">colorType</a> is <a href="SkImageInfo_Reference#SkColorType">kGray 8 SkColorType</a>, <a href="#SkBitmap_writePixels_src">src</a> <a href="undocumented#Color_Space">Color Space</a> must match.
If <a href="#Bitmap">Bitmap</a> <a href="#SkBitmap_alphaType">alphaType</a> is <a href="SkImageInfo_Reference#SkAlphaType">kOpaque SkAlphaType</a>, <a href="#SkBitmap_writePixels_src">src</a> <a href="SkImageInfo_Reference#Alpha_Type">Alpha Type</a> must
@@ -3187,7 +3297,7 @@ row to the next. Returns true if pixels are copied. Returns false if:
<td><a href="undocumented#Pixel_Ref">Pixel Ref</a> is nullptr</td> </tr>
</table>
-Pixels are copied only if pixel conversion is possible. If <a href="#Bitmap">Bitmap</a> <a href="#SkBitmap_colorType">colorType</a> is
+<a href="#Pixels">Pixels</a> are copied only if pixel conversion is possible. If <a href="#Bitmap">Bitmap</a> <a href="#SkBitmap_colorType">colorType</a> is
<a href="SkImageInfo_Reference#SkColorType">kGray 8 SkColorType</a>, or <a href="SkImageInfo_Reference#SkColorType">kAlpha 8 SkColorType</a>; <a href="#SkBitmap_writePixels_2_src">src</a> <a href="SkImageInfo_Reference#Color_Type">Color Type</a> must match.
If <a href="#Bitmap">Bitmap</a> <a href="#SkBitmap_colorType">colorType</a> is <a href="SkImageInfo_Reference#SkColorType">kGray 8 SkColorType</a>, <a href="#SkBitmap_writePixels_2_src">src</a> <a href="undocumented#Color_Space">Color Space</a> must match.
If <a href="#Bitmap">Bitmap</a> <a href="#SkBitmap_alphaType">alphaType</a> is <a href="SkImageInfo_Reference#SkAlphaType">kOpaque SkAlphaType</a>, <a href="#SkBitmap_writePixels_2_src">src</a> <a href="SkImageInfo_Reference#Alpha_Type">Alpha Type</a> must
@@ -3234,7 +3344,7 @@ row to the next. Returns true if pixels are copied. Returns false if:
<td><a href="undocumented#Pixel_Ref">Pixel Ref</a> is nullptr</td> </tr>
</table>
-Pixels are copied only if pixel conversion is possible. If <a href="#Bitmap">Bitmap</a> <a href="#SkBitmap_colorType">colorType</a> is
+<a href="#Pixels">Pixels</a> are copied only if pixel conversion is possible. If <a href="#Bitmap">Bitmap</a> <a href="#SkBitmap_colorType">colorType</a> is
<a href="SkImageInfo_Reference#SkColorType">kGray 8 SkColorType</a>, or <a href="SkImageInfo_Reference#SkColorType">kAlpha 8 SkColorType</a>; <a href="#SkBitmap_writePixels_3_src">src</a> <a href="SkImageInfo_Reference#Color_Type">Color Type</a> must match.
If <a href="#Bitmap">Bitmap</a> <a href="#SkBitmap_colorType">colorType</a> is <a href="SkImageInfo_Reference#SkColorType">kGray 8 SkColorType</a>, <a href="#SkBitmap_writePixels_3_src">src</a> <a href="undocumented#Color_Space">Color Space</a> must match.
If <a href="#Bitmap">Bitmap</a> <a href="#SkBitmap_alphaType">alphaType</a> is <a href="SkImageInfo_Reference#SkAlphaType">kOpaque SkAlphaType</a>, <a href="#SkBitmap_writePixels_3_src">src</a> <a href="SkImageInfo_Reference#Alpha_Type">Alpha Type</a> must
@@ -3478,6 +3588,18 @@ x---x-
---
+## <a name="Utility"></a> Utility
+
+| name | description |
+| --- | --- |
+| <a href="#SkBitmap_ComputeIsOpaque">ComputeIsOpaque</a> | returns true if all pixels are opaque |
+| <a href="#SkBitmap_computeByteSize">computeByteSize</a> | returns size required for pixels |
+| <a href="#SkBitmap_getGenerationID">getGenerationID</a> | returns unique ID |
+| <a href="#SkBitmap_readyToDraw">readyToDraw</a> | returns true if address of pixels is not nullptr |
+| <a href="#SkBitmap_swap">swap</a> | exchanges <a href="#Bitmap">Bitmap</a> pair |
+| <a href="#SkBitmap_toString">toString</a> | converts <a href="#Bitmap">Bitmap</a> to machine readable form |
+| <a href="#SkBitmap_validate">validate</a> | asserts if <a href="#Bitmap">Bitmap</a> is invalid (debug only) |
+
<a name="SkBitmap_validate"></a>
## validate