summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-24 20:02:45 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-24 20:02:45 +0000
commit9c16251546f278a3b804dd2034f29234f6354a09 (patch)
treeb32be9bef26e977e7ea71a1588c7e48bb0111bb2
parent82ca61ab87d2b421abaf90fe3853765cc3a19b88 (diff)
downloadchromium_src-9c16251546f278a3b804dd2034f29234f6354a09.zip
chromium_src-9c16251546f278a3b804dd2034f29234f6354a09.tar.gz
chromium_src-9c16251546f278a3b804dd2034f29234f6354a09.tar.bz2
Fix compile error on gcc.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14456 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--skia/sgl/SkMask.cpp15
1 files changed, 13 insertions, 2 deletions
diff --git a/skia/sgl/SkMask.cpp b/skia/sgl/SkMask.cpp
index 7ec06be..1a03b16 100644
--- a/skia/sgl/SkMask.cpp
+++ b/skia/sgl/SkMask.cpp
@@ -24,8 +24,13 @@ size_t SkMask::computeImageSize() const
// Prevent too large a number. There is a better fix for this in Skia
// trunk where it returns failure.
long long size = (long long)fBounds.height() * (long long)fRowBytes;
- if (size >= std::numeric_limits<size_t>::max() / 2)
+ if (size >= std::numeric_limits<size_t>::max() / 2) {
+#ifdef WIN32
__debugbreak();
+#else
+ abort();
+#endif
+ }
return size;
}
@@ -36,8 +41,14 @@ size_t SkMask::computeTotalImageSize() const
if (fFormat == SkMask::k3D_Format) {
// See computeImageSize for why we want to stop here.
- if (size > std::numeric_limits<size_t>::max() / 3)
+ if (size > std::numeric_limits<size_t>::max() / 3) {
+#ifdef WIN32
__debugbreak();
+#else
+ abort();
+#endif
+ }
+
size *= 3;
}
return size;