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

Unified Diff: skia/include/corecg/SkUserConfig.h

Issue 8227: Switch from using GdkPixbuf to cairo for painting on Drawables. (Closed)
Patch Set: Address comments Created 12 years, 1 month 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
Index: skia/include/corecg/SkUserConfig.h
diff --git a/skia/include/corecg/SkUserConfig.h b/skia/include/corecg/SkUserConfig.h
index a9d4fea47ea908b9ab00ead93658afc76d35340c..2a646ce6bfff7b3424cc568794f6cb9fdc8e7d97 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

Powered by Google App Engine
This is Rietveld 408576698