void <ahref='#SkBitmap_eraseColor'>eraseColor</a>(<ahref='SkColor_Reference#SkColor'>SkColor</a> c) const;
void <ahref='#SkBitmap_eraseARGB'>eraseARGB</a>(<ahref='undocumented#U8CPU'>U8CPU</a> a, <ahref='undocumented#U8CPU'>U8CPU</a> r, <ahref='undocumented#U8CPU'>U8CPU</a> g, <ahref='undocumented#U8CPU'>U8CPU</a> b) const;
<ahref='#Bitmap'>Bitmap</a> describes a two-dimensional raster pixel array. <ahref='#Bitmap'>Bitmap</a> is built on
<ahref='SkImageInfo_Reference#Image_Info'>Image Info</a>, containing integer width and height, <ahref='SkImageInfo_Reference#Color_Type'>Color Type</a> and <ahref='SkImageInfo_Reference#Alpha_Type'>Alpha Type</a>
describing the pixel format, and <ahref='undocumented#Color_Space'>Color Space</a> describing the range of colors.
<ahref='#Bitmap'>Bitmap</a> points to <ahref='undocumented#Pixel_Ref'>Pixel Ref</a>, which describes the physical array of pixels.
<ahref='SkImageInfo_Reference#Image_Info'>Image Info</a> bounds may be located anywhere fully inside <ahref='undocumented#Pixel_Ref'>Pixel Ref</a> bounds.
<ahref='#Bitmap'>Bitmap</a> can be drawn using <ahref='SkCanvas_Reference#Canvas'>Canvas</a>. <ahref='#Bitmap'>Bitmap</a> can be a drawing destination for <ahref='SkCanvas_Reference#Canvas'>Canvas</a>
Allocates the <ahref='undocumented#Pixel'>pixel</a> memory for the <ahref='#SkBitmap_Allocator_allocPixelRef_bitmap'>bitmap</a>, given its dimensions and
<ahref='SkImageInfo_Reference#SkColorType'>SkColorType</a>. Returns true on success, where success means either <ahref='#SkBitmap_setPixels'>setPixels</a>()
or <ahref='#SkBitmap_setPixelRef'>setPixelRef</a>() was called.
<td><ahref='SkBitmap_Reference#SkBitmap'>SkBitmap</a> containing <ahref='SkImageInfo_Reference#SkImageInfo'>SkImageInfo</a> as input, and <ahref='undocumented#SkPixelRef'>SkPixelRef</a> as output</td>
Allocates the <ahref='undocumented#Pixel'>pixel</a> memory for the <ahref='#SkBitmap_HeapAllocator_allocPixelRef_bitmap'>bitmap</a>, given its dimensions and
<ahref='SkImageInfo_Reference#SkColorType'>SkColorType</a>. Returns true on success, where success means either <ahref='#SkBitmap_setPixels'>setPixels</a>()
or <ahref='#SkBitmap_setPixelRef'>setPixelRef</a>() was called.
<td><ahref='SkBitmap_Reference#SkBitmap'>SkBitmap</a> containing <ahref='SkImageInfo_Reference#SkImageInfo'>SkImageInfo</a> as input, and <ahref='undocumented#SkPixelRef'>SkPixelRef</a> as output</td>
Creates an empty <ahref='SkBitmap_Reference#SkBitmap'>SkBitmap</a> without pixels, with <ahref='SkImageInfo_Reference#kUnknown_SkColorType'>kUnknown_SkColorType</a>,
<ahref='SkImageInfo_Reference#kUnknown_SkAlphaType'>kUnknown_SkAlphaType</a>, and with a width and height of zero. <ahref='undocumented#SkPixelRef'>SkPixelRef</a> origin is
set to (0, 0). <ahref='SkBitmap_Reference#SkBitmap'>SkBitmap</a> is not volatile.
Use <ahref='#SkBitmap_setInfo'>setInfo</a>() to associate <ahref='SkImageInfo_Reference#SkColorType'>SkColorType</a>, <ahref='SkImageInfo_Reference#SkAlphaType'>SkAlphaType</a>, width, and height
after <ahref='SkBitmap_Reference#SkBitmap'>SkBitmap</a> has been created.
Copies settings from <ahref='#SkBitmap_SkBitmap(const SkBitmap& src)_src'>src</a> to returned <ahref='SkBitmap_Reference#SkBitmap'>SkBitmap</a>. Shares pixels if <ahref='#SkBitmap_SkBitmap(const SkBitmap& src)_src'>src</a> has pixels
allocated, so both <ahref='SkBitmap_Reference#Bitmap'>bitmaps</a> reference the same pixels.
<td><ahref='SkBitmap_Reference#SkBitmap'>SkBitmap</a> to copy <ahref='SkImageInfo_Reference#SkImageInfo'>SkImageInfo</a>, and share <ahref='undocumented#SkPixelRef'>SkPixelRef</a></td>
Copies settings from <ahref='#SkBitmap_SkBitmap(SkBitmap&& src)_src'>src</a> to returned <ahref='SkBitmap_Reference#SkBitmap'>SkBitmap</a>. Moves ownership of <ahref='#SkBitmap_SkBitmap(SkBitmap&& src)_src'>src</a> pixels to
<td><ahref='SkBitmap_Reference#SkBitmap'>SkBitmap</a> to copy <ahref='SkImageInfo_Reference#SkImageInfo'>SkImageInfo</a>, and reassign <ahref='undocumented#SkPixelRef'>SkPixelRef</a></td>
Decrements <ahref='undocumented#SkPixelRef'>SkPixelRef</a><ahref='undocumented#Reference_Count'>reference count</a>, if <ahref='undocumented#SkPixelRef'>SkPixelRef</a> is not nullptr.
Copies settings from <ahref='#SkBitmap_operator=(const SkBitmap& src)_src'>src</a> to returned <ahref='SkBitmap_Reference#SkBitmap'>SkBitmap</a>. Shares pixels if <ahref='#SkBitmap_operator=(const SkBitmap& src)_src'>src</a> has pixels
allocated, so both <ahref='SkBitmap_Reference#Bitmap'>bitmaps</a> reference the same pixels.
<td><ahref='SkBitmap_Reference#SkBitmap'>SkBitmap</a> to copy <ahref='SkImageInfo_Reference#SkImageInfo'>SkImageInfo</a>, and share <ahref='undocumented#SkPixelRef'>SkPixelRef</a></td>
Copies settings from <ahref='#SkBitmap_operator=(SkBitmap&& src)_src'>src</a> to returned <ahref='SkBitmap_Reference#SkBitmap'>SkBitmap</a>. Moves ownership of <ahref='#SkBitmap_operator=(SkBitmap&& src)_src'>src</a> pixels to
<td><ahref='SkBitmap_Reference#SkBitmap'>SkBitmap</a> to copy <ahref='SkImageInfo_Reference#SkImageInfo'>SkImageInfo</a>, and reassign <ahref='undocumented#SkPixelRef'>SkPixelRef</a></td>
Returns a constant reference to the <ahref='SkPixmap_Reference#SkPixmap'>SkPixmap</a> holding the <ahref='SkBitmap_Reference#SkBitmap'>SkBitmap</a><ahref='undocumented#Pixel'>pixel</a>
address, <ahref='#Row_Bytes'>row bytes</a>, and <ahref='SkImageInfo_Reference#SkImageInfo'>SkImageInfo</a>.
Returns pixel count in each row. Should be equal or less than <code><ahref='#SkBitmap_rowBytes'>rowBytes</a>(\) / <ahref='#SkBitmap_info'>info</a>(\)\.<ahref='#SkBitmap_bytesPerPixel'>bytesPerPixel</a>(\)</code>.
May be less than <ahref='#SkBitmap_pixelRef'>pixelRef</a>().<ahref='#SkBitmap_width'>width</a>(). Will not exceed <ahref='#SkBitmap_pixelRef'>pixelRef</a>().<ahref='#SkBitmap_width'>width</a>() less
Maybe be less than <ahref='#SkBitmap_pixelRef'>pixelRef</a>().<ahref='#SkPixelRef_height'>height()</a>. Will not exceed <ahref='#SkBitmap_pixelRef'>pixelRef</a>().<ahref='#SkPixelRef_height'>height()</a> less
Returns <ahref='undocumented#SkColorSpace'>SkColorSpace</a>, the range of colors, associated with <ahref='SkImageInfo_Reference#SkImageInfo'>SkImageInfo</a>. The
<ahref='undocumented#Reference_Count'>reference count</a> of <ahref='undocumented#SkColorSpace'>SkColorSpace</a> is unchanged. The returned <ahref='undocumented#SkColorSpace'>SkColorSpace</a> is
<div><fiddle-embedname="817f95879fadba44baf87ea60e9b595a"><div><ahref='undocumented#SkColorSpace_MakeSRGBLinear'>SkColorSpace::MakeSRGBLinear</a> creates <ahref='undocumented#Color_Space'>Color Space</a> with linear gamma
Returns <ahref='undocumented#Smart_Pointer'>smart pointer</a> to <ahref='undocumented#SkColorSpace'>SkColorSpace</a>, the range of colors, associated with
<ahref='SkImageInfo_Reference#SkImageInfo'>SkImageInfo</a>. The <ahref='undocumented#Smart_Pointer'>smart pointer</a> tracks the number of objects sharing this
<ahref='undocumented#SkColorSpace'>SkColorSpace</a> reference so the memory is released when the owners destruct.
<ahref='undocumented#SkColorSpace'>SkColorSpace</a> in <ahref='SkImageInfo_Reference#SkImageInfo'>SkImageInfo</a> wrapped in a <ahref='undocumented#Smart_Pointer'>smart pointer</a>
Does not check if <ahref='undocumented#SkPixelRef'>SkPixelRef</a> is nullptr; call <ahref='#SkBitmap_drawsNothing'>drawsNothing</a>() to check <ahref='#SkBitmap_width'>width()</a>,
<ahref='#SkBitmap_height'>height()</a>, and <ahref='undocumented#SkPixelRef'>SkPixelRef</a>.
Does not check if <ahref='#SkBitmap_width'>width()</a> or <ahref='#SkBitmap_height'>height()</a> are zero; call <ahref='#SkBitmap_drawsNothing'>drawsNothing</a>() to check
<ahref='#SkBitmap_width'>width()</a>, <ahref='#SkBitmap_height'>height()</a>, and <ahref='undocumented#SkPixelRef'>SkPixelRef</a>.
Returns true if <ahref='#SkBitmap_width'>width()</a> or <ahref='#SkBitmap_height'>height()</a> are zero, or if <ahref='undocumented#SkPixelRef'>SkPixelRef</a> is nullptr.
If true, <ahref='SkBitmap_Reference#SkBitmap'>SkBitmap</a> has no effect when drawn or drawn into.
is at least as large as: <code><ahref='#SkBitmap_width'>width</a>(\) \* <ahref='#SkBitmap_info'>info</a>(\)\.<ahref='#SkBitmap_bytesPerPixel'>bytesPerPixel</a>(\)</code>.
Returns zero if <ahref='#SkBitmap_colorType'>colorType</a> is <ahref='SkImageInfo_Reference#kUnknown_SkColorType'>kUnknown_SkColorType</a>, or if row bytes supplied to
<ahref='#SkBitmap_setInfo'>setInfo</a> is not large enough to hold a row of pixels.
Sets <ahref='SkImageInfo_Reference#SkAlphaType'>SkAlphaType</a>, if <ahref='#SkBitmap_setAlphaType_alphaType'>alphaType</a> is compatible with <ahref='SkImageInfo_Reference#SkColorType'>SkColorType</a>.
Returns true unless <ahref='#SkBitmap_setAlphaType_alphaType'>alphaType</a> is <ahref='SkImageInfo_Reference#kUnknown_SkAlphaType'>kUnknown_SkAlphaType</a> and current <ahref='SkImageInfo_Reference#SkAlphaType'>SkAlphaType</a>
Returns true if <ahref='SkImageInfo_Reference#SkColorType'>SkColorType</a> is <ahref='SkImageInfo_Reference#kUnknown_SkColorType'>kUnknown_SkColorType</a>. <ahref='#SkBitmap_setAlphaType_alphaType'>alphaType</a> is ignored, and
Returns true if <ahref='SkImageInfo_Reference#SkColorType'>SkColorType</a> is <ahref='SkImageInfo_Reference#kRGB_565_SkColorType'>kRGB_565_SkColorType</a> or <ahref='SkImageInfo_Reference#kGray_8_SkColorType'>kGray_8_SkColorType</a>.
<ahref='#SkBitmap_setAlphaType_alphaType'>alphaType</a> is ignored, and <ahref='SkImageInfo_Reference#SkAlphaType'>SkAlphaType</a> remains <ahref='SkImageInfo_Reference#kOpaque_SkAlphaType'>kOpaque_SkAlphaType</a>.
If <ahref='SkImageInfo_Reference#SkColorType'>SkColorType</a> is <ahref='SkImageInfo_Reference#kARGB_4444_SkColorType'>kARGB_4444_SkColorType</a>, <ahref='SkImageInfo_Reference#kRGBA_8888_SkColorType'>kRGBA_8888_SkColorType</a>,
<ahref='#SkBitmap_setAlphaType_alphaType'>alphaType</a> is <ahref='SkImageInfo_Reference#kUnknown_SkAlphaType'>kUnknown_SkAlphaType</a> and <ahref='SkImageInfo_Reference#SkAlphaType'>SkAlphaType</a> is not <ahref='SkImageInfo_Reference#kUnknown_SkAlphaType'>kUnknown_SkAlphaType</a>.
If <ahref='SkImageInfo_Reference#SkAlphaType'>SkAlphaType</a> is <ahref='SkImageInfo_Reference#kUnknown_SkAlphaType'>kUnknown_SkAlphaType</a>, <ahref='#SkBitmap_setAlphaType_alphaType'>alphaType</a> is ignored.
If <ahref='SkImageInfo_Reference#SkColorType'>SkColorType</a> is <ahref='SkImageInfo_Reference#kAlpha_8_SkColorType'>kAlpha_8_SkColorType</a>, returns true unless
<ahref='#SkBitmap_setAlphaType_alphaType'>alphaType</a> is <ahref='SkImageInfo_Reference#kUnknown_SkAlphaType'>kUnknown_SkAlphaType</a> and <ahref='SkImageInfo_Reference#SkAlphaType'>SkAlphaType</a> is not <ahref='SkImageInfo_Reference#kUnknown_SkAlphaType'>kUnknown_SkAlphaType</a>.
If <ahref='SkImageInfo_Reference#SkAlphaType'>SkAlphaType</a> is <ahref='SkImageInfo_Reference#kUnknown_SkAlphaType'>kUnknown_SkAlphaType</a>, <ahref='#SkBitmap_setAlphaType_alphaType'>alphaType</a> is ignored. If <ahref='#SkBitmap_setAlphaType_alphaType'>alphaType</a> is
<ahref='SkImageInfo_Reference#kUnpremul_SkAlphaType'>kUnpremul_SkAlphaType</a>, it is treated as <ahref='SkImageInfo_Reference#kPremul_SkAlphaType'>kPremul_SkAlphaType</a>.
This changes <ahref='SkImageInfo_Reference#SkAlphaType'>SkAlphaType</a> in <ahref='undocumented#SkPixelRef'>SkPixelRef</a>; all <ahref='SkBitmap_Reference#Bitmap'>bitmaps</a> sharing <ahref='undocumented#SkPixelRef'>SkPixelRef</a>
Returns minimum memory required for <ahref='undocumented#Pixel_Storage'>pixel storage</a>.
Does not include unused memory on last row when <ahref='#SkBitmap_rowBytesAsPixels'>rowBytesAsPixels</a>() exceeds <ahref='#SkBitmap_width'>width()</a>.
Returns zero if <ahref='#SkBitmap_height'>height()</a> or <ahref='#SkBitmap_width'>width()</a> is 0.
Returns <ahref='#SkBitmap_height'>height()</a> times <ahref='#SkBitmap_rowBytes'>rowBytes</a>() if <ahref='#SkBitmap_colorType'>colorType</a>() is <ahref='SkImageInfo_Reference#kUnknown_SkColorType'>kUnknown_SkColorType</a>.
Does not check if <ahref='SkImageInfo_Reference#SkColorType'>SkColorType</a> allows <ahref='SkColor_Reference#Alpha'>alpha</a>, or if any <ahref='undocumented#Pixel'>pixel</a> value has
true if <ahref='SkImageInfo_Reference#SkImageInfo'>SkImageInfo</a><ahref='SkImageInfo_Reference#SkAlphaType'>SkAlphaType</a> is <ahref='SkImageInfo_Reference#kOpaque_SkAlphaType'>kOpaque_SkAlphaType</a>
Sets if pixels should be read from <ahref='undocumented#SkPixelRef'>SkPixelRef</a> on every access. <ahref='SkBitmap_Reference#SkBitmap'>SkBitmap</a> are not
volatile by default; a GPU back end may upload <ahref='undocumented#Pixel'>pixel</a> values expecting them to be
accessed repeatedly. Marking temporary <ahref='SkBitmap_Reference#SkBitmap'>SkBitmap</a> as volatile provides a hint to
<ahref='undocumented#SkBaseDevice'>SkBaseDevice</a> that the <ahref='SkBitmap_Reference#SkBitmap'>SkBitmap</a> pixels should not be cached. This can
Sets width, height, <ahref='#Row_Bytes'>row bytes</a> to zero; <ahref='undocumented#Pixel'>pixel</a> address to nullptr; <ahref='SkImageInfo_Reference#SkColorType'>SkColorType</a> to
<ahref='SkImageInfo_Reference#kUnknown_SkColorType'>kUnknown_SkColorType</a>; and <ahref='SkImageInfo_Reference#SkAlphaType'>SkAlphaType</a> to <ahref='SkImageInfo_Reference#kUnknown_SkAlphaType'>kUnknown_SkAlphaType</a>.
If <ahref='undocumented#SkPixelRef'>SkPixelRef</a> is allocated, its <ahref='undocumented#Reference_Count'>reference count</a> is decreased by one, releasing
its memory if <ahref='SkBitmap_Reference#SkBitmap'>SkBitmap</a> is the sole owner.
Returns true if all pixels are opaque. <ahref='SkImageInfo_Reference#SkColorType'>SkColorType</a> determines how pixels
are encoded, and whether <ahref='undocumented#Pixel'>pixel</a> describes <ahref='SkColor_Reference#Alpha'>alpha</a>. Returns true for <ahref='SkImageInfo_Reference#SkColorType'>SkColorType</a>
without <ahref='SkColor_Reference#Alpha'>alpha</a> in each <ahref='undocumented#Pixel'>pixel</a>; for other <ahref='SkImageInfo_Reference#SkColorType'>SkColorType</a>, returns true if all
pixels have <ahref='SkColor_Reference#Alpha'>alpha</a> values equivalent to 1.0 or greater.
For <ahref='SkImageInfo_Reference#SkColorType'>SkColorType</a><ahref='SkImageInfo_Reference#kRGB_565_SkColorType'>kRGB_565_SkColorType</a> or <ahref='SkImageInfo_Reference#kGray_8_SkColorType'>kGray_8_SkColorType</a>: always
returns true. For <ahref='SkImageInfo_Reference#SkColorType'>SkColorType</a><ahref='SkImageInfo_Reference#kAlpha_8_SkColorType'>kAlpha_8_SkColorType</a>, <ahref='SkImageInfo_Reference#kBGRA_8888_SkColorType'>kBGRA_8888_SkColorType</a>,
<ahref='SkImageInfo_Reference#kRGBA_8888_SkColorType'>kRGBA_8888_SkColorType</a>: returns true if all <ahref='undocumented#Pixel'>pixel</a><ahref='SkColor_Reference#Alpha'>alpha</a> values are 255.
For <ahref='SkImageInfo_Reference#SkColorType'>SkColorType</a><ahref='SkImageInfo_Reference#kARGB_4444_SkColorType'>kARGB_4444_SkColorType</a>: returns true if all <ahref='undocumented#Pixel'>pixel</a><ahref='SkColor_Reference#Alpha'>alpha</a> values are 15.
For <ahref='SkImageInfo_Reference#kRGBA_F16_SkColorType'>kRGBA_F16_SkColorType</a>: returns true if all <ahref='undocumented#Pixel'>pixel</a><ahref='SkColor_Reference#Alpha'>alpha</a> values are 1.0 or
<ahref='#SkBitmap_rowBytes'>rowBytes</a>. Frees pixels, and returns true if successful.
<ahref='#SkBitmap_setInfo_imageInfo'>imageInfo</a>.<ahref='#SkBitmap_alphaType'>alphaType</a> may be altered to a value permitted by <ahref='#SkBitmap_setInfo_imageInfo'>imageInfo</a>.<ahref='#SkBitmap_colorSpace'>colorSpace</a>.
If <ahref='#SkBitmap_setInfo_imageInfo'>imageInfo</a>.<ahref='#SkBitmap_colorType'>colorType</a> is <ahref='SkImageInfo_Reference#kUnknown_SkColorType'>kUnknown_SkColorType</a>, <ahref='#SkBitmap_setInfo_imageInfo'>imageInfo</a>.<ahref='#SkBitmap_alphaType'>alphaType</a> is
set to <ahref='SkImageInfo_Reference#kUnknown_SkAlphaType'>kUnknown_SkAlphaType</a>.
If <ahref='#SkBitmap_setInfo_imageInfo'>imageInfo</a>.<ahref='#SkBitmap_colorType'>colorType</a> is <ahref='SkImageInfo_Reference#kAlpha_8_SkColorType'>kAlpha_8_SkColorType</a> and <ahref='#SkBitmap_setInfo_imageInfo'>imageInfo</a>.<ahref='#SkBitmap_alphaType'>alphaType</a> is
<ahref='SkImageInfo_Reference#kUnpremul_SkAlphaType'>kUnpremul_SkAlphaType</a>, <ahref='#SkBitmap_setInfo_imageInfo'>imageInfo</a>.<ahref='#SkBitmap_alphaType'>alphaType</a> is replaced by <ahref='SkImageInfo_Reference#kPremul_SkAlphaType'>kPremul_SkAlphaType</a>.
If <ahref='#SkBitmap_setInfo_imageInfo'>imageInfo</a>.<ahref='#SkBitmap_colorType'>colorType</a> is <ahref='SkImageInfo_Reference#kRGB_565_SkColorType'>kRGB_565_SkColorType</a> or <ahref='SkImageInfo_Reference#kGray_8_SkColorType'>kGray_8_SkColorType</a>,
<ahref='#SkBitmap_setInfo_imageInfo'>imageInfo</a>.<ahref='#SkBitmap_alphaType'>alphaType</a> is set to <ahref='SkImageInfo_Reference#kOpaque_SkAlphaType'>kOpaque_SkAlphaType</a>.
If <ahref='#SkBitmap_setInfo_imageInfo'>imageInfo</a>.<ahref='#SkBitmap_colorType'>colorType</a> is <ahref='SkImageInfo_Reference#kARGB_4444_SkColorType'>kARGB_4444_SkColorType</a>, <ahref='SkImageInfo_Reference#kRGBA_8888_SkColorType'>kRGBA_8888_SkColorType</a>,
<ahref='SkImageInfo_Reference#kBGRA_8888_SkColorType'>kBGRA_8888_SkColorType</a>, or <ahref='SkImageInfo_Reference#kRGBA_F16_SkColorType'>kRGBA_F16_SkColorType</a>: <ahref='#SkBitmap_setInfo_imageInfo'>imageInfo</a>.<ahref='#SkBitmap_alphaType'>alphaType</a> remains
<ahref='#SkBitmap_rowBytes'>rowBytes</a> must equal or exceed <ahref='#SkBitmap_setInfo_imageInfo'>imageInfo</a>.<ahref='SkImageInfo_Reference#SkImageInfo'>minRowBytes</a>. If <ahref='#SkBitmap_setInfo_imageInfo'>imageInfo</a>.<ahref='#SkBitmap_colorSpace'>colorSpace</a> is
<ahref='SkImageInfo_Reference#kUnknown_SkColorType'>kUnknown_SkColorType</a>, <ahref='#SkBitmap_rowBytes'>rowBytes</a> is ignored and treated as zero; for all other
<ahref='undocumented#Color_Space'>Color Space</a> values, <ahref='#SkBitmap_rowBytes'>rowBytes</a> of zero is treated as <ahref='#SkBitmap_setInfo_imageInfo'>imageInfo</a>.<ahref='SkImageInfo_Reference#SkImageInfo'>minRowBytes</a>.
<td><ahref='#SkBitmap_rowBytes'>rowBytes</a> is positive and less than <ahref='#SkBitmap_setInfo_imageInfo'>imageInfo</a>.<ahref='#SkBitmap_width'>width</a>() times <ahref='#SkBitmap_setInfo_imageInfo'>imageInfo</a>.<ahref='#SkBitmap_bytesPerPixel'>bytesPerPixel</a></td>
Instructs <ahref='#SkBitmap_tryAllocPixelsFlags'>tryAllocPixelsFlags</a> and <ahref='#SkBitmap_allocPixelsFlags'>allocPixelsFlags</a> to zero pixel memory.
Sets <ahref='SkImageInfo_Reference#SkImageInfo'>SkImageInfo</a> to <ahref='#SkBitmap_tryAllocPixelsFlags_info'>info</a> following the rules in <ahref='#SkBitmap_setInfo'>setInfo</a>() and allocates <ahref='undocumented#Pixel'>pixel</a>
memory. If <ahref='#SkBitmap_tryAllocPixelsFlags_flags'>flags</a> is <ahref='#SkBitmap_kZeroPixels_AllocFlag'>kZeroPixels_AllocFlag</a>, memory is zeroed.
Returns false and calls <ahref='#SkBitmap_reset'>reset()</a> if <ahref='SkImageInfo_Reference#SkImageInfo'>SkImageInfo</a> could not be set, or memory could
implementation of malloc(), if <ahref='#SkBitmap_tryAllocPixelsFlags_flags'>flags</a> is zero, and calloc(), if <ahref='#SkBitmap_tryAllocPixelsFlags_flags'>flags</a> is
<ahref='#SkBitmap_tryAllocPixelsFlags_flags'>flags</a> set to <ahref='#SkBitmap_kZeroPixels_AllocFlag'>kZeroPixels_AllocFlag</a> offers equal or better performance than
subsequently calling <ahref='#SkBitmap_eraseColor'>eraseColor</a>() with <ahref='SkColor_Reference#SK_ColorTRANSPARENT'>SK_ColorTRANSPARENT</a>.
Sets <ahref='SkImageInfo_Reference#SkImageInfo'>SkImageInfo</a> to <ahref='#SkBitmap_allocPixelsFlags_info'>info</a> following the rules in <ahref='#SkBitmap_setInfo'>setInfo</a>() and allocates <ahref='undocumented#Pixel'>pixel</a>
memory. If <ahref='#SkBitmap_allocPixelsFlags_flags'>flags</a> is <ahref='#SkBitmap_kZeroPixels_AllocFlag'>kZeroPixels_AllocFlag</a>, memory is zeroed.
implementation of malloc(), if <ahref='#SkBitmap_allocPixelsFlags_flags'>flags</a> is zero, and calloc(), if <ahref='#SkBitmap_allocPixelsFlags_flags'>flags</a> is
<ahref='#SkBitmap_allocPixelsFlags_flags'>flags</a> set to <ahref='#SkBitmap_kZeroPixels_AllocFlag'>kZeroPixels_AllocFlag</a> offers equal or better performance than
subsequently calling <ahref='#SkBitmap_eraseColor'>eraseColor</a>() with <ahref='SkColor_Reference#SK_ColorTRANSPARENT'>SK_ColorTRANSPARENT</a>.
<div><fiddle-embedname="737e721c7d9e0f367d25521a1b823b9d"><div><ahref='undocumented#Text'>Text</a> is drawn on a transparent background; drawing the bitmap a second time
Sets <ahref='SkImageInfo_Reference#SkImageInfo'>SkImageInfo</a> to <ahref='#SkBitmap_tryAllocPixels_info'>info</a> following the rules in <ahref='#SkBitmap_setInfo'>setInfo</a>() and allocates <ahref='undocumented#Pixel'>pixel</a>
memory. <ahref='#SkBitmap_tryAllocPixels_rowBytes'>rowBytes</a> must equal or exceed <ahref='#SkBitmap_tryAllocPixels_info'>info</a>.<ahref='#SkImageInfo_width'>width()</a> times <ahref='#SkBitmap_tryAllocPixels_info'>info</a>.<ahref='#SkImageInfo_bytesPerPixel'>bytesPerPixel</a>(),
or equal zero. Pass in zero for <ahref='#SkBitmap_tryAllocPixels_rowBytes'>rowBytes</a> to compute the minimum valid value.
Returns false and calls <ahref='#SkBitmap_reset'>reset()</a> if <ahref='SkImageInfo_Reference#SkImageInfo'>SkImageInfo</a> could not be set, or memory could
Sets <ahref='SkImageInfo_Reference#SkImageInfo'>SkImageInfo</a> to <ahref='#SkBitmap_allocPixels_info'>info</a> following the rules in <ahref='#SkBitmap_setInfo'>setInfo</a>() and allocates <ahref='undocumented#Pixel'>pixel</a>
memory. <ahref='#SkBitmap_allocPixels_rowBytes'>rowBytes</a> must equal or exceed <ahref='#SkBitmap_allocPixels_info'>info</a>.<ahref='#SkImageInfo_width'>width()</a> times <ahref='#SkBitmap_allocPixels_info'>info</a>.<ahref='#SkImageInfo_bytesPerPixel'>bytesPerPixel</a>(),
or equal zero. Pass in zero for <ahref='#SkBitmap_allocPixels_rowBytes'>rowBytes</a> to compute the minimum valid value.
Sets <ahref='SkImageInfo_Reference#SkImageInfo'>SkImageInfo</a> to <ahref='#SkBitmap_tryAllocPixels_2_info'>info</a> following the rules in <ahref='#SkBitmap_setInfo'>setInfo</a>() and allocates <ahref='undocumented#Pixel'>pixel</a>
Returns false and calls <ahref='#SkBitmap_reset'>reset()</a> if <ahref='SkImageInfo_Reference#SkImageInfo'>SkImageInfo</a> could not be set, or memory could
Sets <ahref='SkImageInfo_Reference#SkImageInfo'>SkImageInfo</a> to <ahref='#SkBitmap_allocPixels_2_info'>info</a> following the rules in <ahref='#SkBitmap_setInfo'>setInfo</a>() and allocates <ahref='undocumented#Pixel'>pixel</a>
Sets <ahref='SkImageInfo_Reference#SkImageInfo'>SkImageInfo</a> to <ahref='#SkBitmap_tryAllocN32Pixels_width'>width</a>, <ahref='#SkBitmap_tryAllocN32Pixels_height'>height</a>, and native <ahref='SkImageInfo_Reference#Color_Type'>color type</a>; and allocates
<ahref='undocumented#Pixel'>pixel</a> memory. If <ahref='#SkBitmap_tryAllocN32Pixels_isOpaque'>isOpaque</a> is true, sets <ahref='SkImageInfo_Reference#SkImageInfo'>SkImageInfo</a> to <ahref='SkImageInfo_Reference#kOpaque_SkAlphaType'>kOpaque_SkAlphaType</a>;
Use to create <ahref='SkBitmap_Reference#SkBitmap'>SkBitmap</a> that matches <ahref='SkColor_Reference#SkPMColor'>SkPMColor</a>, the native <ahref='undocumented#Pixel'>pixel</a> arrangement on
the platform. <ahref='SkBitmap_Reference#SkBitmap'>SkBitmap</a> drawn to output <ahref='undocumented#Device'>device</a> skips converting its <ahref='undocumented#Pixel'>pixel</a> format.
Sets <ahref='SkImageInfo_Reference#SkImageInfo'>SkImageInfo</a> to <ahref='#SkBitmap_allocN32Pixels_width'>width</a>, <ahref='#SkBitmap_allocN32Pixels_height'>height</a>, and the native <ahref='SkImageInfo_Reference#Color_Type'>color type</a>; and allocates
<ahref='undocumented#Pixel'>pixel</a> memory. If <ahref='#SkBitmap_allocN32Pixels_isOpaque'>isOpaque</a> is true, sets <ahref='SkImageInfo_Reference#SkImageInfo'>SkImageInfo</a> to <ahref='SkImageInfo_Reference#kPremul_SkAlphaType'>kPremul_SkAlphaType</a>;
Aborts if <ahref='#SkBitmap_allocN32Pixels_width'>width</a> exceeds 29 bits or is negative, or <ahref='#SkBitmap_allocN32Pixels_height'>height</a> is negative, or
Use to create <ahref='SkBitmap_Reference#SkBitmap'>SkBitmap</a> that matches <ahref='SkColor_Reference#SkPMColor'>SkPMColor</a>, the native <ahref='undocumented#Pixel'>pixel</a> arrangement on
the platform. <ahref='SkBitmap_Reference#SkBitmap'>SkBitmap</a> drawn to output <ahref='undocumented#Device'>device</a> skips converting its <ahref='undocumented#Pixel'>pixel</a> format.
Sets <ahref='SkImageInfo_Reference#SkImageInfo'>SkImageInfo</a> to <ahref='#SkBitmap_installPixels_info'>info</a> following the rules in <ahref='#SkBitmap_setInfo'>setInfo</a>(), and creates <ahref='undocumented#SkPixelRef'>SkPixelRef</a>
containing <ahref='#SkBitmap_installPixels_pixels'>pixels</a> and <ahref='#SkBitmap_installPixels_rowBytes'>rowBytes</a>. <ahref='#SkBitmap_installPixels_releaseProc'>releaseProc</a>, if not nullptr, is called
immediately on failure or when <ahref='#SkBitmap_installPixels_pixels'>pixels</a> are no longer referenced. <ahref='#SkBitmap_installPixels_context'>context</a> may be
If <ahref='SkImageInfo_Reference#SkImageInfo'>SkImageInfo</a> could not be set, or <ahref='#SkBitmap_installPixels_rowBytes'>rowBytes</a> is less than <ahref='#SkBitmap_installPixels_info'>info</a>.<ahref='#SkImageInfo_minRowBytes'>minRowBytes</a>():
calls <ahref='#SkBitmap_installPixels_releaseProc'>releaseProc</a> if present, calls <ahref='#SkBitmap_reset'>reset()</a>, and returns false.
Otherwise, if <ahref='#SkBitmap_installPixels_pixels'>pixels</a> equals nullptr: sets <ahref='SkImageInfo_Reference#SkImageInfo'>SkImageInfo</a>, calls <ahref='#SkBitmap_installPixels_releaseProc'>releaseProc</a> if
If <ahref='SkImageInfo_Reference#SkImageInfo'>SkImageInfo</a> is set, <ahref='#SkBitmap_installPixels_pixels'>pixels</a> is not nullptr, and <ahref='#SkBitmap_installPixels_releaseProc'>releaseProc</a> is not nullptr:
when <ahref='#SkBitmap_installPixels_pixels'>pixels</a> are no longer referenced, calls <ahref='#SkBitmap_installPixels_releaseProc'>releaseProc</a> with <ahref='#SkBitmap_installPixels_pixels'>pixels</a> and <ahref='#SkBitmap_installPixels_context'>context</a>
<div><fiddle-embedname="8c4f7bf73fffa1a812ee8e88e44e639c"><div>releaseProc is called immediately because <ahref='#SkBitmap_rowBytes'>rowBytes</a> is too small for <ahref='undocumented#Pixel_Ref'>Pixel Ref</a>.
Sets <ahref='SkImageInfo_Reference#SkImageInfo'>SkImageInfo</a> to <ahref='#SkBitmap_installPixels_2_info'>info</a> following the rules in <ahref='#SkBitmap_setInfo'>setInfo</a>(), and creates <ahref='undocumented#SkPixelRef'>SkPixelRef</a>
containing <ahref='#SkBitmap_installPixels_2_pixels'>pixels</a> and <ahref='#SkBitmap_installPixels_2_rowBytes'>rowBytes</a>.
If <ahref='SkImageInfo_Reference#SkImageInfo'>SkImageInfo</a> could not be set, or <ahref='#SkBitmap_installPixels_2_rowBytes'>rowBytes</a> is less than <ahref='#SkBitmap_installPixels_2_info'>info</a>.<ahref='#SkImageInfo_minRowBytes'>minRowBytes</a>():
calls <ahref='#SkBitmap_reset'>reset()</a>, and returns false.
Caller must ensure that <ahref='#SkBitmap_installPixels_2_pixels'>pixels</a> are valid for the lifetime of <ahref='SkBitmap_Reference#SkBitmap'>SkBitmap</a> and <ahref='undocumented#SkPixelRef'>SkPixelRef</a>.
<div><fiddle-embedname="a7e04447b2081010c50d7920e80a6bb2"><div>GPU does not support <ahref='SkImageInfo_Reference#kUnpremul_SkAlphaType'>kUnpremul_SkAlphaType</a>, does not assert that it does not.
Sets <ahref='SkImageInfo_Reference#SkImageInfo'>SkImageInfo</a> to <ahref='#SkBitmap_installPixels_3_pixmap'>pixmap</a>.<ahref='#SkPixmap_info'>info()</a> following the rules in <ahref='#SkBitmap_setInfo'>setInfo</a>(), and creates
<ahref='undocumented#SkPixelRef'>SkPixelRef</a> containing <ahref='#SkBitmap_installPixels_3_pixmap'>pixmap</a>.<ahref='#SkPixmap_addr'>addr()</a> and <ahref='#SkBitmap_installPixels_3_pixmap'>pixmap</a>.<ahref='#SkPixmap_rowBytes'>rowBytes</a>().
If <ahref='SkImageInfo_Reference#SkImageInfo'>SkImageInfo</a> could not be set, or <ahref='#SkBitmap_installPixels_3_pixmap'>pixmap</a>.<ahref='#SkPixmap_rowBytes'>rowBytes</a>() is less than
<ahref='SkImageInfo_Reference#SkImageInfo'>SkImageInfo</a>::<ahref='#SkImageInfo_minRowBytes'>minRowBytes</a>(): calls <ahref='#SkBitmap_reset'>reset()</a>, and returns false.
Caller must ensure that <ahref='#SkBitmap_installPixels_3_pixmap'>pixmap</a> is valid for the lifetime of <ahref='SkBitmap_Reference#SkBitmap'>SkBitmap</a> and <ahref='undocumented#SkPixelRef'>SkPixelRef</a>.
<td><ahref='SkImageInfo_Reference#SkImageInfo'>SkImageInfo</a>, <ahref='undocumented#Pixel'>pixel</a> address, and <ahref='#SkBitmap_rowBytes'>rowBytes</a>()</td>
true if <ahref='SkImageInfo_Reference#SkImageInfo'>SkImageInfo</a> was set to <ahref='#SkBitmap_installPixels_3_pixmap'>pixmap</a>.<ahref='#SkBitmap_info'>info()</a>
<div><fiddle-embedname="6e2a8c9358b34aebd2ec586815fe9d3a"><div><ahref='#Draw'>Draw</a> a five by five bitmap, and draw it again with a center white pixel.
Replaces <ahref='undocumented#SkPixelRef'>SkPixelRef</a> with <ahref='#SkBitmap_setPixels_pixels'>pixels</a>, preserving <ahref='SkImageInfo_Reference#SkImageInfo'>SkImageInfo</a> and <ahref='#SkBitmap_rowBytes'>rowBytes</a>().
Sets <ahref='undocumented#SkPixelRef'>SkPixelRef</a> origin to (0, 0).
If <ahref='#SkBitmap_setPixels_pixels'>pixels</a> is nullptr, or if <ahref='#SkBitmap_info'>info()</a>.<ahref='#SkImageInfo_colorType'>colorType</a>() equals <ahref='SkImageInfo_Reference#kUnknown_SkColorType'>kUnknown_SkColorType</a>;
release reference to <ahref='undocumented#SkPixelRef'>SkPixelRef</a>, and set <ahref='undocumented#SkPixelRef'>SkPixelRef</a> to nullptr.
Allocates <ahref='undocumented#Pixel'>pixel</a> memory with <ahref='#SkBitmap_HeapAllocator'>HeapAllocator</a>, and replaces existing <ahref='undocumented#SkPixelRef'>SkPixelRef</a>.
The allocation <ahref='undocumented#Size'>size</a> is determined by <ahref='SkImageInfo_Reference#SkImageInfo'>SkImageInfo</a> width, height, and <ahref='SkImageInfo_Reference#SkColorType'>SkColorType</a>.
Returns false if <ahref='#SkBitmap_info'>info()</a>.<ahref='#SkImageInfo_colorType'>colorType</a>() is <ahref='SkImageInfo_Reference#kUnknown_SkColorType'>kUnknown_SkColorType</a>, or allocation fails.
<div><fiddle-embedname="720e4c053fae9e929ab6518b47e49370"><div><ahref='#Bitmap'>Bitmap</a> hosts and draws gray values in set1. <ahref='#SkBitmap_tryAllocPixels'>tryAllocPixels</a> replaces <ahref='undocumented#Pixel_Ref'>Pixel Ref</a>
and erases it to black, but does not alter set1. <ahref='#SkBitmap_setPixels'>setPixels</a> replaces black
<ahref='undocumented#Pixel_Ref'>Pixel Ref</a> with set1.
Allocates <ahref='undocumented#Pixel'>pixel</a> memory with <ahref='#SkBitmap_HeapAllocator'>HeapAllocator</a>, and replaces existing <ahref='undocumented#SkPixelRef'>SkPixelRef</a>.
The allocation <ahref='undocumented#Size'>size</a> is determined by <ahref='SkImageInfo_Reference#SkImageInfo'>SkImageInfo</a> width, height, and <ahref='SkImageInfo_Reference#SkColorType'>SkColorType</a>.
Aborts if <ahref='#SkBitmap_info'>info()</a>.<ahref='#SkImageInfo_colorType'>colorType</a>() is <ahref='SkImageInfo_Reference#kUnknown_SkColorType'>kUnknown_SkColorType</a>, or allocation fails.
<div><fiddle-embedname="1219b38c788bf270fb20f8cd2d78cff8"><div><ahref='#Bitmap'>Bitmap</a> hosts and draws gray values in set1. <ahref='#SkBitmap_allocPixels'>allocPixels</a> replaces <ahref='undocumented#Pixel_Ref'>Pixel Ref</a>
Allocates <ahref='undocumented#Pixel'>pixel</a> memory with <ahref='#SkBitmap_tryAllocPixels_4_allocator'>allocator</a>, and replaces existing <ahref='undocumented#SkPixelRef'>SkPixelRef</a>.
The allocation <ahref='undocumented#Size'>size</a> is determined by <ahref='SkImageInfo_Reference#SkImageInfo'>SkImageInfo</a> width, height, and <ahref='SkImageInfo_Reference#SkColorType'>SkColorType</a>.
<div><fiddle-embedname="eb6f861ca1839146d26e40d56c2a001c"><div><ahref='#SkBitmap_HeapAllocator'>HeapAllocator</a> limits the maximum size of <ahref='#Bitmap'>Bitmap</a> to two gigabytes. Using
Allocates <ahref='undocumented#Pixel'>pixel</a> memory with <ahref='#SkBitmap_allocPixels_4_allocator'>allocator</a>, and replaces existing <ahref='undocumented#SkPixelRef'>SkPixelRef</a>.
The allocation <ahref='undocumented#Size'>size</a> is determined by <ahref='SkImageInfo_Reference#SkImageInfo'>SkImageInfo</a> width, height, and <ahref='SkImageInfo_Reference#SkColorType'>SkColorType</a>.
Aborts if <ahref='#SkBitmap_Allocator'>Allocator</a>::<ahref='#SkBitmap_Allocator_allocPixelRef'>allocPixelRef</a> return false. Abort steps may be provided by
Returns <ahref='undocumented#SkPixelRef'>SkPixelRef</a>, which contains: <ahref='undocumented#Pixel'>pixel</a> base address; its dimensions; and
<ahref='#SkBitmap_rowBytes'>rowBytes</a>(), the interval from one row to the next. Does not change <ahref='undocumented#SkPixelRef'>SkPixelRef</a>
<ahref='undocumented#Reference_Count'>reference count</a>. <ahref='undocumented#SkPixelRef'>SkPixelRef</a> may be shared by multiple <ahref='SkBitmap_Reference#Bitmap'>bitmaps</a>.
If <ahref='undocumented#SkPixelRef'>SkPixelRef</a> has not been set, returns nullptr.
Returns origin of pixels within <ahref='undocumented#SkPixelRef'>SkPixelRef</a>. <ahref='SkBitmap_Reference#SkBitmap'>SkBitmap</a> bounds is always contained
by <ahref='undocumented#SkPixelRef'>SkPixelRef</a> bounds, which may be the same <ahref='undocumented#Size'>size</a> or larger. Multiple <ahref='SkBitmap_Reference#SkBitmap'>SkBitmap</a>
can share the same <ahref='undocumented#SkPixelRef'>SkPixelRef</a>, where each <ahref='SkBitmap_Reference#SkBitmap'>SkBitmap</a> has different bounds.
void <ahref='#SkBitmap_setPixelRef'>setPixelRef</a>(<ahref='undocumented#sk_sp'>sk sp</a><<ahref='undocumented#SkPixelRef'>SkPixelRef</a>><ahref='#SkBitmap_pixelRef'>pixelRef</a>, int dx, int dy)
Replaces <ahref='#SkBitmap_setPixelRef_pixelRef'>pixelRef</a> and origin in <ahref='SkBitmap_Reference#SkBitmap'>SkBitmap</a>. <ahref='#SkBitmap_setPixelRef_dx'>dx</a> and <ahref='#SkBitmap_setPixelRef_dy'>dy</a> specify the offset
within the <ahref='undocumented#SkPixelRef'>SkPixelRef</a> pixels for the top-left corner of the <ahref='SkBitmap_Reference#Bitmap'>bitmap</a>.
Asserts in debug builds if <ahref='#SkBitmap_setPixelRef_dx'>dx</a> or <ahref='#SkBitmap_setPixelRef_dy'>dy</a> are out of range. Pins <ahref='#SkBitmap_setPixelRef_dx'>dx</a> and <ahref='#SkBitmap_setPixelRef_dy'>dy</a>
<ahref='SkImageInfo_Reference#SkColorType'>SkColorType</a> and <ahref='SkImageInfo_Reference#SkAlphaType'>SkAlphaType</a> in <ahref='SkImageInfo_Reference#SkImageInfo'>SkImageInfo</a>.
Replaces <ahref='undocumented#Pixel'>pixel</a> values with <ahref='#SkBitmap_eraseColor_c'>c</a>. All pixels contained by <ahref='#SkBitmap_bounds'>bounds()</a> are affected.
If the <ahref='#SkBitmap_colorType'>colorType</a>() is <ahref='SkImageInfo_Reference#kGray_8_SkColorType'>kGray_8_SkColorType</a> or <ahref='SkImageInfo_Reference#kRGB_565_SkColorType'>kRGB_565_SkColorType</a>, then <ahref='SkColor_Reference#Alpha'>alpha</a>
is ignored; RGB is treated as opaque. If <ahref='#SkBitmap_colorType'>colorType</a>() is <ahref='SkImageInfo_Reference#kAlpha_8_SkColorType'>kAlpha_8_SkColorType</a>,
void <ahref='#SkBitmap_eraseARGB'>eraseARGB</a>(<ahref='undocumented#U8CPU'>U8CPU</a> a, <ahref='undocumented#U8CPU'>U8CPU</a> r, <ahref='undocumented#U8CPU'>U8CPU</a> g, <ahref='undocumented#U8CPU'>U8CPU</a> b) const
Replaces <ahref='undocumented#Pixel'>pixel</a> values with <ahref='undocumented#Unpremultiply'>unpremultiplied</a><ahref='SkColor_Reference#Color'>color</a> built from <ahref='#SkBitmap_eraseARGB_a'>a</a>, <ahref='#SkBitmap_eraseARGB_r'>r</a>, <ahref='#SkBitmap_eraseARGB_g'>g</a>, and <ahref='#SkBitmap_eraseARGB_b'>b</a>.
All pixels contained by <ahref='#SkBitmap_bounds'>bounds()</a> are affected.
If the <ahref='#SkBitmap_colorType'>colorType</a>() is <ahref='SkImageInfo_Reference#kGray_8_SkColorType'>kGray_8_SkColorType</a> or <ahref='SkImageInfo_Reference#kRGB_565_SkColorType'>kRGB_565_SkColorType</a>, then <ahref='#SkBitmap_eraseARGB_a'>a</a>
is ignored; <ahref='#SkBitmap_eraseARGB_r'>r</a>, <ahref='#SkBitmap_eraseARGB_g'>g</a>, and <ahref='#SkBitmap_eraseARGB_b'>b</a> are treated as opaque. If <ahref='#SkBitmap_colorType'>colorType</a>() is <ahref='SkImageInfo_Reference#kAlpha_8_SkColorType'>kAlpha_8_SkColorType</a>,
Replaces <ahref='undocumented#Pixel'>pixel</a> values inside <ahref='#SkBitmap_erase()_area'>area</a> with <ahref='#SkBitmap_erase()_c'>c</a>. If <ahref='#SkBitmap_erase()_area'>area</a> does not intersect <ahref='#SkBitmap_bounds'>bounds()</a>,
If the <ahref='#SkBitmap_colorType'>colorType</a>() is <ahref='SkImageInfo_Reference#kGray_8_SkColorType'>kGray_8_SkColorType</a> or <ahref='SkImageInfo_Reference#kRGB_565_SkColorType'>kRGB_565_SkColorType</a>, then <ahref='SkColor_Reference#Alpha'>alpha</a>
is ignored; RGB is treated as opaque. If <ahref='#SkBitmap_colorType'>colorType</a>() is <ahref='SkImageInfo_Reference#kAlpha_8_SkColorType'>kAlpha_8_SkColorType</a>,
Returns <ahref='undocumented#Pixel'>pixel</a> at (<ahref='#SkBitmap_getColor_x'>x</a>, <ahref='#SkBitmap_getColor_y'>y</a>) as <ahref='undocumented#Unpremultiply'>unpremultiplied</a><ahref='SkColor_Reference#Color'>color</a>.
Returns black with <ahref='SkColor_Reference#Alpha'>alpha</a> if <ahref='SkImageInfo_Reference#SkColorType'>SkColorType</a> is <ahref='SkImageInfo_Reference#kAlpha_8_SkColorType'>kAlpha_8_SkColorType</a>.
SK_RELEASE is defined. Fails if <ahref='SkImageInfo_Reference#SkColorType'>SkColorType</a> is <ahref='SkImageInfo_Reference#kUnknown_SkColorType'>kUnknown_SkColorType</a> or
<ahref='undocumented#Pixel'>pixel</a> address is nullptr.
<ahref='undocumented#SkColorSpace'>SkColorSpace</a> in <ahref='SkImageInfo_Reference#SkImageInfo'>SkImageInfo</a> is ignored. Some <ahref='SkColor_Reference#Color'>color</a> precision may be lost in the
conversion to <ahref='undocumented#Unpremultiply'>unpremultiplied</a><ahref='SkColor_Reference#Color'>color</a>; original <ahref='undocumented#Pixel'>pixel</a><ahref='undocumented#Data'>data</a> may have additional
float <ahref='#SkBitmap_getAlphaf'>getAlphaf</a>(int x, int y) const
</pre>
Looks up the pixel at (<ahref='#SkBitmap_getAlphaf_x'>x</a>,<ahref='#SkBitmap_getAlphaf_y'>y</a>) and return its alpha component, normalized to [0..1].
This is roughly equivalent to <code>SkGetColorA(getColor()\)</code>, but can be more efficent
(and more precise if the pixels store more than 8 bits per component).
Input is not validated: out of bounds values of <ahref='#SkBitmap_getAddr_x'>x</a> or <ahref='#SkBitmap_getAddr_y'>y</a>, or <ahref='SkImageInfo_Reference#kUnknown_SkColorType'>kUnknown_SkColorType</a>,
<ahref='SkImageInfo_Reference#SkColorType'>SkColorType</a> is <ahref='SkImageInfo_Reference#kUnknown_SkColorType'>kUnknown_SkColorType</a>, or <ahref='undocumented#SkPixelRef'>SkPixelRef</a> is nullptr.
Shares <ahref='undocumented#Pixel_Ref'>Pixel Ref</a> with <ahref='#SkBitmap_extractSubset_dst'>dst</a>. <ahref='#Pixels'>Pixels</a> are not copied; <ahref='#Bitmap'>Bitmap</a> and <ahref='#SkBitmap_extractSubset_dst'>dst</a> point
to the same pixels; <ahref='#SkBitmap_extractSubset_dst'>dst</a><ahref='#SkBitmap_bounds'>bounds</a>() are set to the intersection of <ahref='#SkBitmap_extractSubset_subset'>subset</a>
and the original <ahref='#SkBitmap_bounds'>bounds</a>().
<ahref='#SkBitmap_extractSubset_subset'>subset</a> may be larger than <ahref='#SkBitmap_bounds'>bounds</a>(). Any area outside of <ahref='#SkBitmap_bounds'>bounds</a>() is ignored.
Any contents of <ahref='#SkBitmap_extractSubset_dst'>dst</a> are discarded. <ahref='#SkBitmap_isVolatile'>isVolatile</a> setting is copied to <ahref='#SkBitmap_extractSubset_dst'>dst</a>.
<ahref='#SkBitmap_extractSubset_dst'>dst</a> is set to <ahref='#SkBitmap_colorType'>colorType</a>, <ahref='#SkBitmap_alphaType'>alphaType</a>, and <ahref='#SkBitmap_colorSpace'>colorSpace</a>.
Copies a <ahref='SkRect_Reference#Rect'>Rect</a> of pixels from <ahref='#Bitmap'>Bitmap</a> to <ahref='#SkBitmap_readPixels_dstPixels'>dstPixels</a>. Copy starts at (<ahref='#SkBitmap_readPixels_srcX'>srcX</a>, <ahref='#SkBitmap_readPixels_srcY'>srcY</a>),
<td><ahref='#SkBitmap_readPixels_dstRowBytes'>dstRowBytes</a> is less than <ahref='#SkBitmap_readPixels_dstInfo'>dstInfo</a>.<ahref='SkImageInfo_Reference#SkImageInfo'>minRowBytes</a></td>
</tr><tr>
<td><ahref='undocumented#Pixel_Ref'>Pixel Ref</a> is nullptr</td>
<ahref='#Pixels'>Pixels</a> are copied only if pixel conversion is possible. If <ahref='#Bitmap'>Bitmap</a><ahref='#SkBitmap_colorType'>colorType</a> is
<ahref='SkImageInfo_Reference#kGray_8_SkColorType'>kGray_8_SkColorType</a>, or <ahref='SkImageInfo_Reference#kAlpha_8_SkColorType'>kAlpha_8_SkColorType</a>; <ahref='#SkBitmap_readPixels_dstInfo'>dstInfo</a>.<ahref='#SkBitmap_colorType'>colorType</a> must match.
If <ahref='#Bitmap'>Bitmap</a><ahref='#SkBitmap_colorType'>colorType</a> is <ahref='SkImageInfo_Reference#kGray_8_SkColorType'>kGray_8_SkColorType</a>, <ahref='#SkBitmap_readPixels_dstInfo'>dstInfo</a>.<ahref='#SkBitmap_colorSpace'>colorSpace</a> must match.
If <ahref='#Bitmap'>Bitmap</a><ahref='#SkBitmap_alphaType'>alphaType</a> is <ahref='SkImageInfo_Reference#kOpaque_SkAlphaType'>kOpaque_SkAlphaType</a>, <ahref='#SkBitmap_readPixels_dstInfo'>dstInfo</a>.<ahref='#SkBitmap_alphaType'>alphaType</a> must
match. If <ahref='#Bitmap'>Bitmap</a><ahref='#SkBitmap_colorSpace'>colorSpace</a> is nullptr, <ahref='#SkBitmap_readPixels_dstInfo'>dstInfo</a>.<ahref='#SkBitmap_colorSpace'>colorSpace</a> must match. Returns
<ahref='#SkBitmap_readPixels_srcX'>srcX</a> and <ahref='#SkBitmap_readPixels_srcY'>srcY</a> may be negative to copy only top or left of source. Returns
false if <ahref='#SkBitmap_width'>width</a>() or <ahref='#SkBitmap_height'>height</a>() is zero or negative.
Returns false if <code>abs(srcX) >= <ahref='#Bitmap'>Bitmap</a><ahref='#SkBitmap_width'>width</a>(\)</code>, or if <code>abs(srcY) >= <ahref='#Bitmap'>Bitmap</a><ahref='#SkBitmap_height'>height</a>(\)</code>.
Copies a <ahref='SkRect_Reference#Rect'>Rect</a> of pixels from <ahref='#Bitmap'>Bitmap</a> to <ahref='#SkBitmap_readPixels_2_dst'>dst</a>. Copy starts at (<ahref='#SkBitmap_readPixels_2_srcX'>srcX</a>, <ahref='#SkBitmap_readPixels_2_srcY'>srcY</a>), and
and row bytes of destination. <ahref='#SkBitmap_readPixels_2_dst'>dst</a>.<ahref='#SkBitmap_rowBytes'>rowBytes</a> specifics the gap from one destination
row to the next. Returns true if pixels are copied. Returns false if:
<td><ahref='#SkBitmap_readPixels_2_dst'>dst</a>.<ahref='#SkBitmap_rowBytes'>rowBytes</a> is less than <ahref='SkImageInfo_Reference#SkImageInfo_minRowBytes'>SkImageInfo::minRowBytes</a></td>
<ahref='#Pixels'>Pixels</a> are copied only if pixel conversion is possible. If <ahref='#Bitmap'>Bitmap</a><ahref='#SkBitmap_colorType'>colorType</a> is
<ahref='SkImageInfo_Reference#kGray_8_SkColorType'>kGray_8_SkColorType</a>, or <ahref='SkImageInfo_Reference#kAlpha_8_SkColorType'>kAlpha_8_SkColorType</a>; <ahref='#SkBitmap_readPixels_2_dst'>dst</a><ahref='SkImageInfo_Reference#Color_Type'>Color Type</a> must match.
If <ahref='#Bitmap'>Bitmap</a><ahref='#SkBitmap_colorType'>colorType</a> is <ahref='SkImageInfo_Reference#kGray_8_SkColorType'>kGray_8_SkColorType</a>, <ahref='#SkBitmap_readPixels_2_dst'>dst</a><ahref='undocumented#Color_Space'>Color Space</a> must match.
If <ahref='#Bitmap'>Bitmap</a><ahref='#SkBitmap_alphaType'>alphaType</a> is <ahref='SkImageInfo_Reference#kOpaque_SkAlphaType'>kOpaque_SkAlphaType</a>, <ahref='#SkBitmap_readPixels_2_dst'>dst</a><ahref='SkImageInfo_Reference#Alpha_Type'>Alpha Type</a> must
match. If <ahref='#Bitmap'>Bitmap</a><ahref='#SkBitmap_colorSpace'>colorSpace</a> is nullptr, <ahref='#SkBitmap_readPixels_2_dst'>dst</a><ahref='undocumented#Color_Space'>Color Space</a> must match. Returns
<ahref='#SkBitmap_readPixels_2_srcX'>srcX</a> and <ahref='#SkBitmap_readPixels_2_srcY'>srcY</a> may be negative to copy only top or left of source. Returns
false if <ahref='#SkBitmap_width'>width</a>() or <ahref='#SkBitmap_height'>height</a>() is zero or negative.
Returns false if <code>abs(srcX) >= <ahref='#Bitmap'>Bitmap</a><ahref='#SkBitmap_width'>width</a>(\)</code>, or if <code>abs(srcY) >= <ahref='#Bitmap'>Bitmap</a><ahref='#SkBitmap_height'>height</a>(\)</code>.
Copies a <ahref='SkRect_Reference#Rect'>Rect</a> of pixels from <ahref='#Bitmap'>Bitmap</a> to <ahref='#SkBitmap_readPixels_3_dst'>dst</a>. Copy starts at (0, 0), and
and row bytes of destination. <ahref='#SkBitmap_readPixels_3_dst'>dst</a>.<ahref='#SkBitmap_rowBytes'>rowBytes</a> specifics the gap from one destination
<td><ahref='#SkBitmap_readPixels_3_dst'>dst</a>.<ahref='#SkBitmap_rowBytes'>rowBytes</a> is less than <ahref='SkImageInfo_Reference#SkImageInfo_minRowBytes'>SkImageInfo::minRowBytes</a></td>
</tr><tr>
<td><ahref='undocumented#Pixel_Ref'>Pixel Ref</a> is nullptr</td>
<ahref='#Pixels'>Pixels</a> are copied only if pixel conversion is possible. If <ahref='#Bitmap'>Bitmap</a><ahref='#SkBitmap_colorType'>colorType</a> is
<ahref='SkImageInfo_Reference#kGray_8_SkColorType'>kGray_8_SkColorType</a>, or <ahref='SkImageInfo_Reference#kAlpha_8_SkColorType'>kAlpha_8_SkColorType</a>; <ahref='#SkBitmap_readPixels_3_dst'>dst</a><ahref='SkImageInfo_Reference#Color_Type'>Color Type</a> must match.
If <ahref='#Bitmap'>Bitmap</a><ahref='#SkBitmap_colorType'>colorType</a> is <ahref='SkImageInfo_Reference#kGray_8_SkColorType'>kGray_8_SkColorType</a>, <ahref='#SkBitmap_readPixels_3_dst'>dst</a><ahref='undocumented#Color_Space'>Color Space</a> must match.
If <ahref='#Bitmap'>Bitmap</a><ahref='#SkBitmap_alphaType'>alphaType</a> is <ahref='SkImageInfo_Reference#kOpaque_SkAlphaType'>kOpaque_SkAlphaType</a>, <ahref='#SkBitmap_readPixels_3_dst'>dst</a><ahref='SkImageInfo_Reference#Alpha_Type'>Alpha Type</a> must
match. If <ahref='#Bitmap'>Bitmap</a><ahref='#SkBitmap_colorSpace'>colorSpace</a> is nullptr, <ahref='#SkBitmap_readPixels_3_dst'>dst</a><ahref='undocumented#Color_Space'>Color Space</a> must match. Returns
Copies a <ahref='SkRect_Reference#Rect'>Rect</a> of pixels from <ahref='#SkBitmap_writePixels_src'>src</a>. Copy starts at (<ahref='#SkBitmap_writePixels_dstX'>dstX</a>, <ahref='#SkBitmap_writePixels_dstY'>dstY</a>), and does not exceed
<td><ahref='#SkBitmap_writePixels_src'>src</a>.<ahref='#SkBitmap_rowBytes'>rowBytes</a> is less than <ahref='SkImageInfo_Reference#SkImageInfo_minRowBytes'>SkImageInfo::minRowBytes</a></td>
</tr><tr>
<td><ahref='undocumented#Pixel_Ref'>Pixel Ref</a> is nullptr</td>
<ahref='#Pixels'>Pixels</a> are copied only if pixel conversion is possible. If <ahref='#Bitmap'>Bitmap</a><ahref='#SkBitmap_colorType'>colorType</a> is
<ahref='SkImageInfo_Reference#kGray_8_SkColorType'>kGray_8_SkColorType</a>, or <ahref='SkImageInfo_Reference#kAlpha_8_SkColorType'>kAlpha_8_SkColorType</a>; <ahref='#SkBitmap_writePixels_src'>src</a><ahref='SkImageInfo_Reference#Color_Type'>Color Type</a> must match.
If <ahref='#Bitmap'>Bitmap</a><ahref='#SkBitmap_colorType'>colorType</a> is <ahref='SkImageInfo_Reference#kGray_8_SkColorType'>kGray_8_SkColorType</a>, <ahref='#SkBitmap_writePixels_src'>src</a><ahref='undocumented#Color_Space'>Color Space</a> must match.
If <ahref='#Bitmap'>Bitmap</a><ahref='#SkBitmap_alphaType'>alphaType</a> is <ahref='SkImageInfo_Reference#kOpaque_SkAlphaType'>kOpaque_SkAlphaType</a>, <ahref='#SkBitmap_writePixels_src'>src</a><ahref='SkImageInfo_Reference#Alpha_Type'>Alpha Type</a> must
match. If <ahref='#Bitmap'>Bitmap</a><ahref='#SkBitmap_colorSpace'>colorSpace</a> is nullptr, <ahref='#SkBitmap_writePixels_src'>src</a><ahref='undocumented#Color_Space'>Color Space</a> must match. Returns
<ahref='#SkBitmap_writePixels_dstX'>dstX</a> and <ahref='#SkBitmap_writePixels_dstY'>dstY</a> may be negative to copy only top or left of source. Returns
false if <ahref='#SkBitmap_width'>width</a>() or <ahref='#SkBitmap_height'>height</a>() is zero or negative.
Returns false if <code>abs(dstX) >= <ahref='#Bitmap'>Bitmap</a><ahref='#SkBitmap_width'>width</a>(\)</code>, or if <code>abs(dstY) >= <ahref='#Bitmap'>Bitmap</a><ahref='#SkBitmap_height'>height</a>(\)</code>.
Copies a <ahref='SkRect_Reference#Rect'>Rect</a> of pixels from <ahref='#SkBitmap_writePixels_2_src'>src</a>. Copy starts at (0, 0), and does not exceed
<td><ahref='#SkBitmap_writePixels_2_src'>src</a>.<ahref='#SkBitmap_rowBytes'>rowBytes</a> is less than <ahref='SkImageInfo_Reference#SkImageInfo_minRowBytes'>SkImageInfo::minRowBytes</a></td>
</tr><tr>
<td><ahref='undocumented#Pixel_Ref'>Pixel Ref</a> is nullptr</td>
<ahref='#Pixels'>Pixels</a> are copied only if pixel conversion is possible. If <ahref='#Bitmap'>Bitmap</a><ahref='#SkBitmap_colorType'>colorType</a> is
<ahref='SkImageInfo_Reference#kGray_8_SkColorType'>kGray_8_SkColorType</a>, or <ahref='SkImageInfo_Reference#kAlpha_8_SkColorType'>kAlpha_8_SkColorType</a>; <ahref='#SkBitmap_writePixels_2_src'>src</a><ahref='SkImageInfo_Reference#Color_Type'>Color Type</a> must match.
If <ahref='#Bitmap'>Bitmap</a><ahref='#SkBitmap_colorType'>colorType</a> is <ahref='SkImageInfo_Reference#kGray_8_SkColorType'>kGray_8_SkColorType</a>, <ahref='#SkBitmap_writePixels_2_src'>src</a><ahref='undocumented#Color_Space'>Color Space</a> must match.
If <ahref='#Bitmap'>Bitmap</a><ahref='#SkBitmap_alphaType'>alphaType</a> is <ahref='SkImageInfo_Reference#kOpaque_SkAlphaType'>kOpaque_SkAlphaType</a>, <ahref='#SkBitmap_writePixels_2_src'>src</a><ahref='SkImageInfo_Reference#Alpha_Type'>Alpha Type</a> must
match. If <ahref='#Bitmap'>Bitmap</a><ahref='#SkBitmap_colorSpace'>colorSpace</a> is nullptr, <ahref='#SkBitmap_writePixels_2_src'>src</a><ahref='undocumented#Color_Space'>Color Space</a> must match. Returns
Sets <ahref='#SkBitmap_extractAlpha_dst'>dst</a> to <ahref='SkColor_Reference#Alpha'>alpha</a> described by pixels. Returns false if <ahref='#SkBitmap_extractAlpha_dst'>dst</a> cannot be written to
Uses <ahref='#SkBitmap_HeapAllocator'>HeapAllocator</a> to reserve memory for <ahref='#SkBitmap_extractAlpha_dst'>dst</a><ahref='undocumented#SkPixelRef'>SkPixelRef</a>.
<td>holds <ahref='undocumented#SkPixelRef'>SkPixelRef</a> to fill with <ahref='SkColor_Reference#Alpha'>alpha</a><ahref='SkCanvas_Reference#Layer'>layer</a></td>
true if <ahref='SkColor_Reference#Alpha'>alpha</a><ahref='SkCanvas_Reference#Layer'>layer</a> was constructed in <ahref='#SkBitmap_extractAlpha_dst'>dst</a><ahref='undocumented#SkPixelRef'>SkPixelRef</a>
Sets <ahref='#SkBitmap_extractAlpha_2_dst'>dst</a> to <ahref='SkColor_Reference#Alpha'>alpha</a> described by pixels. Returns false if <ahref='#SkBitmap_extractAlpha_2_dst'>dst</a> cannot be written to
If <ahref='#SkBitmap_extractAlpha_2_paint'>paint</a> is not nullptr and contains <ahref='undocumented#SkMaskFilter'>SkMaskFilter</a>, <ahref='undocumented#SkMaskFilter'>SkMaskFilter</a>
generates <ahref='undocumented#Mask_Alpha'>mask alpha</a> from <ahref='SkBitmap_Reference#SkBitmap'>SkBitmap</a>. Uses <ahref='#SkBitmap_HeapAllocator'>HeapAllocator</a> to reserve memory for <ahref='#SkBitmap_extractAlpha_2_dst'>dst</a>
<ahref='undocumented#SkPixelRef'>SkPixelRef</a>. Sets <ahref='#SkBitmap_extractAlpha_2_offset'>offset</a> to top-left position for <ahref='#SkBitmap_extractAlpha_2_dst'>dst</a> for alignment with <ahref='SkBitmap_Reference#SkBitmap'>SkBitmap</a>;
<td>holds <ahref='undocumented#SkPixelRef'>SkPixelRef</a> to fill with <ahref='SkColor_Reference#Alpha'>alpha</a><ahref='SkCanvas_Reference#Layer'>layer</a></td>
true if <ahref='SkColor_Reference#Alpha'>alpha</a><ahref='SkCanvas_Reference#Layer'>layer</a> was constructed in <ahref='#SkBitmap_extractAlpha_2_dst'>dst</a><ahref='undocumented#SkPixelRef'>SkPixelRef</a>
Sets <ahref='#SkBitmap_extractAlpha_3_dst'>dst</a> to <ahref='SkColor_Reference#Alpha'>alpha</a> described by pixels. Returns false if <ahref='#SkBitmap_extractAlpha_3_dst'>dst</a> cannot be written to
If <ahref='#SkBitmap_extractAlpha_3_paint'>paint</a> is not nullptr and contains <ahref='undocumented#SkMaskFilter'>SkMaskFilter</a>, <ahref='undocumented#SkMaskFilter'>SkMaskFilter</a>
generates <ahref='undocumented#Mask_Alpha'>mask alpha</a> from <ahref='SkBitmap_Reference#SkBitmap'>SkBitmap</a>. <ahref='#SkBitmap_extractAlpha_3_allocator'>allocator</a> may reference a custom allocation
class or be set to nullptr to use <ahref='#SkBitmap_HeapAllocator'>HeapAllocator</a>. Sets <ahref='#SkBitmap_extractAlpha_3_offset'>offset</a> to top-left
position for <ahref='#SkBitmap_extractAlpha_3_dst'>dst</a> for alignment with <ahref='SkBitmap_Reference#SkBitmap'>SkBitmap</a>; (0, 0) unless <ahref='undocumented#SkMaskFilter'>SkMaskFilter</a> generates
<td>holds <ahref='undocumented#SkPixelRef'>SkPixelRef</a> to fill with <ahref='SkColor_Reference#Alpha'>alpha</a><ahref='SkCanvas_Reference#Layer'>layer</a></td>
true if <ahref='SkColor_Reference#Alpha'>alpha</a><ahref='SkCanvas_Reference#Layer'>layer</a> was constructed in <ahref='#SkBitmap_extractAlpha_3_dst'>dst</a><ahref='undocumented#SkPixelRef'>SkPixelRef</a>
Copies <ahref='SkBitmap_Reference#SkBitmap'>SkBitmap</a><ahref='undocumented#Pixel'>pixel</a> address, <ahref='#Row_Bytes'>row bytes</a>, and <ahref='SkImageInfo_Reference#SkImageInfo'>SkImageInfo</a> to <ahref='#SkBitmap_peekPixels_pixmap'>pixmap</a>, if address
is available, and returns true. If <ahref='undocumented#Pixel'>pixel</a> address is not available, return
false and leave <ahref='#SkBitmap_peekPixels_pixmap'>pixmap</a> unchanged.