Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(266)

Unified Diff: src/gpu/GrSurface.cpp

Issue 2258463002: Cast for fuzzer complaint (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrSurface.cpp
diff --git a/src/gpu/GrSurface.cpp b/src/gpu/GrSurface.cpp
index 824a6a2936e9ebf886c0f39aace7c293d5033428..2da1f257247b81cc8adef55968aec37ea4e48ab1 100644
--- a/src/gpu/GrSurface.cpp
+++ b/src/gpu/GrSurface.cpp
@@ -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);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698