Title: [113101] trunk/Tools
- Revision
- 113101
- Author
- [email protected]
- Date
- 2012-04-03 15:58:47 -0700 (Tue, 03 Apr 2012)
Log Message
Fix large leak in WebKitTestRunner
https://bugs.webkit.org/show_bug.cgi?id=83084
Reviewed by Beth Dakin.
Fix a leak of the bimap backing store created when doing pixel and
ref tests. This leak was causing serious thrash on the test bots.
We don't need to allocate memory for CGBitmapContextCreate(); if we
pass NULL, it will allocate and manage its own backing store.
* WebKitTestRunner/cg/TestInvocationCG.cpp:
(WTR::createCGContextFromImage):
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (113100 => 113101)
--- trunk/Tools/ChangeLog 2012-04-03 22:54:07 UTC (rev 113100)
+++ trunk/Tools/ChangeLog 2012-04-03 22:58:47 UTC (rev 113101)
@@ -1,3 +1,19 @@
+2012-04-03 Simon Fraser <[email protected]>
+
+ Fix large leak in WebKitTestRunner
+ https://bugs.webkit.org/show_bug.cgi?id=83084
+
+ Reviewed by Beth Dakin.
+
+ Fix a leak of the bimap backing store created when doing pixel and
+ ref tests. This leak was causing serious thrash on the test bots.
+
+ We don't need to allocate memory for CGBitmapContextCreate(); if we
+ pass NULL, it will allocate and manage its own backing store.
+
+ * WebKitTestRunner/cg/TestInvocationCG.cpp:
+ (WTR::createCGContextFromImage):
+
2012-04-03 Ryosuke Niwa <[email protected]>
Another build fix after r113067. Close the zipfile after extracting all files so that we can remove it.
Modified: trunk/Tools/WebKitTestRunner/cg/TestInvocationCG.cpp (113100 => 113101)
--- trunk/Tools/WebKitTestRunner/cg/TestInvocationCG.cpp 2012-04-03 22:54:07 UTC (rev 113100)
+++ trunk/Tools/WebKitTestRunner/cg/TestInvocationCG.cpp 2012-04-03 22:58:47 UTC (rev 113101)
@@ -57,11 +57,10 @@
size_t pixelsWide = CGImageGetWidth(image.get());
size_t pixelsHigh = CGImageGetHeight(image.get());
size_t rowBytes = (4 * pixelsWide + 63) & ~63;
- void* buffer = calloc(pixelsHigh, rowBytes);
// Creating this bitmap in the device color space should prevent any color conversion when the image of the web view is drawn into it.
RetainPtr<CGColorSpaceRef> colorSpace(AdoptCF, CGColorSpaceCreateDeviceRGB());
- CGContextRef context = CGBitmapContextCreate(buffer, pixelsWide, pixelsHigh, 8, rowBytes, colorSpace.get(), kCGImageAlphaPremultipliedFirst | kCGBitmapByteOrder32Host);
+ CGContextRef context = CGBitmapContextCreate(0, pixelsWide, pixelsHigh, 8, rowBytes, colorSpace.get(), kCGImageAlphaPremultipliedFirst | kCGBitmapByteOrder32Host);
if (flip == FlipGraphicsContext) {
CGContextSaveGState(context);
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes