summaryrefslogtreecommitdiffstats
path: root/webkit/support/webkit_support_gfx.h
diff options
context:
space:
mode:
authordarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-17 19:39:42 +0000
committerdarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-17 19:39:42 +0000
commitea47b6a802638fa18df618d5ba71dc4b5b3b4c48 (patch)
tree6c1cc5a5aac4c5c8dd81fbee7b2f87652ab1b823 /webkit/support/webkit_support_gfx.h
parent48c18de8a9e3a35f5a829e7fb01e76d80e5b596e (diff)
downloadchromium_src-ea47b6a802638fa18df618d5ba71dc4b5b3b4c48.zip
chromium_src-ea47b6a802638fa18df618d5ba71dc4b5b3b4c48.tar.gz
chromium_src-ea47b6a802638fa18df618d5ba71dc4b5b3b4c48.tar.bz2
Introduce ui.dll / libui.so for the component build.
R=ben@chromium.org Review URL: http://codereview.chromium.org/7328011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92819 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/support/webkit_support_gfx.h')
-rw-r--r--webkit/support/webkit_support_gfx.h66
1 files changed, 25 insertions, 41 deletions
diff --git a/webkit/support/webkit_support_gfx.h b/webkit/support/webkit_support_gfx.h
index e652d1c..d832fcc 100644
--- a/webkit/support/webkit_support_gfx.h
+++ b/webkit/support/webkit_support_gfx.h
@@ -8,55 +8,39 @@
#include <string>
#include <vector>
-#include "ui/gfx/codec/png_codec.h"
-#include "ui/gfx/size.h"
+// TODO(darin): Remove once this #include has been upstreamed to ImageDiff.cpp.
+// ImageDiff.cpp expects that PATH_MAX has already been defined :-/
+#include <limits.h>
namespace webkit_support {
// Decode a PNG into an RGBA pixel array.
-inline bool DecodePNG(const unsigned char* input, size_t input_size,
- std::vector<unsigned char>* output,
- int* width, int* height) {
- return gfx::PNGCodec::Decode(input, input_size, gfx::PNGCodec::FORMAT_RGBA,
- output, width, height);
-}
+bool DecodePNG(const unsigned char* input, size_t input_size,
+ std::vector<unsigned char>* output,
+ int* width, int* height);
// Encode an RGBA pixel array into a PNG.
-inline bool EncodeRGBAPNG(const unsigned char* input,
- int width,
- int height,
- int row_byte_width,
- std::vector<unsigned char>* output) {
- return gfx::PNGCodec::Encode(input, gfx::PNGCodec::FORMAT_RGBA,
- gfx::Size(width, height), row_byte_width, false,
- std::vector<gfx::PNGCodec::Comment>(), output);
-}
+bool EncodeRGBAPNG(const unsigned char* input,
+ int width,
+ int height,
+ int row_byte_width,
+ std::vector<unsigned char>* output);
// Encode an BGRA pixel array into a PNG.
-inline bool EncodeBGRAPNG(const unsigned char* input,
- int width,
- int height,
- int row_byte_width,
- bool discard_transparency,
- std::vector<unsigned char>* output) {
- return gfx::PNGCodec::Encode(input, gfx::PNGCodec::FORMAT_BGRA,
- gfx::Size(width, height), row_byte_width, discard_transparency,
- std::vector<gfx::PNGCodec::Comment>(), output);
-}
-
-inline bool EncodeBGRAPNGWithChecksum(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<gfx::PNGCodec::Comment> comments;
- comments.push_back(gfx::PNGCodec::Comment("checksum", checksum));
- return gfx::PNGCodec::Encode(input, gfx::PNGCodec::FORMAT_BGRA,
- gfx::Size(width, height), row_byte_width, discard_transparency,
- comments, output);
-}
+bool EncodeBGRAPNG(const unsigned char* input,
+ int width,
+ int height,
+ int row_byte_width,
+ bool discard_transparency,
+ std::vector<unsigned char>* output);
+
+bool EncodeBGRAPNGWithChecksum(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