* pixels in SkPMColor format.
*/
static SkSurface* NewRasterPMColor(int width, int height) {
- SkImageInfo info = {
- width, height, kPMColor_SkColorType, kPremul_SkAlphaType
- };
- return NewRaster(info);
+ return NewRaster(SkImageInfo::MakeN32Premul(width, height));
}
/**
}
static void TestDeferredCanvasSurface(skiatest::Reporter* reporter, GrContextFactory* factory) {
- SkImageInfo imageSpec = {
- 10, // width
- 10, // height
- kPMColor_SkColorType,
- kPremul_SkAlphaType
- };
+ SkImageInfo imageSpec = SkImageInfo::MakeN32Premul(10, 10);
SkSurface* surface;
bool useGpu = NULL != factory;
#if SK_SUPPORT_GPU
}
static void TestDeferredCanvasSetSurface(skiatest::Reporter* reporter, GrContextFactory* factory) {
- SkImageInfo imageSpec = {
- 10, // width
- 10, // height
- kPMColor_SkColorType,
- kPremul_SkAlphaType
- };
+ SkImageInfo imageSpec = SkImageInfo::MakeN32Premul(10, 10);
SkSurface* surface;
SkSurface* alternateSurface;
bool useGpu = NULL != factory;