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

Unified Diff: include/core/SkColorPriv.h

Issue 98343006: Fix 32/64 bit warnings on g++-4.2. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years 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 | « no previous file | tests/ColorPrivTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkColorPriv.h
diff --git a/include/core/SkColorPriv.h b/include/core/SkColorPriv.h
index 98f4e5b698c88c8f2387c59a9e3dff55fe74f594..cd6fc2cfd20543f4bcb0d5f775abcc82c765ac3e 100644
--- a/include/core/SkColorPriv.h
+++ b/include/core/SkColorPriv.h
@@ -303,8 +303,9 @@ static inline SkPMColor SkUnsplay(uint32_t ag, uint32_t rb) {
*/
static inline SkPMColor SkUnsplay(uint64_t agrb) {
const uint32_t mask = 0xFF00FF00;
- return ((agrb & mask) >> 8) | // 0x00RR00BB
- ((agrb >> 32) & mask); // 0xAARRGGBB
+ return SkPMColor(
+ ((agrb & mask) >> 8) | // 0x00RR00BB
+ ((agrb >> 32) & mask)); // 0xAARRGGBB
}
static inline SkPMColor SkFastFourByteInterp256_32(SkPMColor src, SkPMColor dst, unsigned scale) {
« no previous file with comments | « no previous file | tests/ColorPrivTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698