summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
authortony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-13 19:18:44 +0000
committertony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-13 19:18:44 +0000
commitb904feb7878fa9a67881758b5b24e9a5b9252aa5 (patch)
treeb3eeca8e6caab75dd28e760879e2b51a07a4fd2f /webkit
parent3f853a5af52be63328d5a73eb4b9651ee3d09e9d (diff)
downloadchromium_src-b904feb7878fa9a67881758b5b24e9a5b9252aa5.zip
chromium_src-b904feb7878fa9a67881758b5b24e9a5b9252aa5.tar.gz
chromium_src-b904feb7878fa9a67881758b5b24e9a5b9252aa5.tar.bz2
Remove code that's no longer needed for computing checksums.
Now that Linux matches Windows in checksum generation, we can hardcode the logic and remove the comments. BUG=21386 Review URL: http://codereview.chromium.org/3310027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59259 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r--webkit/tools/test_shell/test_shell.cc18
1 files changed, 5 insertions, 13 deletions
diff --git a/webkit/tools/test_shell/test_shell.cc b/webkit/tools/test_shell/test_shell.cc
index 5573179..e0b8365 100644
--- a/webkit/tools/test_shell/test_shell.cc
+++ b/webkit/tools/test_shell/test_shell.cc
@@ -366,23 +366,15 @@ std::string TestShell::DumpImage(skia::PlatformCanvas* canvas,
// to keep it. On Windows, the alpha channel is wrong since text/form control
// drawing may have erased it in a few places. So on Windows we force it to
// opaque and also don't write the alpha channel for the reference. Linux
- // doesn't have the wrong alpha like Windows, but we ignore it anyway.
-#if defined(OS_WIN)
- bool discard_transparency = true;
- device.makeOpaque(0, 0, src_bmp.width(), src_bmp.height());
-#elif defined(OS_MACOSX)
+ // doesn't have the wrong alpha like Windows, but we try to match Windows.
+#if defined(OS_MACOSX)
bool discard_transparency = false;
-#elif defined(OS_POSIX)
+#else
bool discard_transparency = true;
- if (WebKit::areLayoutTestImagesOpaque())
- device.makeOpaque(0, 0, src_bmp.width(), src_bmp.height());
+ device.makeOpaque(0, 0, src_bmp.width(), src_bmp.height());
#endif
- // Compute MD5 sum. We should have done this before calling
- // device.makeOpaque on Windows. Because we do it after the call, there are
- // some images that are the pixel identical on windows and other platforms
- // but have different MD5 sums. At this point, rebaselining all the windows
- // tests is too much of a pain, so we just check in different baselines.
+ // Compute MD5 sum.
MD5Context ctx;
MD5Init(&ctx);
MD5Update(&ctx, src_bmp.getPixels(), src_bmp.getSize());