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/gpu/GrSurface.cpp b/src/gpu/GrSurface.cpp
index 54497fe..52ab4fd 100644
--- a/src/gpu/GrSurface.cpp
+++ b/src/gpu/GrSurface.cpp
@@ -13,14 +13,11 @@
#include <stdio.h>
SkImageInfo GrSurface::info() const {
- SkImageInfo info;
- if (!GrPixelConfig2ColorType(this->config(), &info.fColorType)) {
+ SkColorType colorType;
+ if (!GrPixelConfig2ColorType(this->config(), &colorType)) {
sk_throw();
}
- info.fWidth = this->width();
- info.fHeight = this->height();
- info.fAlphaType = kPremul_SkAlphaType;
- return info;
+ return SkImageInfo::Make(this->width(), this->height(), colorType, kPremul_SkAlphaType);
}
bool GrSurface::savePixels(const char* filename) {