Changeset 173297 in webkit
- Timestamp:
- Sep 4, 2014, 5:55:10 PM (11 years ago)
- Location:
- trunk/Tools
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r173296 r173297 1 2014-09-04 Simon Fraser <simon.fraser@apple.com> 2 3 Add some logging to help diagnose assertions in dumpWebViewAsPixelsAndCompareWithExpected() on bots 4 https://bugs.webkit.org/show_bug.cgi?id=136561 5 6 Reviewed by Tim Horton. 7 8 Log for calloc() and CGBitmapContextCreate() failures. 9 10 * DumpRenderTree/mac/PixelDumpSupportMac.mm: 11 (createBitmapContext): 12 (createBitmapContextFromWebView): 13 1 14 2014-09-04 Andy Estes <aestes@apple.com> 2 15 -
trunk/Tools/DumpRenderTree/mac/PixelDumpSupportMac.mm
r167691 r173297 55 55 56 56 buffer = calloc(pixelsHigh, rowBytes); 57 if (!buffer) 58 return 0; 57 if (!buffer) { 58 WTFLogAlways("DumpRenderTree: calloc(%llu, %llu) failed\n", pixelsHigh, rowBytes); 59 return nullptr; 60 } 59 61 60 62 // Creating this bitmap in the device color space prevents any color conversion when the image of the web view is drawn into it. … … 63 65 if (!context) { 64 66 free(buffer); 65 return 0; 67 WTFLogAlways("DumpRenderTree: CGBitmapContextCreate(%p, %llu, %llu, 8, %llu, %p, 0x%x) failed\n", buffer, pixelsHigh, pixelsWide, rowBytes, colorSpace.get(), kCGImageAlphaPremultipliedFirst | kCGBitmapByteOrder32Host); 68 return nullptr; 66 69 } 67 70 … … 116 119 size_t pixelsHigh = static_cast<size_t>(webViewSize.height * deviceScaleFactor); 117 120 size_t rowBytes = 0; 118 void* buffer = 0;121 void* buffer = nullptr; 119 122 RefPtr<BitmapContext> bitmapContext = createBitmapContext(pixelsWide, pixelsHigh, rowBytes, buffer); 120 123 if (!bitmapContext) 121 return 0;124 return nullptr; 122 125 CGContextRef context = bitmapContext->cgContext(); 123 126 // The final scaling gets doubled on the screen capture surface when we use the hidpi backingScaleFactor value for CTM.
Note:
See TracChangeset
for help on using the changeset viewer.