Fix Bug 16133: Implement pixel test support on Windows
authoraroben@apple.com <aroben@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 26 Nov 2007 00:03:42 +0000 (00:03 +0000)
committeraroben@apple.com <aroben@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 26 Nov 2007 00:03:42 +0000 (00:03 +0000)
 WebKit/win:

         Add ImageDiff.vcproj to WebKit.sln

         Reviewed by Sam.

         * WebKit.vcproj/WebKit.sln:

 WebKitTools:

         Port ImageDiff to CG and C++

         Final part of http://bugs.webkit.org/show_bug.cgi?id=16133
         <rdar://5071708>

         Reviewed by Sam.

         * DumpRenderTree/DumpRenderTree.sln: Added ImageDiff.vcproj.
         * DumpRenderTree/cg/ImageDiffCG.cpp: Added.
         (main):
         (createImageFromStdin):
         (compareImages):
         (getDifferenceBitmap):
         (computePercentageDifferent):
         * DumpRenderTree/win/ImageDiff.vcproj: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@28023 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebKit/win/ChangeLog
WebKit/win/WebKit.vcproj/WebKit.sln
WebKitTools/ChangeLog
WebKitTools/DumpRenderTree/DumpRenderTree.sln
WebKitTools/DumpRenderTree/cg/ImageDiffCG.cpp [new file with mode: 0644]
WebKitTools/DumpRenderTree/win/ImageDiff.vcproj [new file with mode: 0644]

index b090883..41c7f22 100644 (file)
@@ -1,3 +1,11 @@
+2007-11-25  Adam Roben  <aroben@apple.com>
+
+        Add ImageDiff.vcproj to WebKit.sln
+
+        Reviewed by Sam.
+
+        * WebKit.vcproj/WebKit.sln:
+
 2007-11-17  Timothy Hatcher  <timothy@apple.com>
 
         Reviewed by Mark Rowe.
index 918d6cd..f193e99 100644 (file)
@@ -3,11 +3,11 @@ Microsoft Visual Studio Solution File, Format Version 9.00
 # Visual Studio 2005\r
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WebKit", "WebKit.vcproj", "{0662A8A9-82A3-4638-97D8-EC425D8D87C9}"\r
        ProjectSection(ProjectDependencies) = postProject\r
-               {011D10F1-B656-4A1B-A0C3-3842F02122C5} = {011D10F1-B656-4A1B-A0C3-3842F02122C5}\r
-               {91762BE2-87EF-4F5A-A480-48B90EB3F406} = {91762BE2-87EF-4F5A-A480-48B90EB3F406}\r
-               {1C16337B-ACF3-4D03-AA90-851C5B5EADA6} = {1C16337B-ACF3-4D03-AA90-851C5B5EADA6}\r
-               {B8437A41-67BC-4769-9452-45203827F821} = {B8437A41-67BC-4769-9452-45203827F821}\r
                {AA8A5A85-592B-4357-BC60-E0E91E026AF6} = {AA8A5A85-592B-4357-BC60-E0E91E026AF6}\r
+               {B8437A41-67BC-4769-9452-45203827F821} = {B8437A41-67BC-4769-9452-45203827F821}\r
+               {1C16337B-ACF3-4D03-AA90-851C5B5EADA6} = {1C16337B-ACF3-4D03-AA90-851C5B5EADA6}\r
+               {91762BE2-87EF-4F5A-A480-48B90EB3F406} = {91762BE2-87EF-4F5A-A480-48B90EB3F406}\r
+               {011D10F1-B656-4A1B-A0C3-3842F02122C5} = {011D10F1-B656-4A1B-A0C3-3842F02122C5}\r
        EndProjectSection\r
 EndProject\r
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WebKitGUID", "WebKitGUID.vcproj", "{B8437A41-67BC-4769-9452-45203827F821}"\r
@@ -42,8 +42,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "JavaScriptCore", "..\..\..\
 EndProject\r
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testkjs", "..\..\..\JavaScriptCore\JavaScriptCore.vcproj\testkjs\testkjs.vcproj", "{C59E5129-B453-49B7-A52B-1E104715F76E}"\r
        ProjectSection(ProjectDependencies) = postProject\r
-               {011D10F1-B656-4A1B-A0C3-3842F02122C5} = {011D10F1-B656-4A1B-A0C3-3842F02122C5}\r
                {AA8A5A85-592B-4357-BC60-E0E91E026AF6} = {AA8A5A85-592B-4357-BC60-E0E91E026AF6}\r
+               {011D10F1-B656-4A1B-A0C3-3842F02122C5} = {011D10F1-B656-4A1B-A0C3-3842F02122C5}\r
        EndProjectSection\r
 EndProject\r
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dftables", "..\..\..\JavaScriptCore\JavaScriptCore.vcproj\dftables\dftables.vcproj", "{BC2981C0-67A5-4A3C-879B-784BCBDE2541}"\r
@@ -52,6 +52,13 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WTF", "..\..\..\JavaScriptC
 EndProject\r
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FindSafari", "..\..\..\WebKitTools\FindSafari\FindSafari.vcproj", "{DA31DA52-6675-48D4-89E0-333A7144397C}"\r
 EndProject\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ImageDiff", "..\..\..\WebKitTools\DumpRenderTree\win\ImageDiff.vcproj", "{59CC0547-70AC-499C-9B19-EC01C6F61137}"\r
+       ProjectSection(ProjectDependencies) = postProject\r
+               {1C16337B-ACF3-4D03-AA90-851C5B5EADA6} = {1C16337B-ACF3-4D03-AA90-851C5B5EADA6}\r
+               {AA8A5A85-592B-4357-BC60-E0E91E026AF6} = {AA8A5A85-592B-4357-BC60-E0E91E026AF6}\r
+               {011D10F1-B656-4A1B-A0C3-3842F02122C5} = {011D10F1-B656-4A1B-A0C3-3842F02122C5}\r
+       EndProjectSection\r
+EndProject\r
 Global\r
        GlobalSection(SolutionConfigurationPlatforms) = preSolution\r
                Debug|Win32 = Debug|Win32\r
@@ -102,6 +109,10 @@ Global
                {DA31DA52-6675-48D4-89E0-333A7144397C}.Debug|Win32.Build.0 = Debug|Win32\r
                {DA31DA52-6675-48D4-89E0-333A7144397C}.Release|Win32.ActiveCfg = Release|Win32\r
                {DA31DA52-6675-48D4-89E0-333A7144397C}.Release|Win32.Build.0 = Release|Win32\r
+               {59CC0547-70AC-499C-9B19-EC01C6F61137}.Debug|Win32.ActiveCfg = Debug|Win32\r
+               {59CC0547-70AC-499C-9B19-EC01C6F61137}.Debug|Win32.Build.0 = Debug|Win32\r
+               {59CC0547-70AC-499C-9B19-EC01C6F61137}.Release|Win32.ActiveCfg = Release|Win32\r
+               {59CC0547-70AC-499C-9B19-EC01C6F61137}.Release|Win32.Build.0 = Release|Win32\r
        EndGlobalSection\r
        GlobalSection(SolutionProperties) = preSolution\r
                HideSolutionNode = FALSE\r
index 6927c68..c2c7523 100644 (file)
@@ -1,5 +1,23 @@
 2007-11-25  Adam Roben  <aroben@apple.com>
 
+        Port ImageDiff to CG and C++
+
+        Final part of http://bugs.webkit.org/show_bug.cgi?id=16133
+        <rdar://5071708>
+
+        Reviewed by Sam.
+
+        * DumpRenderTree/DumpRenderTree.sln: Added ImageDiff.vcproj.
+        * DumpRenderTree/cg/ImageDiffCG.cpp: Added.
+        (main):
+        (createImageFromStdin):
+        (compareImages):
+        (getDifferenceBitmap):
+        (computePercentageDifferent):
+        * DumpRenderTree/win/ImageDiff.vcproj: Added.
+
+2007-11-25  Adam Roben  <aroben@apple.com>
+
         Fix image diff link generation on Windows
 
         Reviewed by Sam.
index eba49af..9a90868 100644 (file)
@@ -7,6 +7,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestNetscapePlugin", "win\T
 EndProject\r
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FindSafari", "..\FindSafari\FindSafari.vcproj", "{DA31DA52-6675-48D4-89E0-333A7144397C}"\r
 EndProject\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ImageDiff", "win\ImageDiff.vcproj", "{59CC0547-70AC-499C-9B19-EC01C6F61137}"\r
+EndProject\r
 Global\r
        GlobalSection(SolutionConfigurationPlatforms) = preSolution\r
                Debug_Internal|Win32 = Debug_Internal|Win32\r
@@ -32,6 +34,12 @@ Global
                {DA31DA52-6675-48D4-89E0-333A7144397C}.Debug|Win32.Build.0 = Debug|Win32\r
                {DA31DA52-6675-48D4-89E0-333A7144397C}.Release|Win32.ActiveCfg = Release|Win32\r
                {DA31DA52-6675-48D4-89E0-333A7144397C}.Release|Win32.Build.0 = Release|Win32\r
+               {59CC0547-70AC-499C-9B19-EC01C6F61137}.Debug_Internal|Win32.ActiveCfg = Debug|Win32\r
+               {59CC0547-70AC-499C-9B19-EC01C6F61137}.Debug_Internal|Win32.Build.0 = Debug|Win32\r
+               {59CC0547-70AC-499C-9B19-EC01C6F61137}.Debug|Win32.ActiveCfg = Debug|Win32\r
+               {59CC0547-70AC-499C-9B19-EC01C6F61137}.Debug|Win32.Build.0 = Debug|Win32\r
+               {59CC0547-70AC-499C-9B19-EC01C6F61137}.Release|Win32.ActiveCfg = Release|Win32\r
+               {59CC0547-70AC-499C-9B19-EC01C6F61137}.Release|Win32.Build.0 = Release|Win32\r
        EndGlobalSection\r
        GlobalSection(SolutionProperties) = preSolution\r
                HideSolutionNode = FALSE\r
diff --git a/WebKitTools/DumpRenderTree/cg/ImageDiffCG.cpp b/WebKitTools/DumpRenderTree/cg/ImageDiffCG.cpp
new file mode 100644 (file)
index 0000000..e1892ed
--- /dev/null
@@ -0,0 +1,192 @@
+/*
+ * Copyright (C) 2005, 2007 Apple Inc. All rights reserved.
+ * Copyright (C) 2005 Ben La Monica <ben.lamonica@gmail.com>.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#define min min
+
+#include <CoreGraphics/CGBitmapContext.h>
+#include <CoreGraphics/CGImage.h>
+#include <ImageIO/CGImageDestination.h>
+#include <stdio.h>
+#include <wtf/Platform.h>
+#include <wtf/RetainPtr.h>
+
+#if PLATFORM(WIN)
+#include <fcntl.h>
+#include <io.h>
+#endif
+
+using namespace std;
+
+static const CFStringRef kUTTypePNG = CFSTR("public.png");
+
+static RetainPtr<CGImageRef> createImageFromStdin(int bytesRemaining)
+{
+    unsigned char buffer[2048];
+    RetainPtr<CFMutableDataRef> data(AdoptCF, CFDataCreateMutable(0, bytesRemaining));
+
+    while (bytesRemaining > 0) {
+        size_t bytesToRead = min(bytesRemaining, 2048);
+        size_t bytesRead = fread(buffer, 1, bytesToRead, stdin);
+        CFDataAppendBytes(data.get(), buffer, static_cast<CFIndex>(bytesRead));
+        bytesRemaining -= static_cast<int>(bytesRead);
+    }
+    RetainPtr<CGDataProviderRef> dataProvider(AdoptCF, CGDataProviderCreateWithCFData(data.get()));
+    return RetainPtr<CGImageRef>(AdoptCF, CGImageCreateWithPNGDataProvider(dataProvider.get(), 0, false, kCGRenderingIntentDefault));
+}
+
+static RetainPtr<CGContextRef> getDifferenceBitmap(CGImageRef testBitmap, CGImageRef referenceBitmap)
+{
+    // we must have both images to take diff
+    if (!testBitmap || !referenceBitmap)
+        return 0;
+
+    RetainPtr<CGColorSpaceRef> colorSpace(AdoptCF, CGColorSpaceCreateDeviceRGB());
+    unsigned char* data = new unsigned char[CGImageGetHeight(testBitmap) * CGImageGetBytesPerRow(testBitmap)];
+    RetainPtr<CGContextRef> context(AdoptCF, CGBitmapContextCreate(data, CGImageGetWidth(testBitmap), CGImageGetHeight(testBitmap),
+        CGImageGetBitsPerComponent(testBitmap), CGImageGetBytesPerRow(testBitmap), colorSpace.get(), kCGBitmapByteOrder32Little | kCGImageAlphaPremultipliedFirst));
+
+    CGContextSetBlendMode(context.get(), kCGBlendModeNormal);
+    CGContextDrawImage(context.get(), CGRectMake(0, 0, static_cast<CGFloat>(CGImageGetWidth(testBitmap)), static_cast<CGFloat>(CGImageGetHeight(testBitmap))), testBitmap);
+    CGContextSetBlendMode(context.get(), kCGBlendModeDifference);
+    CGContextDrawImage(context.get(), CGRectMake(0, 0, static_cast<CGFloat>(CGImageGetWidth(referenceBitmap)), static_cast<CGFloat>(CGImageGetHeight(referenceBitmap))), referenceBitmap);
+
+    return context;
+}
+
+/**
+ * Counts the number of non-black pixels, and returns the percentage
+ * of non-black pixels to total pixels in the image.
+ */
+static float computePercentageDifferent(CGContextRef diffBitmap, unsigned threshold)
+{
+    // if diffBiatmap is nil, then there was an error, and it didn't match.
+    if (!diffBitmap)
+        return 100.0f;
+
+    size_t pixelsHigh = CGBitmapContextGetHeight(diffBitmap);
+    size_t pixelsWide = CGBitmapContextGetWidth(diffBitmap);
+    size_t bytesPerRow = CGBitmapContextGetBytesPerRow(diffBitmap);
+    unsigned char* pixelRowData = static_cast<unsigned char*>(CGBitmapContextGetData(diffBitmap));
+    unsigned differences = 0;
+
+    // NOTE: This may not be safe when switching between ENDIAN types
+    for (unsigned row = 0; row < pixelsHigh; row++) {
+        for (unsigned col = 0; col < (pixelsWide * 4); col += 4) {
+            unsigned char* red = pixelRowData + col;
+            unsigned char* green = red + 1;
+            unsigned char* blue = red + 2;
+            unsigned distance = *red + *green + *blue;
+            if (distance > threshold) {
+                differences++;
+                // shift the pixels towards white to make them more visible
+                *red = static_cast<unsigned char>(min(UCHAR_MAX, *red + 100));
+                *green = static_cast<unsigned char>(min(UCHAR_MAX, *green + 100));
+                *blue = static_cast<unsigned char>(min(UCHAR_MAX, *blue + 100));
+            }
+        }
+        pixelRowData += bytesPerRow;
+    }
+
+    float totalPixels = static_cast<float>(pixelsHigh * pixelsWide);
+    return (differences * 100.f) / totalPixels;
+}
+
+static void compareImages(CGImageRef actualBitmap, CGImageRef baselineBitmap, unsigned threshold)
+{
+    // prepare the difference blend to check for pixel variations
+    RetainPtr<CGContextRef> diffBitmap = getDifferenceBitmap(actualBitmap, baselineBitmap);
+
+    float percentage = computePercentageDifferent(diffBitmap.get(), threshold);
+
+    percentage = (float)((int)(percentage * 100.0f)) / 100.0f; // round to 2 decimal places
+
+    // send message to let them know if an image was wrong
+    if (percentage > 0.0f) {
+        // since the diff might actually show something, send it to stdout
+        RetainPtr<CGImageRef> image(AdoptCF, CGBitmapContextCreateImage(diffBitmap.get()));
+        RetainPtr<CFMutableDataRef> imageData(AdoptCF, CFDataCreateMutable(0, 0));
+        RetainPtr<CGImageDestinationRef> imageDest(AdoptCF, CGImageDestinationCreateWithData(imageData.get(), kUTTypePNG, 1, 0));
+        CGImageDestinationAddImage(imageDest.get(), image.get(), 0);
+        CGImageDestinationFinalize(imageDest.get());
+        printf("Content-length: %lu\n", CFDataGetLength(imageData.get()));
+        fwrite(CFDataGetBytePtr(imageData.get()), 1, CFDataGetLength(imageData.get()), stdout);
+        fprintf(stdout, "diff: %01.2f%% failed\n", percentage);
+    } else
+        fprintf(stdout, "diff: %01.2f%% passed\n", percentage);
+}
+
+int main(int argc, const char* argv[])
+{
+#if PLATFORM(WIN)
+    _setmode(0, _O_BINARY);
+    _setmode(1, _O_BINARY);
+#endif
+
+    unsigned threshold = 0;
+
+    for (int i = 1; i < argc; ++i) {
+        if (!strcmp(argv[i], "-t") || !strcmp(argv[i], "--threshold")) {
+            if (i >= argc - 1)
+                exit(1);
+            threshold = strtol(argv[i + 1], 0, 0);
+            ++i;
+            continue;
+        }
+    }
+
+    char buffer[2048];
+    RetainPtr<CGImageRef> actualImage;
+    RetainPtr<CGImageRef> baselineImage;
+
+    while (fgets(buffer, sizeof(buffer), stdin)) {
+        // remove the CR
+        char* newLineCharacter = strchr(buffer, '\n');
+        if (newLineCharacter)
+            *newLineCharacter = '\0';
+
+        if (!strncmp("Content-length: ", buffer, 16)) {
+            strtok(buffer, " ");
+            int imageSize = strtol(strtok(0, " "), 0, 10);
+
+            if (imageSize > 0 && !actualImage)
+                actualImage = createImageFromStdin(imageSize);
+            else if (imageSize > 0 && !baselineImage)
+                baselineImage = createImageFromStdin(imageSize);
+            else
+                fputs("error, image size must be specified.\n", stdout);
+        }
+
+        if (actualImage && baselineImage) {
+            compareImages(actualImage.get(), baselineImage.get(), threshold);
+            actualImage = 0;
+            baselineImage = 0;
+        }
+
+        fflush(stdout);
+    }
+
+    return 0;
+}
diff --git a/WebKitTools/DumpRenderTree/win/ImageDiff.vcproj b/WebKitTools/DumpRenderTree/win/ImageDiff.vcproj
new file mode 100644 (file)
index 0000000..3b2a81c
--- /dev/null
@@ -0,0 +1,182 @@
+<?xml version="1.0" encoding="Windows-1252"?>\r
+<VisualStudioProject\r
+       ProjectType="Visual C++"\r
+       Version="8.00"\r
+       Name="ImageDiff"\r
+       ProjectGUID="{59CC0547-70AC-499C-9B19-EC01C6F61137}"\r
+       RootNamespace="ImageDiff"\r
+       >\r
+       <Platforms>\r
+               <Platform\r
+                       Name="Win32"\r
+               />\r
+       </Platforms>\r
+       <ToolFiles>\r
+       </ToolFiles>\r
+       <Configurations>\r
+               <Configuration\r
+                       Name="Debug|Win32"\r
+                       OutputDirectory="$(WebKitOutputDir)\bin"\r
+                       IntermediateDirectory="$(WebKitOutputDir)\obj\$(ProjectName)\$(ConfigurationName)"\r
+                       ConfigurationType="1"\r
+                       CharacterSet="2"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               Optimization="0"\r
+                               AdditionalIncludeDirectories="&quot;$(WebKitOutputDir)\include&quot;;&quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders&quot;;&quot;$(WebKitLibrariesDir)\include&quot;"\r
+                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"\r
+                               MinimalRebuild="true"\r
+                               BasicRuntimeChecks="3"\r
+                               RuntimeLibrary="3"\r
+                               WarningLevel="4"\r
+                               WarnAsError="true"\r
+                               Detect64BitPortabilityProblems="true"\r
+                               DebugInformationFormat="4"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               LinkLibraryDependencies="false"\r
+                               AdditionalDependencies="CoreGraphics.lib CoreFoundation.lib"\r
+                               AdditionalLibraryDirectories="$(WebKitOutputDir)\lib;$(WebKitLibrariesDir)\lib"\r
+                               GenerateDebugInformation="true"\r
+                               TargetMachine="1"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebDeploymentTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Release|Win32"\r
+                       OutputDirectory="$(WebKitOutputDir)\bin"\r
+                       IntermediateDirectory="$(WebKitOutputDir)\obj\$(ProjectName)\$(ConfigurationName)"\r
+                       ConfigurationType="1"\r
+                       CharacterSet="2"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalIncludeDirectories="&quot;$(WebKitOutputDir)\include&quot;;&quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders&quot;;&quot;$(WebKitLibrariesDir)\include&quot;"\r
+                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"\r
+                               RuntimeLibrary="2"\r
+                               WarningLevel="4"\r
+                               WarnAsError="true"\r
+                               Detect64BitPortabilityProblems="true"\r
+                               DebugInformationFormat="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               LinkLibraryDependencies="false"\r
+                               AdditionalDependencies="CoreGraphics.lib CoreFoundation.lib"\r
+                               AdditionalLibraryDirectories="$(WebKitOutputDir)\lib;$(WebKitLibrariesDir)\lib"\r
+                               GenerateDebugInformation="true"\r
+                               OptimizeReferences="2"\r
+                               EnableCOMDATFolding="2"\r
+                               TargetMachine="1"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebDeploymentTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+       </Configurations>\r
+       <References>\r
+       </References>\r
+       <Files>\r
+               <File\r
+                       RelativePath="..\cg\ImageDiffCG.cpp"\r
+                       >\r
+               </File>\r
+       </Files>\r
+       <Globals>\r
+       </Globals>\r
+</VisualStudioProject>\r