35 if (config ==
"nonrendering") {
38 return std::make_unique<RasterSurfaceManager>(
nullptr, config,
SkColorInfo());
43 if (config ==
"8888") {
48 return std::make_unique<RasterSurfaceManager>(
surface, config, colorInfo);
50 if (config ==
"565") {
55 return std::make_unique<RasterSurfaceManager>(
surface, config, colorInfo);
@ kPremul_SkAlphaType
pixel components are premultiplied by alpha
#define SkASSERT_RELEASE(cond)
@ kRGB_565_SkColorType
pixel with 5 bits red, 6 bits green, 5 bits blue, in 16-bit word
RasterSurfaceManager(sk_sp< SkSurface > surface, std::string config, SkColorInfo colorInfo)
sk_sp< SkSurface > getSurface() override
static sk_sp< SkColorSpace > MakeSRGB()
static std::unique_ptr< SurfaceManager > FromConfig(std::string config, SurfaceOptions surfaceOptions)
SK_API sk_sp< SkSurface > Raster(const SkImageInfo &imageInfo, size_t rowBytes, const SkSurfaceProps *surfaceProps)
static SkImageInfo Make(int width, int height, SkColorType ct, SkAlphaType at)