OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "base/gfx/skia_utils.h" | 5 #include "skia/ext/skia_utils_win.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "SkRect.h" | 8 #include "SkRect.h" |
9 #include "SkGradientShader.h" | 9 #include "SkGradientShader.h" |
10 | 10 |
11 namespace { | 11 namespace { |
12 | 12 |
13 COMPILE_ASSERT(offsetof(RECT, left) == offsetof(SkIRect, fLeft), o1); | 13 COMPILE_ASSERT(offsetof(RECT, left) == offsetof(SkIRect, fLeft), o1); |
14 COMPILE_ASSERT(offsetof(RECT, top) == offsetof(SkIRect, fTop), o2); | 14 COMPILE_ASSERT(offsetof(RECT, top) == offsetof(SkIRect, fTop), o2); |
15 COMPILE_ASSERT(offsetof(RECT, right) == offsetof(SkIRect, fRight), o3); | 15 COMPILE_ASSERT(offsetof(RECT, right) == offsetof(SkIRect, fRight), o3); |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 #ifndef _MSC_VER | 66 #ifndef _MSC_VER |
67 return RGB(SkColorGetR(color), SkColorGetG(color), SkColorGetB(color)); | 67 return RGB(SkColorGetR(color), SkColorGetG(color), SkColorGetB(color)); |
68 #else | 68 #else |
69 // 0BGR = ((ARGB -> BGRA) >> 8) | 69 // 0BGR = ((ARGB -> BGRA) >> 8) |
70 return (_byteswap_ulong(color) >> 8); | 70 return (_byteswap_ulong(color) >> 8); |
71 #endif | 71 #endif |
72 } | 72 } |
73 | 73 |
74 } // namespace gfx | 74 } // namespace gfx |
75 | 75 |
OLD | NEW |