Flutter Engine
The Flutter Engine
|
#include "include/core/SkImage.h"
#include "include/core/SkSurface.h"
#include "include/core/SkTileMode.h"
Go to the source code of this file.
Enumerations | |
enum | SkCopyPixelsMode { kIfMutable_SkCopyPixelsMode , kAlways_SkCopyPixelsMode , kNever_SkCopyPixelsMode } |
Functions | |
sk_sp< SkShader > | SkMakeBitmapShaderForPaint (const SkPaint &paint, const SkBitmap &src, SkTileMode, SkTileMode, const SkSamplingOptions &, const SkMatrix *localMatrix, SkCopyPixelsMode) |
SkRect | SkModifyPaintAndDstForDrawImageRect (const SkImage *image, const SkSamplingOptions &, SkRect src, SkRect dst, bool strictSrcSubset, SkPaint *paint) |
SK_SPI sk_sp< SkImage > | SkMakeImageFromRasterBitmap (const SkBitmap &, SkCopyPixelsMode) |
const SkPixelRef * | SkBitmapImageGetPixelRef (const SkImage *rasterImage) |
enum SkCopyPixelsMode |
Definition at line 17 of file SkImagePriv.h.
const SkPixelRef * SkBitmapImageGetPixelRef | ( | const SkImage * | rasterImage | ) |
Definition at line 190 of file SkImage_Raster.cpp.
sk_sp< SkShader > SkMakeBitmapShaderForPaint | ( | const SkPaint & | paint, |
const SkBitmap & | src, | ||
SkTileMode | tmx, | ||
SkTileMode | tmy, | ||
const SkSamplingOptions & | sampling, | ||
const SkMatrix * | localMatrix, | ||
SkCopyPixelsMode | mode | ||
) |
Definition at line 358 of file SkImageShader.cpp.
SK_SPI sk_sp< SkImage > SkMakeImageFromRasterBitmap | ( | const SkBitmap & | bm, |
SkCopyPixelsMode | cpm | ||
) |
Examines the bitmap to decide if it can share the existing pixelRef, or if it needs to make a deep-copy of the pixels.
The bitmap's pixelref will be shared if either the bitmap is marked as immutable, or CopyPixelsMode allows it. Shared pixel refs are also locked when kLocked_SharedPixelRefMode is specified.
Passing kLocked_SharedPixelRefMode allows the image's peekPixels() method to succeed, but it will force any lazy decodes/generators to execute if they exist on the pixelref.
It is illegal to call this with a texture-backed bitmap.
If the bitmap's colortype cannot be converted into a corresponding SkImageInfo, or the bitmap's pixels cannot be accessed, this will return nullptr.
Definition at line 182 of file SkImage_Raster.cpp.
SkRect SkModifyPaintAndDstForDrawImageRect | ( | const SkImage * | image, |
const SkSamplingOptions & | sampling, | ||
SkRect | src, | ||
SkRect | dst, | ||
bool | strictSrcSubset, | ||
SkPaint * | paint | ||
) |
Definition at line 376 of file SkImageShader.cpp.