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:
parent
6c177a1a49
commit
4c56b9fa71
@ -29,7 +29,8 @@ size_t GrSurface::WorseCaseSize(const GrSurfaceDesc& desc) {
|
|||||||
SkASSERT(!GrPixelConfigIsCompressed(desc.fConfig));
|
SkASSERT(!GrPixelConfigIsCompressed(desc.fConfig));
|
||||||
size_t colorBytes = GrBytesPerPixel(desc.fConfig);
|
size_t colorBytes = GrBytesPerPixel(desc.fConfig);
|
||||||
SkASSERT(colorBytes > 0);
|
SkASSERT(colorBytes > 0);
|
||||||
size = colorValuesPerPixel * desc.fWidth * desc.fHeight * colorBytes;
|
|
||||||
|
size = (size_t) colorValuesPerPixel * desc.fWidth * desc.fHeight * colorBytes;
|
||||||
} else {
|
} else {
|
||||||
if (GrPixelConfigIsCompressed(desc.fConfig)) {
|
if (GrPixelConfigIsCompressed(desc.fConfig)) {
|
||||||
size = GrCompressedFormatDataSize(desc.fConfig, desc.fWidth, desc.fHeight);
|
size = GrCompressedFormatDataSize(desc.fConfig, desc.fWidth, desc.fHeight);
|
||||||
|
Loading…
Reference in New Issue
Block a user