summaryrefslogtreecommitdiffstats
path: root/skia
diff options
context:
space:
mode:
authorpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-26 00:47:59 +0000
committerpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-26 00:47:59 +0000
commitad02174ccfde818097757bef93c9ae6ea62c68bd (patch)
tree3d7190ae70d55bec354bab112ee6bcbcad7e29ad /skia
parent05af3561d9685d9b54e4d2e4fe35b2c69bd6bec0 (diff)
downloadchromium_src-ad02174ccfde818097757bef93c9ae6ea62c68bd.zip
chromium_src-ad02174ccfde818097757bef93c9ae6ea62c68bd.tar.gz
chromium_src-ad02174ccfde818097757bef93c9ae6ea62c68bd.tar.bz2
Move skia_utils_gtk.cc/.h to app/gfx/. Original patch by Thiago Farina (see http://codereview.chromium.org/660063 ), r=me.
BUG=22853 TEST=none git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40083 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'skia')
-rw-r--r--skia/ext/skia_utils_gtk.cc32
-rw-r--r--skia/ext/skia_utils_gtk.h22
-rw-r--r--skia/skia.gyp4
3 files changed, 1 insertions, 57 deletions
diff --git a/skia/ext/skia_utils_gtk.cc b/skia/ext/skia_utils_gtk.cc
deleted file mode 100644
index da56374..0000000
--- a/skia/ext/skia_utils_gtk.cc
+++ /dev/null
@@ -1,32 +0,0 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "skia/ext/skia_utils_gtk.h"
-
-#include <gdk/gdkcolor.h>
-
-namespace skia {
-
-const int kSkiaToGDKMultiplier = 257;
-
-// GDK_COLOR_RGB multiplies by 257 (= 0x10001) to distribute the bits evenly
-// See: http://www.mindcontrol.org/~hplus/graphics/expand-bits.html
-// To get back, we can just right shift by eight
-// (or, formulated differently, i == (i*257)/256 for all i < 256).
-
-SkColor GdkColorToSkColor(GdkColor color) {
- return SkColorSetRGB(color.red >> 8, color.green >> 8, color.blue >> 8);
-}
-
-GdkColor SkColorToGdkColor(SkColor color) {
- GdkColor gdk_color = {
- 0,
- SkColorGetR(color) * kSkiaToGDKMultiplier,
- SkColorGetG(color) * kSkiaToGDKMultiplier,
- SkColorGetB(color) * kSkiaToGDKMultiplier
- };
- return gdk_color;
-}
-
-} // namespace
diff --git a/skia/ext/skia_utils_gtk.h b/skia/ext/skia_utils_gtk.h
deleted file mode 100644
index c9e993d..0000000
--- a/skia/ext/skia_utils_gtk.h
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef SKIA_EXT_SKIA_UTILS_GTK_H_
-#define SKIA_EXT_SKIA_UTILS_GTK_H_
-
-#include "third_party/skia/include/core/SkColor.h"
-
-typedef struct _GdkColor GdkColor;
-
-namespace skia {
-
-// Converts GdkColors to the ARGB layout Skia expects.
-SkColor GdkColorToSkColor(GdkColor color);
-
-// Converts ARGB to GdkColor.
-GdkColor SkColorToGdkColor(SkColor color);
-
-} // namespace skia
-
-#endif // SKIA_EXT_SKIA_UTILS_GTK_H_
diff --git a/skia/skia.gyp b/skia/skia.gyp
index d85f2a1..78a71ac 100644
--- a/skia/skia.gyp
+++ b/skia/skia.gyp
@@ -1,4 +1,4 @@
-# Copyright (c) 2009 The Chromium Authors. All rights reserved.
+# Copyright (c) 2010 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
@@ -522,8 +522,6 @@
'ext/platform_device_win.cc',
'ext/platform_device_win.h',
'ext/SkMemory_new_handler.cpp',
- 'ext/skia_utils_gtk.cc',
- 'ext/skia_utils_gtk.h',
'ext/skia_utils_mac.mm',
'ext/skia_utils_mac.h',
'ext/skia_utils_win.cc',