Cast for fuzzer complaint

Given the cast in the following else block, this isn't the first time we've encountered this.

BUG=637187
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2258463002

Review-Url: https://codereview.chromium.org/2258463002
This commit is contained in:
robertphillips 2016-08-17 08:02:51 -07:00 committed by Commit bot
parent 6c177a1a49
commit 4c56b9fa71

View File

@ -29,7 +29,8 @@ size_t GrSurface::WorseCaseSize(const GrSurfaceDesc& desc) {
SkASSERT(!GrPixelConfigIsCompressed(desc.fConfig));
size_t colorBytes = GrBytesPerPixel(desc.fConfig);
SkASSERT(colorBytes > 0);
size = colorValuesPerPixel * desc.fWidth * desc.fHeight * colorBytes;
size = (size_t) colorValuesPerPixel * desc.fWidth * desc.fHeight * colorBytes;
} else {
if (GrPixelConfigIsCompressed(desc.fConfig)) {
size = GrCompressedFormatDataSize(desc.fConfig, desc.fWidth, desc.fHeight);