summaryrefslogtreecommitdiffstats
path: root/skia
diff options
context:
space:
mode:
authoragl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-06 00:35:04 +0000
committeragl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-06 00:35:04 +0000
commit983f7bd3fa88bbdac942dbfaf0269b1684a5c1ee (patch)
tree119108c285b45fa1f8caa4b02016e2604f24684d /skia
parent4d590127a9d0aff4aa077b2eb1f8988619ac05c2 (diff)
downloadchromium_src-983f7bd3fa88bbdac942dbfaf0269b1684a5c1ee.zip
chromium_src-983f7bd3fa88bbdac942dbfaf0269b1684a5c1ee.tar.gz
chromium_src-983f7bd3fa88bbdac942dbfaf0269b1684a5c1ee.tar.bz2
Switch from using GdkPixbuf to cairo for painting on Drawables.
Make everything use ARGB order in registers (B.G.R.A order in memory on little-endian systems) Review URL: http://codereview.chromium.org/8227 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4845 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'skia')
-rw-r--r--skia/include/corecg/SkUserConfig.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/skia/include/corecg/SkUserConfig.h b/skia/include/corecg/SkUserConfig.h
index a9d4fea..2a646ce 100644
--- a/skia/include/corecg/SkUserConfig.h
+++ b/skia/include/corecg/SkUserConfig.h
@@ -116,6 +116,26 @@ typedef unsigned uint32_t;
#define SK_G32_SHIFT 8
#define SK_B32_SHIFT 16
+#elif defined(SK_BUILD_FOR_UNIX)
+
+#ifdef SK_CPU_BENDIAN
+// Below we set the order for ARGB channels in registers. I suspect that, on
+// big endian machines, you can keep this the same and everything will work.
+// The in-memory order will be different, of course, but as long as everything
+// is reading memory as words rather than bytes, it will all work. However, if
+// you find that colours are messed up I thought that I would leave a helpful
+// locator for you. Also see the comments in
+// base/gfx/bitmap_platform_device_linux.h
+#error Read the comment at this location
+#endif
+
+// For Linux we want to match the most common X visual, which is
+// ARGB (in registers)
+#define SK_A32_SHIFT 24
+#define SK_R32_SHIFT 16
+#define SK_G32_SHIFT 8
+#define SK_B32_SHIFT 0
+
#endif
// Don't use skia debug mode even when compiled as debug, because we don't