Index: src/effects/gradients/SkGradientShader.cpp |
diff --git a/src/effects/gradients/SkGradientShader.cpp b/src/effects/gradients/SkGradientShader.cpp |
index 9d6e856aad14fab2836e49aaf0cfa56b2d3bb851..3ac363568c5eeb6ddc9026e1b75e4d068c8bb32c 100644 |
--- a/src/effects/gradients/SkGradientShader.cpp |
+++ b/src/effects/gradients/SkGradientShader.cpp |
@@ -622,11 +622,8 @@ const SkPMColor* SkGradientShaderBase::GradientShaderCache::getCache32() { |
} |
void SkGradientShaderBase::GradientShaderCache::initCache32(GradientShaderCache* cache) { |
- SkImageInfo info; |
- info.fWidth = kCache32Count; |
- info.fHeight = 4; // for our 4 dither rows |
- info.fAlphaType = kPremul_SkAlphaType; |
- info.fColorType = kN32_SkColorType; |
+ const int kNumberOfDitherRows = 4; |
+ const SkImageInfo info = SkImageInfo::MakeN32Premul(kCache32Count, kNumberOfDitherRows); |
SkASSERT(NULL == cache->fCache32PixelRef); |
cache->fCache32PixelRef = SkMallocPixelRef::NewAllocate(info, 0, NULL); |