summaryrefslogtreecommitdiffstats
path: root/gfx/gtk_util.h
diff options
context:
space:
mode:
authorevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-05 20:32:22 +0000
committerevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-05 20:32:22 +0000
commit0a8b97bce41cba47185d5fbee6a6850f175e9513 (patch)
tree2e774a8aac4ab7b0b52912216e04d46a2e0688b2 /gfx/gtk_util.h
parenta43ce683b98659b5120125f04b07d8db81979f7b (diff)
downloadchromium_src-0a8b97bce41cba47185d5fbee6a6850f175e9513.zip
chromium_src-0a8b97bce41cba47185d5fbee6a6850f175e9513.tar.gz
chromium_src-0a8b97bce41cba47185d5fbee6a6850f175e9513.tar.bz2
gtk: refactor copy-pasted code
I wanted to do the same thing in a third place. TEST=compiles Review URL: http://codereview.chromium.org/4508004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65246 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gfx/gtk_util.h')
-rw-r--r--gfx/gtk_util.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/gfx/gtk_util.h b/gfx/gtk_util.h
index 5c4ad94..8f9618d 100644
--- a/gfx/gtk_util.h
+++ b/gfx/gtk_util.h
@@ -17,12 +17,18 @@
typedef struct _GdkPixbuf GdkPixbuf;
typedef struct _GdkRegion GdkRegion;
+class CommandLine;
class SkBitmap;
namespace gfx {
class Rect;
+// Call gtk_init() using the argc and argv from command_line.
+// gtk_init() wants an argc and argv that it can mutate; we provide those,
+// but leave the original CommandLine unaltered.
+void GtkInitFromCommandLine(const CommandLine& command_line);
+
// Convert and copy a SkBitmap to a GdkPixbuf. NOTE: this uses BGRAToRGBA, so
// it is an expensive operation. The returned GdkPixbuf will have a refcount of
// 1, and the caller is responsible for unrefing it when done.