Hide fields in SkImageInfo

R=rmistry@google.com
TBR=bsalomon

Author: reed@google.com

Review URL: https://codereview.chromium.org/536003002
diff --git a/src/image/SkImage_Raster.cpp b/src/image/SkImage_Raster.cpp
index a7e4e00..f1d1fcd 100644
--- a/src/image/SkImage_Raster.cpp
+++ b/src/image/SkImage_Raster.cpp
@@ -19,16 +19,16 @@
         const int maxDimension = SK_MaxS32 >> 2;
         const size_t kMaxPixelByteSize = SK_MaxS32;
 
-        if (info.fWidth < 0 || info.fHeight < 0) {
+        if (info.width() < 0 || info.height() < 0) {
             return false;
         }
-        if (info.fWidth > maxDimension || info.fHeight > maxDimension) {
+        if (info.width() > maxDimension || info.height() > maxDimension) {
             return false;
         }
-        if ((unsigned)info.fColorType > (unsigned)kLastEnum_SkColorType) {
+        if ((unsigned)info.colorType() > (unsigned)kLastEnum_SkColorType) {
             return false;
         }
-        if ((unsigned)info.fAlphaType > (unsigned)kLastEnum_SkAlphaType) {
+        if ((unsigned)info.alphaType() > (unsigned)kLastEnum_SkAlphaType) {
             return false;
         }
 
@@ -42,7 +42,7 @@
             return false;
         }
 
-        int64_t size = (int64_t)info.fHeight * rowBytes;
+        int64_t size = (int64_t)info.height() * rowBytes;
         if (size > (int64_t)kMaxPixelByteSize) {
             return false;
         }
@@ -102,7 +102,7 @@
 }
 
 SkImage_Raster::SkImage_Raster(const Info& info, SkData* data, size_t rowBytes)
-    : INHERITED(info.fWidth, info.fHeight)
+    : INHERITED(info.width(), info.height())
 {
     data->ref();
     void* addr = const_cast<void*>(data->data());
@@ -114,7 +114,7 @@
 }
 
 SkImage_Raster::SkImage_Raster(const Info& info, SkPixelRef* pr, size_t rowBytes)
-    : INHERITED(info.fWidth, info.fHeight)
+    : INHERITED(info.width(), info.height())
 {
     fBitmap.setInfo(info, rowBytes);
     fBitmap.setPixelRef(pr);
@@ -170,7 +170,7 @@
     if (!SkImage_Raster::ValidArgs(info, rowBytes)) {
         return NULL;
     }
-    if (0 == info.fWidth && 0 == info.fHeight) {
+    if (0 == info.width() && 0 == info.height()) {
         return SkImage_Raster::NewEmpty();
     }
     // check this after empty-check
@@ -179,7 +179,7 @@
     }
 
     // Here we actually make a copy of the caller's pixel data
-    SkAutoDataUnref data(SkData::NewWithCopy(pixels, info.fHeight * rowBytes));
+    SkAutoDataUnref data(SkData::NewWithCopy(pixels, info.height() * rowBytes));
     return SkNEW_ARGS(SkImage_Raster, (info, data, rowBytes));
 }
 
@@ -188,7 +188,7 @@
     if (!SkImage_Raster::ValidArgs(info, rowBytes)) {
         return NULL;
     }
-    if (0 == info.fWidth && 0 == info.fHeight) {
+    if (0 == info.width() && 0 == info.height()) {
         return SkImage_Raster::NewEmpty();
     }
     // check this after empty-check
@@ -197,7 +197,7 @@
     }
 
     // did they give us enough data?
-    size_t size = info.fHeight * rowBytes;
+    size_t size = info.height() * rowBytes;
     if (data->size() < size) {
         return NULL;
     }