Changeset 67363 in webkit


Ignore:
Timestamp:
Sep 12, 2010 9:21:26 PM (14 years ago)
Author:
tkent@chromium.org
Message:

2010-09-12 Kent Tamura <tkent@chromium.org>

Reviewed by Tony Chang.

[DRT/Chromium] Remove dependency to base/string16.h and gfx/codec/png_codec.h
https://bugs.webkit.org/show_bug.cgi?id=45517

  • DEPS: Roll Chromium revision to r59033 to have webkit_support_gfx.h.
  • WebKit.gyp:

2010-09-12 Kent Tamura <tkent@chromium.org>

Reviewed by Tony Chang.

[DRT/Chromium] Remove dependency to base/string16.h and gfx/codec/png_codec.h
https://bugs.webkit.org/show_bug.cgi?id=45517

Use webkit_support_gfx.h for PNG encoding/decoding instead of png_codec.h

  • DumpRenderTree/chromium/ImageDiff.cpp: (Image::craeteFromStdin): (Image::createFromFilename): (diffImages):
  • DumpRenderTree/chromium/TestShell.cpp: (TestShell::dumpImage):
Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKit/chromium/ChangeLog

    r67362 r67363  
     12010-09-12  Kent Tamura  <tkent@chromium.org>
     2
     3        Reviewed by Tony Chang.
     4
     5        [DRT/Chromium] Remove dependency to base/string16.h and gfx/codec/png_codec.h
     6        https://bugs.webkit.org/show_bug.cgi?id=45517
     7
     8        * DEPS: Roll Chromium revision to r59033 to have webkit_support_gfx.h.
     9        * WebKit.gyp:
     10
    1112010-09-10  MORITA Hajime  <morrita@google.com>
    212
  • trunk/WebKit/chromium/DEPS

    r66701 r67363  
    3333vars = {
    3434  'chromium_svn': 'http://src.chromium.org/svn/trunk/src',
    35   'chromium_rev': '58277',
     35  'chromium_rev': '59033',
    3636}
    3737
  • trunk/WebKit/chromium/WebKit.gyp

    r67099 r67363  
    782782                'webkit',
    783783                '../../JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp:wtf',
    784                 '<(chromium_src_dir)/gfx/gfx.gyp:gfx',
     784                '<(chromium_src_dir)/webkit/support/webkit_support.gyp:webkit_support',
    785785            ],
    786786            'include_dirs': [
  • trunk/WebKitTools/ChangeLog

    r67362 r67363  
     12010-09-12  Kent Tamura  <tkent@chromium.org>
     2
     3        Reviewed by Tony Chang.
     4
     5        [DRT/Chromium] Remove dependency to base/string16.h and gfx/codec/png_codec.h
     6        https://bugs.webkit.org/show_bug.cgi?id=45517
     7
     8        Use webkit_support_gfx.h for PNG encoding/decoding instead of png_codec.h
     9
     10        * DumpRenderTree/chromium/ImageDiff.cpp:
     11        (Image::craeteFromStdin):
     12        (Image::createFromFilename):
     13        (diffImages):
     14        * DumpRenderTree/chromium/TestShell.cpp:
     15        (TestShell::dumpImage):
     16
    1172010-09-10  MORITA Hajime  <morrita@google.com>
    218
  • trunk/WebKitTools/DumpRenderTree/chromium/ImageDiff.cpp

    r65015 r67363  
    3737#include "config.h"
    3838
    39 #include "gfx/codec/png_codec.h"
     39#include "webkit/support/webkit_support_gfx.h"
    4040#include <algorithm>
    4141#include <stdio.h>
     
    5050#endif
    5151
    52 using namespace gfx;
    5352using namespace std;
    5453
     
    9493            return false;
    9594
    96         if (!PNGCodec::Decode(source.get(), byteLength, PNGCodec::FORMAT_RGBA,
    97                               &m_data, &m_width, &m_height)) {
     95        if (!webkit_support::DecodePNG(source.get(), byteLength, &m_data, &m_width, &m_height)) {
    9896            clear();
    9997            return false;
     
    119117        fclose(f);
    120118
    121         if (!PNGCodec::Decode(&compressed[0], compressed.size(),
    122                               PNGCodec::FORMAT_RGBA, &m_data, &m_width, &m_height)) {
     119        if (!webkit_support::DecodePNG(&compressed[0], compressed.size(), &m_data, &m_width, &m_height)) {
    123120            clear();
    124121            return false;
     
    354351
    355352    vector<unsigned char> pngData;
    356     PNGCodec::Encode(diffImage.data(), PNGCodec::FORMAT_RGBA, diffImage.width(),
    357                      diffImage.height(), diffImage.width() * 4, false, &pngData);
     353    webkit_support::EncodeRGBAPNG(diffImage.data(), diffImage.width(), diffImage.height(),
     354                                  diffImage.width() * 4, &pngData);
    358355    if (!writeFile(outFile, &pngData.front(), pngData.size()))
    359356        return statusError;
  • trunk/WebKitTools/DumpRenderTree/chromium/TestShell.cpp

    r66914 r67363  
    3636#include "LayoutTestController.h"
    3737#include "WebViewHost.h"
    38 #include "base/string16.h"
    39 #include "gfx/codec/png_codec.h" // FIXME: Remove dependecy. WebCore/platform/image-encoder is better?
    4038#include "public/WebDataSource.h"
    4139#include "public/WebDocument.h"
     
    5654#include "skia/ext/platform_canvas.h"
    5755#include "webkit/support/webkit_support.h"
     56#include "webkit/support/webkit_support_gfx.h"
    5857#include <algorithm>
    5958#include <cctype>
     
    620619    if (md5hash.compare(m_params.pixelHash)) {
    621620        std::vector<unsigned char> png;
    622         gfx::PNGCodec::ColorFormat colorFormat = gfx::PNGCodec::FORMAT_BGRA;
    623         gfx::PNGCodec::Encode(
     621        webkit_support::EncodeBGRAPNG(
    624622            reinterpret_cast<const unsigned char*>(sourceBitmap.getPixels()),
    625             colorFormat, sourceBitmap.width(), sourceBitmap.height(),
     623            sourceBitmap.width(), sourceBitmap.height(),
    626624            static_cast<int>(sourceBitmap.rowBytes()), discardTransparency, &png);
    627625
Note: See TracChangeset for help on using the changeset viewer.