35 if (
src.width() <= 0 ||
src.height() <= 0 ||
36 dst.width() <= 0 ||
dst.height() <= 0) {
41 if (
src.width() ==
dst.width() &&
src.height() ==
dst.height()) {
42 return src.readPixels(
dst);
49 bool clampAsIfUnpremul =
false;
57 clampAsIfUnpremul =
true;
83 paint.setShader(std::move(shader));
@ kOpaque_SkAlphaType
pixel is opaque
@ kPremul_SkAlphaType
pixel components are premultiplied by alpha
static sk_sp< SkShader > Make(sk_sp< SkImage >, SkTileMode tmx, SkTileMode tmy, const SkSamplingOptions &, const SkMatrix *localMatrix, bool clampAsIfUnpremul=false)
static SkMatrix RectToRect(const SkRect &src, const SkRect &dst, ScaleToFit mode=kFill_ScaleToFit)
bool scalePixels(const SkPixmap &dst, const SkSamplingOptions &) const
SkSamplingOptions sampling
SK_API sk_sp< SkSurface > WrapPixels(const SkImageInfo &imageInfo, void *pixels, size_t rowBytes, const SkSurfaceProps *surfaceProps=nullptr)
static SkRect Make(const SkISize &size)