Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(46)

Unified Diff: gfx/skia_utils_gtk.cc

Issue 6246027: Move src/gfx/ to src/ui/gfx... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gfx/skia_utils_gtk.h ('k') | gfx/test_suite.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gfx/skia_utils_gtk.cc
===================================================================
--- gfx/skia_utils_gtk.cc (revision 73487)
+++ gfx/skia_utils_gtk.cc (working copy)
@@ -1,32 +0,0 @@
-// 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.
-
-#include "gfx/skia_utils_gtk.h"
-
-#include <gdk/gdkcolor.h>
-
-namespace gfx {
-
-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 gfx
« no previous file with comments | « gfx/skia_utils_gtk.h ('k') | gfx/test_suite.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698