Use factories instead of directly creating SkImageInfo.
R=reed@google.com Review URL: https://codereview.chromium.org/169363007 git-svn-id: http://skia.googlecode.com/svn/trunk@13480 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
parent
87001ed1f6
commit
2c56cb858f
@ -52,10 +52,7 @@ public:
|
||||
* 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));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -692,12 +692,7 @@ static PixelPtr getSurfacePixelPtr(SkSurface* surface, bool useGpu) {
|
||||
}
|
||||
|
||||
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
|
||||
@ -763,12 +758,7 @@ static void TestDeferredCanvasSurface(skiatest::Reporter* reporter, GrContextFac
|
||||
}
|
||||
|
||||
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;
|
||||
|
Loading…
Reference in New Issue
Block a user