Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1376)

Unified Diff: content/shell/webkit_test_controller.cc

Issue 21202003: Move simple png encoding for image_diff into tools/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix android_webview third_party_whitelist.txt Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « android_webview/tools/third_party_files_whitelist.txt ('k') | tools/imagediff/DEPS » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/shell/webkit_test_controller.cc
diff --git a/content/shell/webkit_test_controller.cc b/content/shell/webkit_test_controller.cc
index 372b4b3b28874732856eec7ce486ecfd0f0fc93d..147367e4787dbef703d794da678982f3192e6b3f 100644
--- a/content/shell/webkit_test_controller.cc
+++ b/content/shell/webkit_test_controller.cc
@@ -30,7 +30,7 @@
#include "content/shell/shell.h"
#include "content/shell/shell_browser_context.h"
#include "content/shell/shell_content_browser_client.h"
-#include "webkit/support/webkit_support_gfx.h"
+#include "ui/gfx/codec/png_codec.h"
namespace content {
@@ -512,13 +512,15 @@ void WebKitTestController::OnImageDump(
bool discard_transparency = true;
#endif
- bool success = webkit_support::EncodeBGRAPNGWithChecksum(
- reinterpret_cast<const unsigned char*>(image.getPixels()),
- image.width(),
- image.height(),
+ std::vector<gfx::PNGCodec::Comment> comments;
+ comments.push_back(gfx::PNGCodec::Comment("checksum", actual_pixel_hash));
+ bool success = gfx::PNGCodec::Encode(
+ static_cast<const unsigned char*>(image.getPixels()),
+ gfx::PNGCodec::FORMAT_BGRA,
+ gfx::Size(image.width(), image.height()),
static_cast<int>(image.rowBytes()),
discard_transparency,
- actual_pixel_hash,
+ comments,
&png);
if (success)
printer_->PrintImageBlock(png);
« no previous file with comments | « android_webview/tools/third_party_files_whitelist.txt ('k') | tools/imagediff/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698