summaryrefslogtreecommitdiffstats
path: root/gfx
diff options
context:
space:
mode:
authorevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-05 20:40:29 +0000
committerevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-05 20:40:29 +0000
commit583335e29fb77b9a18f43c6804b8bfcd1b3f1d52 (patch)
tree2f398fa736cd9abe092a61912bdeffafc7c0f1be /gfx
parent0a8b97bce41cba47185d5fbee6a6850f175e9513 (diff)
downloadchromium_src-583335e29fb77b9a18f43c6804b8bfcd1b3f1d52.zip
chromium_src-583335e29fb77b9a18f43c6804b8bfcd1b3f1d52.tar.gz
chromium_src-583335e29fb77b9a18f43c6804b8bfcd1b3f1d52.tar.bz2
Revert "gtk: refactor copy-pasted code"
Build break. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65247 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gfx')
-rw-r--r--gfx/gtk_util.cc19
-rw-r--r--gfx/gtk_util.h6
2 files changed, 0 insertions, 25 deletions
diff --git a/gfx/gtk_util.cc b/gfx/gtk_util.cc
index b30b827..c45e133 100644
--- a/gfx/gtk_util.cc
+++ b/gfx/gtk_util.cc
@@ -9,7 +9,6 @@
#include <stdlib.h>
#include "base/basictypes.h"
-#include "base/command_line.h"
#include "base/linux_util.h"
#include "gfx/rect.h"
#include "third_party/skia/include/core/SkBitmap.h"
@@ -53,24 +52,6 @@ std::string ConvertAmperstandsTo(const std::string& label,
namespace gfx {
-void GtkInitFromCommandLine(const CommandLine& command_line) {
- const std::vector<std::string>& args = command_line.argv();
- int argc = args.size();
- scoped_array<char *> argv(new char *[argc + 1]);
- for (size_t i = 0; i < args.size(); ++i) {
- // TODO(piman@google.com): can gtk_init modify argv? Just being safe
- // here.
- argv[i] = strdup(args[i].c_str());
- }
- argv[argc] = NULL;
- char **argv_pointer = argv.get();
-
- gtk_init(&argc, &argv_pointer);
- for (size_t i = 0; i < args.size(); ++i) {
- free(argv[i]);
- }
-}
-
GdkPixbuf* GdkPixbufFromSkBitmap(const SkBitmap* bitmap) {
if (bitmap->isNull())
return NULL;
diff --git a/gfx/gtk_util.h b/gfx/gtk_util.h
index 8f9618d..5c4ad94 100644
--- a/gfx/gtk_util.h
+++ b/gfx/gtk_util.h
@@ -17,18 +17,12 @@
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.