diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-03 03:12:20 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-03 03:12:20 +0000 |
commit | 468fec96cd171682405d30b266f71f1766396a07 (patch) | |
tree | e3dc28717fa79c7149303d1c9ec6bb8437edfbcc /webkit | |
parent | db1faced81ea15604ca67135c5597d35269ff84a (diff) | |
download | chromium_src-468fec96cd171682405d30b266f71f1766396a07.zip chromium_src-468fec96cd171682405d30b266f71f1766396a07.tar.gz chromium_src-468fec96cd171682405d30b266f71f1766396a07.tar.bz2 |
Move the JPEG and PNG codecs from base/gfx to app/gfx/codec. Move the classes
into the gfx namespace.
Combine the PNGEncoder and PNGDecoder. There were separate when we had
different executables for the browser and renderer, and linked the encoder only
in one of them (which saved us some space used by libpng). This hasn't been the
case for years, so combining them (again) makes sense.
TEST=none
BUG=none
Review URL: http://codereview.chromium.org/243076
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27930 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r-- | webkit/tools/test_shell/test_shell.cc | 8 | ||||
-rw-r--r-- | webkit/tools/test_shell/test_shell.gyp | 1 |
2 files changed, 5 insertions, 4 deletions
diff --git a/webkit/tools/test_shell/test_shell.cc b/webkit/tools/test_shell/test_shell.cc index cce4997..4de3869 100644 --- a/webkit/tools/test_shell/test_shell.cc +++ b/webkit/tools/test_shell/test_shell.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2009 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -6,12 +6,12 @@ #include "webkit/tools/test_shell/test_shell.h" +#include "app/gfx/codec/png_codec.h" #include "base/base_paths.h" #include "base/command_line.h" #include "base/debug_on_start.h" #include "base/file_path.h" #include "base/file_util.h" -#include "base/gfx/png_encoder.h" #include "base/gfx/size.h" #include "base/icu_util.h" #if defined(OS_MACOSX) @@ -265,7 +265,7 @@ std::string TestShell::DumpImage(skia::PlatformCanvas* canvas, // Encode image. std::vector<unsigned char> png; SkAutoLockPixels src_bmp_lock(src_bmp); - PNGEncoder::ColorFormat color_format = PNGEncoder::FORMAT_BGRA; + gfx::PNGCodec::ColorFormat color_format = gfx::PNGCodec::FORMAT_BGRA; // Fix the alpha. The expected PNGs on Mac have an alpha channel, so we want // to keep it. On Windows, the alpha channel is wrong since text/form control @@ -297,7 +297,7 @@ std::string TestShell::DumpImage(skia::PlatformCanvas* canvas, // Only encode and dump the png if the hashes don't match. Encoding the image // is really expensive. if (md5hash.compare(pixel_hash) != 0) { - PNGEncoder::Encode( + gfx::PNGCodec::Encode( reinterpret_cast<const unsigned char*>(src_bmp.getPixels()), color_format, src_bmp.width(), src_bmp.height(), static_cast<int>(src_bmp.rowBytes()), discard_transparency, &png); diff --git a/webkit/tools/test_shell/test_shell.gyp b/webkit/tools/test_shell/test_shell.gyp index 8a85e44..d3e6b1c 100644 --- a/webkit/tools/test_shell/test_shell.gyp +++ b/webkit/tools/test_shell/test_shell.gyp @@ -26,6 +26,7 @@ 'target_name': 'test_shell_common', 'type': '<(library)', 'dependencies': [ + '../../../app/app.gyp:app_base', '../../../base/base.gyp:base', '../../../base/base.gyp:base_gfx', '../../../media/media.gyp:media', |