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 957 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
968 | 968 |
969 TextRunPaintInfo subrunInfo(subrun); | 969 TextRunPaintInfo subrunInfo(subrun); |
970 subrunInfo.bounds = runInfo.bounds; | 970 subrunInfo.bounds = runInfo.bounds; |
971 font.drawText(this, subrunInfo, currPoint, customFontNotReadyAction); | 971 font.drawText(this, subrunInfo, currPoint, customFontNotReadyAction); |
972 | 972 |
973 bidiRun = bidiRun->next(); | 973 bidiRun = bidiRun->next(); |
974 // FIXME: Have Font::drawText return the width of what it drew so that w
e don't have to re-measure here. | 974 // FIXME: Have Font::drawText return the width of what it drew so that w
e don't have to re-measure here. |
975 if (bidiRun) | 975 if (bidiRun) |
976 currPoint.move(font.width(subrun), 0); | 976 currPoint.move(font.width(subrun), 0); |
977 } | 977 } |
978 | |
979 bidiRuns.deleteRuns(); | |
980 } | 978 } |
981 | 979 |
982 void GraphicsContext::drawHighlightForText(const Font& font, const TextRun& run,
const FloatPoint& point, int h, const Color& backgroundColor, int from, int to) | 980 void GraphicsContext::drawHighlightForText(const Font& font, const TextRun& run,
const FloatPoint& point, int h, const Color& backgroundColor, int from, int to) |
983 { | 981 { |
984 if (contextDisabled()) | 982 if (contextDisabled()) |
985 return; | 983 return; |
986 | 984 |
987 fillRect(font.selectionRectForText(run, point, h, from, to), backgroundColor
); | 985 fillRect(font.selectionRectForText(run, point, h, from, to), backgroundColor
); |
988 } | 986 } |
989 | 987 |
(...skipping 906 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1896 // being returned from computeInterpolationQuality. | 1894 // being returned from computeInterpolationQuality. |
1897 resampling = InterpolationLow; | 1895 resampling = InterpolationLow; |
1898 } | 1896 } |
1899 resampling = limitInterpolationQuality(this, resampling); | 1897 resampling = limitInterpolationQuality(this, resampling); |
1900 | 1898 |
1901 bool useBicubicFilter = resampling == InterpolationHigh; | 1899 bool useBicubicFilter = resampling == InterpolationHigh; |
1902 paint->setFilterLevel(convertToSkiaFilterLevel(useBicubicFilter, resampling)
); | 1900 paint->setFilterLevel(convertToSkiaFilterLevel(useBicubicFilter, resampling)
); |
1903 } | 1901 } |
1904 | 1902 |
1905 } | 1903 } |
OLD | NEW |