OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2003, 2004, 2005, 2006, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2003, 2004, 2005, 2006, 2008 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 19 matching lines...) Expand all Loading... |
30 #include "wtf/Assertions.h" | 30 #include "wtf/Assertions.h" |
31 #include "wtf/HexNumber.h" | 31 #include "wtf/HexNumber.h" |
32 #include "wtf/MathExtras.h" | 32 #include "wtf/MathExtras.h" |
33 #include "wtf/dtoa.h" | 33 #include "wtf/dtoa.h" |
34 #include "wtf/text/StringBuilder.h" | 34 #include "wtf/text/StringBuilder.h" |
35 | 35 |
36 using namespace std; | 36 using namespace std; |
37 | 37 |
38 namespace WebCore { | 38 namespace WebCore { |
39 | 39 |
40 #if !COMPILER(MSVC) | 40 #if !COMPILER(MSVC) || COMPILER(CLANG) |
| 41 // FIXME: Use C++11 strong enums to avoid static data member with initializer de
finition problems. |
41 const RGBA32 Color::black; | 42 const RGBA32 Color::black; |
42 const RGBA32 Color::white; | 43 const RGBA32 Color::white; |
43 const RGBA32 Color::darkGray; | 44 const RGBA32 Color::darkGray; |
44 const RGBA32 Color::gray; | 45 const RGBA32 Color::gray; |
45 const RGBA32 Color::lightGray; | 46 const RGBA32 Color::lightGray; |
46 const RGBA32 Color::transparent; | 47 const RGBA32 Color::transparent; |
47 #endif | 48 #endif |
48 | 49 |
49 static const RGBA32 lightenedBlack = 0xFF545454; | 50 static const RGBA32 lightenedBlack = 0xFF545454; |
50 static const RGBA32 darkenedWhite = 0xFFABABAB; | 51 static const RGBA32 darkenedWhite = 0xFFABABAB; |
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
457 (color.green() * alpha + 254) / 255, | 458 (color.green() * alpha + 254) / 255, |
458 (color.blue() * alpha + 254) / 255, | 459 (color.blue() * alpha + 254) / 255, |
459 alpha).rgb(); | 460 alpha).rgb(); |
460 } else | 461 } else |
461 pixelColor = color.rgb(); | 462 pixelColor = color.rgb(); |
462 | 463 |
463 return pixelColor; | 464 return pixelColor; |
464 } | 465 } |
465 | 466 |
466 } // namespace WebCore | 467 } // namespace WebCore |
OLD | NEW |