diff options
author | 2014-09-03 11:54:58 -0700 | |
---|---|---|
committer | 2014-09-03 11:54:58 -0700 | |
commit | e5ea500d4714a7d84de2bf913e81be3b65d2de68 (patch) | |
tree | 0c94feeb709b17b954f5e97fad463ec9cfc4dc18 /src/gpu/GrSurface.cpp | |
parent | 42b0dfeb29e993b7fd247dcecff705d3dd4cf191 (diff) |
Hide fields in SkImageInfo
R=rmistry@google.com
TBR=bsalomon
Author: reed@google.com
Review URL: https://codereview.chromium.org/536003002
Diffstat (limited to 'src/gpu/GrSurface.cpp')
-rw-r--r-- | src/gpu/GrSurface.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/gpu/GrSurface.cpp b/src/gpu/GrSurface.cpp index 54497fe8c8..52ab4fd11d 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) { |