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
diff --git a/include/core/SkSurface.h b/include/core/SkSurface.h
index 74c5f08..8e430d8 100644
--- a/include/core/SkSurface.h
+++ b/include/core/SkSurface.h
@@ -52,10 +52,7 @@
      *  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));
     }
 
     /**
diff --git a/tests/DeferredCanvasTest.cpp b/tests/DeferredCanvasTest.cpp
index 4b67f19..62b1b17 100644
--- a/tests/DeferredCanvasTest.cpp
+++ b/tests/DeferredCanvasTest.cpp
@@ -692,12 +692,7 @@
 }
 
 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 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;