Make SkGpuDevice know its alpha type
Make SkImage_Gpu snapshots opaque if surface is opaque.
BUG=skia:3965
Review URL: https://codereview.chromium.org/1205643002
diff --git a/src/gpu/GrSurface.cpp b/src/gpu/GrSurface.cpp
index c052a23..b304ccb 100644
--- a/src/gpu/GrSurface.cpp
+++ b/src/gpu/GrSurface.cpp
@@ -41,13 +41,13 @@
return false;
}
-SkImageInfo GrSurface::info() const {
+SkImageInfo GrSurface::info(SkAlphaType alphaType) const {
SkColorType colorType;
SkColorProfileType profileType;
if (!GrPixelConfig2ColorAndProfileType(this->config(), &colorType, &profileType)) {
sk_throw();
}
- return SkImageInfo::Make(this->width(), this->height(), colorType, kPremul_SkAlphaType,
+ return SkImageInfo::Make(this->width(), this->height(), colorType, alphaType,
profileType);
}