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

Side by Side 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 unified diff | Download patch
OLDNEW
1 /* include/corecg/SkUserConfig.h 1 /* include/corecg/SkUserConfig.h
2 ** 2 **
3 ** Copyright 2006, Google Inc. 3 ** Copyright 2006, Google Inc.
4 ** 4 **
5 ** Licensed under the Apache License, Version 2.0 (the "License"); 5 ** Licensed under the Apache License, Version 2.0 (the "License");
6 ** you may not use this file except in compliance with the License. 6 ** you may not use this file except in compliance with the License.
7 ** You may obtain a copy of the License at 7 ** You may obtain a copy of the License at
8 ** 8 **
9 ** http://www.apache.org/licenses/LICENSE-2.0 9 ** http://www.apache.org/licenses/LICENSE-2.0
10 ** 10 **
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 #elif defined(SK_BUILD_FOR_MAC) 109 #elif defined(SK_BUILD_FOR_MAC)
110 110
111 #define SK_CPU_LENDIAN 111 #define SK_CPU_LENDIAN
112 #undef SK_CPU_BENDIAN 112 #undef SK_CPU_BENDIAN
113 // we want (memory order) RGBA 113 // we want (memory order) RGBA
114 #define SK_A32_SHIFT 24 114 #define SK_A32_SHIFT 24
115 #define SK_R32_SHIFT 0 115 #define SK_R32_SHIFT 0
116 #define SK_G32_SHIFT 8 116 #define SK_G32_SHIFT 8
117 #define SK_B32_SHIFT 16 117 #define SK_B32_SHIFT 16
118 118
119 #elif defined(SK_BUILD_FOR_UNIX)
120
121 #ifdef SK_CPU_BENDIAN
122 // Below we set the order for ARGB channels in registers. I suspect that, on
123 // big endian machines, you can keep this the same and everything will work.
124 // The in-memory order will be different, of course, but as long as everything
125 // is reading memory as words rather than bytes, it will all work. However, if
126 // you find that colours are messed up I thought that I would leave a helpful
127 // locator for you. Also see the comments in
128 // base/gfx/bitmap_platform_device_linux.h
129 #error Read the comment at this location
130 #endif
131
132 // For Linux we want to match the most common X visual, which is
133 // ARGB (in registers)
134 #define SK_A32_SHIFT 24
135 #define SK_R32_SHIFT 16
136 #define SK_G32_SHIFT 8
137 #define SK_B32_SHIFT 0
138
119 #endif 139 #endif
120 140
121 // Don't use skia debug mode even when compiled as debug, because we don't 141 // Don't use skia debug mode even when compiled as debug, because we don't
122 // care about debugging this library, only our app. 142 // care about debugging this library, only our app.
123 #undef SK_DEBUG 143 #undef SK_DEBUG
124 #undef SK_SUPPORT_UNITTEST 144 #undef SK_SUPPORT_UNITTEST
125 #define SK_RELEASE 145 #define SK_RELEASE
126 #undef SK_RESTRICT 146 #undef SK_RESTRICT
127 #define SK_RESTRICT 147 #define SK_RESTRICT
128 #define SkDebugf(...) ((void)0) 148 #define SkDebugf(...) ((void)0)
129 149
130 // ===== End Chrome-specific definitions ===== 150 // ===== End Chrome-specific definitions =====
131 151
132 #endif 152 #endif
133 153
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698