From 76d316196deedfa00a81d089c3116cf47110395f Mon Sep 17 00:00:00 2001 From: "yaar@chromium.org" Date: Mon, 8 Mar 2010 22:11:41 +0000 Subject: UpStreamimg *image_decoder_unittest. Used WebKit API's ImageDecoder to decouple WebCore deps. Corresponding WebKit Bug 35415. BUG=28063 TEST=Run unit tests. Review URL: http://codereview.chromium.org/661231 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40951 0039d316-1c4b-4281-b951-d872f2087c98 --- skia/ext/vector_canvas_unittest.cc | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'skia/ext') diff --git a/skia/ext/vector_canvas_unittest.cc b/skia/ext/vector_canvas_unittest.cc index 11c6f41..328de22 100644 --- a/skia/ext/vector_canvas_unittest.cc +++ b/skia/ext/vector_canvas_unittest.cc @@ -5,14 +5,14 @@ #include "config.h" #include "build/build_config.h" -#include "webkit/tools/test_shell/image_decoder_unittest.h" - #if !defined(OS_WIN) #include #endif #include "PNGImageDecoder.h" +#undef LOG + #include "app/gfx/codec/png_codec.h" #include "base/command_line.h" #include "base/file_util.h" @@ -28,6 +28,13 @@ namespace { const wchar_t* const kGenerateSwitch = L"vector-canvas-generate"; +void ReadFileToVector(const FilePath& path, Vector* contents) { + std::string contents_str; + file_util::ReadFileToString(path, &contents_str); + contents->resize(contents_str.size()); + memcpy(&contents->first(), contents_str.data(), contents_str.size()); +} + // Lightweight HDC management. class Context { public: -- cgit v1.1