author | Matt Woodrow <mwoodrow@mozilla.com> |
Wed, 09 Jul 2014 13:53:51 +1200 | |
changeset 192921 | 25e05badc128ca6d9236ae7cfe931a1ed38d0503 |
parent 192920 | bd41dff8f47558272c1fe01a96e7596d05171a80 |
child 192922 | cc20208a6eb4d425efa9489986150fced4d96304 |
push id | 45984 |
push user | mwoodrow@mozilla.com |
push date | Wed, 09 Jul 2014 01:54:17 +0000 |
treeherder | mozilla-inbound@25e05badc128 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | Bas |
bugs | 1027107 |
milestone | 33.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
gfx/2d/Blur.cpp | file | annotate | diff | comparison | revisions |
--- a/gfx/2d/Blur.cpp +++ b/gfx/2d/Blur.cpp @@ -493,17 +493,21 @@ AlphaBoxBlur::Blur(uint8_t* aData) size.height + verticalLobes[0][0] + verticalLobes[1][1] + 1); if ((integralImageSize.width * integralImageSize.height) > (1 << 24)) { // Fallback to old blurring code when the surface is so large it may // overflow our integral image! // No need to use CheckedInt here - we have validated it in the constructor. size_t szB = stride * size.height; - uint8_t* tmpData = new uint8_t[szB]; + uint8_t* tmpData = new (std::nothrow) uint8_t[szB]; + if (!tmpData) { + return; + } + memset(tmpData, 0, szB); uint8_t* a = aData; uint8_t* b = tmpData; if (mBlurRadius.width > 0) { BoxBlurHorizontal(a, b, horizontalLobes[0][0], horizontalLobes[0][1], stride, GetSize().height, mSkipRect); BoxBlurHorizontal(b, a, horizontalLobes[1][0], horizontalLobes[1][1], stride, GetSize().height, mSkipRect); BoxBlurHorizontal(a, b, horizontalLobes[2][0], horizontalLobes[2][1], stride, GetSize().height, mSkipRect);