Title: [114487] trunk/Source/WebCore
- Revision
- 114487
- Author
- [email protected]
- Date
- 2012-04-17 23:36:30 -0700 (Tue, 17 Apr 2012)
Log Message
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 <[email protected]> on 2012-04-17
Reviewed by David Levin.
Tested with manual tests.
* platform/graphics/skia/NativeImageSkia.cpp:
(WebCore::NativeImageSkia::shouldCacheResampling):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (114486 => 114487)
--- trunk/Source/WebCore/ChangeLog 2012-04-18 05:54:26 UTC (rev 114486)
+++ trunk/Source/WebCore/ChangeLog 2012-04-18 06:36:30 UTC (rev 114487)
@@ -1,3 +1,15 @@
+2012-04-17 Rachel Blum <[email protected]>
+
+ 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 <[email protected]>
ShadowRoot shouldn't be adopted by any Document.
Modified: trunk/Source/WebCore/platform/graphics/skia/NativeImageSkia.cpp (114486 => 114487)
--- trunk/Source/WebCore/platform/graphics/skia/NativeImageSkia.cpp 2012-04-18 05:54:26 UTC (rev 114486)
+++ trunk/Source/WebCore/platform/graphics/skia/NativeImageSkia.cpp 2012-04-18 06:36:30 UTC (rev 114487)
@@ -127,6 +127,11 @@
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;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes