diff options
author | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-07 01:22:22 +0000 |
---|---|---|
committer | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-07 01:22:22 +0000 |
commit | e4a41d8af760e10cd8d85ae877c9169f86ca6084 (patch) | |
tree | aa384a871cca99389706994830a5aa5d86f7bf81 /base/gfx/gtk_util.h | |
parent | 7a69c1461163ab03dac93b8459ac6f71c6df4a44 (diff) | |
download | chromium_src-e4a41d8af760e10cd8d85ae877c9169f86ca6084.zip chromium_src-e4a41d8af760e10cd8d85ae877c9169f86ca6084.tar.gz chromium_src-e4a41d8af760e10cd8d85ae877c9169f86ca6084.tar.bz2 |
Linux: store clipboard image as bmp rather than converting to PNG.
Review URL: http://codereview.chromium.org/63040
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13218 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/gfx/gtk_util.h')
-rwxr-xr-x | base/gfx/gtk_util.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/base/gfx/gtk_util.h b/base/gfx/gtk_util.h index 6a6cdd6..1b70ae0 100755 --- a/base/gfx/gtk_util.h +++ b/base/gfx/gtk_util.h @@ -30,8 +30,13 @@ extern const GdkColor kGdkGreen; void SubtractRectanglesFromRegion(GdkRegion* region, const std::vector<Rect>& cutouts); -// Convert and copy a SkBitmap to a GdkPixbuf. NOTE: This is an expensive -// operation, all of the pixels must be copied and their order swapped. +// Makes a copy of |pixels| with the ordering changed from BGRA to RGBA. +// The caller is responsible for free()ing the data. If |stride| is 0, +// it's assumed to be 4 * |width|. +uint8_t* BGRAToRGBA(const uint8_t* pixels, int width, int height, int stride); + +// Convert and copy a SkBitmap to a GdkPixbuf. NOTE: this uses BGRAToRGBA, so +// it is an expensive operation. GdkPixbuf* GdkPixbufFromSkBitmap(const SkBitmap* bitmap); // Create a GtkBin with |child| as its child widget. This bin will paint a |