Skip to content
Permalink
Browse files
2010-07-16 Shinichiro Hamaji <hamaji@chromium.org>
        Unreviewed tiger build fix.

        Printing test results differ between machines, we should use ImageDiff instead
        https://bugs.webkit.org/show_bug.cgi?id=20011

        * DumpRenderTree/mac/PixelDumpSupportMac.mm:
        (createBitmapContext):
        (createBitmapContextFromWebView):

Canonical link: https://commits.webkit.org/54366@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@63526 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
Shinichiro Hamaji committed Jul 16, 2010
1 parent caeb9d0 commit c76cc25c81a7f70acfae888c65ad1d353fe62865
Showing 2 changed files with 17 additions and 4 deletions.
@@ -1,3 +1,14 @@
2010-07-16 Shinichiro Hamaji <hamaji@chromium.org>

Unreviewed tiger build fix.

Printing test results differ between machines, we should use ImageDiff instead
https://bugs.webkit.org/show_bug.cgi?id=20011

* DumpRenderTree/mac/PixelDumpSupportMac.mm:
(createBitmapContext):
(createBitmapContextFromWebView):

2010-07-15 Shinichiro Hamaji <hamaji@chromium.org>

Unreviewed build fix.
@@ -105,11 +105,11 @@ void setupMainDisplayColorProfile()
signal(SIGTERM, restoreMainDisplayColorProfile);
}

static PassRefPtr<BitmapContext> createBitmapContext(size_t pixelsWide, size_t pixelsHigh)
static PassRefPtr<BitmapContext> createBitmapContext(size_t pixelsWide, size_t pixelsHigh, size_t& rowBytes, void*& buffer)
{
size_t rowBytes = (4 * pixelsWide + 63) & ~63; // Use a multiple of 64 bytes to improve CG performance
rowBytes = (4 * pixelsWide + 63) & ~63; // Use a multiple of 64 bytes to improve CG performance

void *buffer = calloc(pixelsHigh, rowBytes);
buffer = calloc(pixelsHigh, rowBytes);
if (!buffer)
return 0;

@@ -146,7 +146,9 @@ void setupMainDisplayColorProfile()
NSSize webViewSize = [view frame].size;
size_t pixelsWide = static_cast<size_t>(webViewSize.width);
size_t pixelsHigh = static_cast<size_t>(webViewSize.height);
RefPtr<BitmapContext> bitmapContext = createBitmapContext(pixelsWide, pixelsHigh);
size_t rowBytes = 0;
void* buffer = 0;
RefPtr<BitmapContext> bitmapContext = createBitmapContext(pixelsWide, pixelsHigh, rowBytes, buffer);
if (!bitmapContext)
return 0;
CGContextRef context = bitmapContext->cgContext();

0 comments on commit c76cc25

Please sign in to comment.