diff options
author | mtklein@google.com <mtklein@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-12-03 19:27:41 +0000 |
---|---|---|
committer | mtklein@google.com <mtklein@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-12-03 19:27:41 +0000 |
commit | cb08f986938eeeeb57f950c94fee120aca965787 (patch) | |
tree | 5932fa9aafbb0f183e018475859702afc01768ba | |
parent | 55ca8244cc19c3067defa64f139521264d777eb0 (diff) |
Fix 32/64 bit warnings on g++-4.2.
BUG=
Review URL: https://codereview.chromium.org/98343006
git-svn-id: http://skia.googlecode.com/svn/trunk@12470 2bbb7eff-a529-9590-31e7-b0007b416f81
-rw-r--r-- | include/core/SkColorPriv.h | 5 | ||||
-rw-r--r-- | tests/ColorPrivTest.cpp | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/include/core/SkColorPriv.h b/include/core/SkColorPriv.h index 98f4e5b698..cd6fc2cfd2 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) { diff --git a/tests/ColorPrivTest.cpp b/tests/ColorPrivTest.cpp index ddcde5dc01..19a63c7843 100644 --- a/tests/ColorPrivTest.cpp +++ b/tests/ColorPrivTest.cpp @@ -15,7 +15,7 @@ DEF_TEST(Splay, r) { ASSERT(SkUnsplay(ag << 8, rb << 8) == color); const uint64_t agrb = SkSplay(color); - ASSERT(agrb == 0x00A100C300B200D4); + ASSERT(agrb == 0x00A100C300B200D4ULL); ASSERT(SkUnsplay(agrb<<8) == color); } |