OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2003, 2004, 2005, 2006, 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2003, 2004, 2005, 2006, 2009 Apple Inc. All rights reserved. |
3 * Copyright (C) 2013 Google Inc. All rights reserved. | 3 * Copyright (C) 2013 Google Inc. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 1865 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1876 row2[x] = lineColor; | 1876 row2[x] = lineColor; |
1877 break; | 1877 break; |
1878 case 3: | 1878 case 3: |
1879 row1[x] = antiColor; | 1879 row1[x] = antiColor; |
1880 row2[x] = antiColor; | 1880 row2[x] = antiColor; |
1881 break; | 1881 break; |
1882 } | 1882 } |
1883 } | 1883 } |
1884 } | 1884 } |
1885 | 1885 |
1886 const SkPMColor GraphicsContext::lineColors(int index) | 1886 SkPMColor GraphicsContext::lineColors(int index) |
1887 { | 1887 { |
1888 static const SkPMColor colors[] = { | 1888 static const SkPMColor colors[] = { |
1889 SkPreMultiplyARGB(0xFF, 0xFF, 0x00, 0x00), // Opaque red. | 1889 SkPreMultiplyARGB(0xFF, 0xFF, 0x00, 0x00), // Opaque red. |
1890 SkPreMultiplyARGB(0xFF, 0xC0, 0xC0, 0xC0) // Opaque gray. | 1890 SkPreMultiplyARGB(0xFF, 0xC0, 0xC0, 0xC0) // Opaque gray. |
1891 }; | 1891 }; |
1892 | 1892 |
1893 return colors[index]; | 1893 return colors[index]; |
1894 } | 1894 } |
1895 | 1895 |
1896 const SkPMColor GraphicsContext::antiColors1(int index) | 1896 SkPMColor GraphicsContext::antiColors1(int index) |
1897 { | 1897 { |
1898 static const SkPMColor colors[] = { | 1898 static const SkPMColor colors[] = { |
1899 SkPreMultiplyARGB(0xB0, 0xFF, 0x00, 0x00), // Semitransparent red. | 1899 SkPreMultiplyARGB(0xB0, 0xFF, 0x00, 0x00), // Semitransparent red. |
1900 SkPreMultiplyARGB(0xB0, 0xC0, 0xC0, 0xC0) // Semitransparent gray. | 1900 SkPreMultiplyARGB(0xB0, 0xC0, 0xC0, 0xC0) // Semitransparent gray. |
1901 }; | 1901 }; |
1902 | 1902 |
1903 return colors[index]; | 1903 return colors[index]; |
1904 } | 1904 } |
1905 | 1905 |
1906 const SkPMColor GraphicsContext::antiColors2(int index) | 1906 SkPMColor GraphicsContext::antiColors2(int index) |
1907 { | 1907 { |
1908 static const SkPMColor colors[] = { | 1908 static const SkPMColor colors[] = { |
1909 SkPreMultiplyARGB(0x60, 0xFF, 0x00, 0x00), // More transparent red | 1909 SkPreMultiplyARGB(0x60, 0xFF, 0x00, 0x00), // More transparent red |
1910 SkPreMultiplyARGB(0x60, 0xC0, 0xC0, 0xC0) // More transparent gray | 1910 SkPreMultiplyARGB(0x60, 0xC0, 0xC0, 0xC0) // More transparent gray |
1911 }; | 1911 }; |
1912 | 1912 |
1913 return colors[index]; | 1913 return colors[index]; |
1914 } | 1914 } |
1915 #endif | 1915 #endif |
1916 | 1916 |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1961 // FIXME: This is to not break tests (it results in the filter bitmap fl
ag | 1961 // FIXME: This is to not break tests (it results in the filter bitmap fl
ag |
1962 // being set to true). We need to decide if we respect InterpolationNone | 1962 // being set to true). We need to decide if we respect InterpolationNone |
1963 // being returned from computeInterpolationQuality. | 1963 // being returned from computeInterpolationQuality. |
1964 resampling = InterpolationLow; | 1964 resampling = InterpolationLow; |
1965 } | 1965 } |
1966 resampling = limitInterpolationQuality(this, resampling); | 1966 resampling = limitInterpolationQuality(this, resampling); |
1967 paint->setFilterLevel(static_cast<SkPaint::FilterLevel>(resampling)); | 1967 paint->setFilterLevel(static_cast<SkPaint::FilterLevel>(resampling)); |
1968 } | 1968 } |
1969 | 1969 |
1970 } // namespace blink | 1970 } // namespace blink |
OLD | NEW |