Commit 5cffa9e8 authored by commit-queue@webkit.org's avatar commit-queue@webkit.org
Browse files

Skia OOM error when upscaling small subsets of images by large quantities

https://bugs.webkit.org/show_bug.cgi?id=84225

Patch by Rachel Blum <groby@chromium.org> on 2012-04-17
Reviewed by David Levin.

Tested with manual tests.

* platform/graphics/skia/NativeImageSkia.cpp:
(WebCore::NativeImageSkia::shouldCacheResampling):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@114487 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent cd26db0d
2012-04-17 Rachel Blum <groby@chromium.org>
Skia OOM error when upscaling small subsets of images by large quantities
https://bugs.webkit.org/show_bug.cgi?id=84225
Reviewed by David Levin.
Tested with manual tests.
* platform/graphics/skia/NativeImageSkia.cpp:
(WebCore::NativeImageSkia::shouldCacheResampling):
2012-04-17 MORITA Hajime <morrita@google.com>
 
ShadowRoot shouldn't be adopted by any Document.
......@@ -127,6 +127,11 @@ bool NativeImageSkia::shouldCacheResampling(const SkIRect& srcSubset,
if (!isDataComplete())
return false;
// If the destination bitmap is excessively large, we'll never allow caching.
static const unsigned long long kLargeBitmapSize = 4096ULL * 4096ULL;
if ((static_cast<unsigned long long>(destWidth) * static_cast<unsigned long long>(destHeight)) > kLargeBitmapSize)
return false;
// If the destination bitmap is small, we'll always allow caching, since
// there is not very much penalty for computing it and it may come in handy.
static const int kSmallBitmapSize = 4096;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment