diff options
author | jnd@chromium.org <jnd@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-25 04:46:24 +0000 |
---|---|---|
committer | jnd@chromium.org <jnd@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-25 04:46:24 +0000 |
commit | 3ebe2c3112d2c11141be41ca8b3f8e68f613022d (patch) | |
tree | a96dbefcb7e03bcb62e0127574930e127b3f0eaa /webkit/support | |
parent | 0cb8410651a5d1149285d3baa54fe124bbb86d47 (diff) | |
download | chromium_src-3ebe2c3112d2c11141be41ca8b3f8e68f613022d.zip chromium_src-3ebe2c3112d2c11141be41ca8b3f8e68f613022d.tar.gz chromium_src-3ebe2c3112d2c11141be41ca8b3f8e68f613022d.tar.bz2 |
Add EncodeRGBAPNGWithChecksum method.
Adding this method is to dump image for DRT on Chromium Android port.
See https://bugs.webkit.org/show_bug.cgi?id=84682 for details.
NOTE. Skia pixel layout definition is in
<chrome-source-root>/third_party/skia/include/core/SkPostConfig.h for Chromium Android platform.
<chrome-source-root>/skia/config/SkUserConfig.h for other Chromium platforms.
BUG=None.
TEST=should not affect any tests.
Review URL: http://codereview.chromium.org/10202008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@133861 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/support')
-rw-r--r-- | webkit/support/webkit_support_gfx.cc | 14 | ||||
-rw-r--r-- | webkit/support/webkit_support_gfx.h | 10 |
2 files changed, 23 insertions, 1 deletions
diff --git a/webkit/support/webkit_support_gfx.cc b/webkit/support/webkit_support_gfx.cc index bc342e9..1471e29 100644 --- a/webkit/support/webkit_support_gfx.cc +++ b/webkit/support/webkit_support_gfx.cc @@ -676,4 +676,18 @@ bool EncodeBGRAPNGWithChecksum(const unsigned char* input, comments, output); } +bool EncodeRGBAPNGWithChecksum(const unsigned char* input, + int width, + int height, + int row_byte_width, + bool discard_transparency, + const std::string& checksum, + std::vector<unsigned char>* output) { + std::vector<Comment> comments; + comments.push_back(Comment("checksum", checksum)); + return Encode(input, FORMAT_RGBA, + width, height, row_byte_width, discard_transparency, + comments, output); +} + } // namespace webkit_support diff --git a/webkit/support/webkit_support_gfx.h b/webkit/support/webkit_support_gfx.h index 4823022..19d011f 100644 --- a/webkit/support/webkit_support_gfx.h +++ b/webkit/support/webkit_support_gfx.h @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 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. @@ -38,6 +38,14 @@ bool EncodeBGRAPNGWithChecksum(const unsigned char* input, const std::string& checksum, std::vector<unsigned char>* output); +bool EncodeRGBAPNGWithChecksum(const unsigned char* input, + int width, + int height, + int row_byte_width, + bool discard_transparency, + const std::string& checksum, + std::vector<unsigned char>* output); + } // namespace webkit_support #endif // WEBKIT_SUPPORT_WEBKIT_SUPPORT_GFX_H_ |