summaryrefslogtreecommitdiffstats
path: root/base
diff options
context:
space:
mode:
authorpvalchev@google.com <pvalchev@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-13 22:06:01 +0000
committerpvalchev@google.com <pvalchev@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-13 22:06:01 +0000
commit7cd70c394eeaeb6a93a8e28142942b5584f01e2d (patch)
tree4a3bde2aefad49928afe234d0d48154370ecbfc5 /base
parent42b206a6890ec008ed2729b36a5a58f0f334b3be (diff)
downloadchromium_src-7cd70c394eeaeb6a93a8e28142942b5584f01e2d.zip
chromium_src-7cd70c394eeaeb6a93a8e28142942b5584f01e2d.tar.gz
chromium_src-7cd70c394eeaeb6a93a8e28142942b5584f01e2d.tar.bz2
Move non-linux specific code from base/linux_util to app/gtk_util
from sprewell Review URL: http://codereview.chromium.org/2058004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47201 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r--base/linux_util.cc20
-rw-r--r--base/linux_util.h5
2 files changed, 0 insertions, 25 deletions
diff --git a/base/linux_util.cc b/base/linux_util.cc
index 0ad9bb0..d9fd065 100644
--- a/base/linux_util.cc
+++ b/base/linux_util.cc
@@ -122,26 +122,6 @@ bool ProcPathGetInode(ino_t* inode_out, const char* path, bool log = false) {
namespace base {
-uint8_t* BGRAToRGBA(const uint8_t* pixels, int width, int height, int stride) {
- if (stride == 0)
- stride = width * 4;
-
- uint8_t* new_pixels = static_cast<uint8_t*>(malloc(height * stride));
-
- // We have to copy the pixels and swap from BGRA to RGBA.
- for (int i = 0; i < height; ++i) {
- for (int j = 0; j < width; ++j) {
- int idx = i * stride + j * 4;
- new_pixels[idx] = pixels[idx + 2];
- new_pixels[idx + 1] = pixels[idx + 1];
- new_pixels[idx + 2] = pixels[idx];
- new_pixels[idx + 3] = pixels[idx + 3];
- }
- }
-
- return new_pixels;
-}
-
// We use this static string to hold the Linux distro info. If we
// crash, the crash handler code will send this in the crash dump.
std::string linux_distro =
diff --git a/base/linux_util.h b/base/linux_util.h
index 2550f70..e810674 100644
--- a/base/linux_util.h
+++ b/base/linux_util.h
@@ -18,11 +18,6 @@ class EnvVarGetter;
static const char kFindInodeSwitch[] = "--find-inode";
-// 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);
-
// Get the Linux Distro if we can, or return "Unknown", similar to
// GetWinVersion() in base/win_util.h.
std::string GetLinuxDistro();