Commit 3ebe2c31 authored by jnd@chromium.org's avatar jnd@chromium.org

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
parent 0cb84106
......@@ -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
// 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_
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment