| 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 1329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1340 | 1340 |
| 1341 void GraphicsContext::strokePath(const Path& pathToStroke) | 1341 void GraphicsContext::strokePath(const Path& pathToStroke) |
| 1342 { | 1342 { |
| 1343 if (paintingDisabled() || pathToStroke.isEmpty()) | 1343 if (paintingDisabled() || pathToStroke.isEmpty()) |
| 1344 return; | 1344 return; |
| 1345 | 1345 |
| 1346 const SkPath& path = pathToStroke.skPath(); | 1346 const SkPath& path = pathToStroke.skPath(); |
| 1347 drawPath(path, immutableState()->strokePaint()); | 1347 drawPath(path, immutableState()->strokePaint()); |
| 1348 } | 1348 } |
| 1349 | 1349 |
| 1350 void GraphicsContext::strokeRect(const FloatRect& rect) |
| 1351 { |
| 1352 strokeRect(rect, strokeThickness()); |
| 1353 } |
| 1354 |
| 1350 void GraphicsContext::strokeRect(const FloatRect& rect, float lineWidth) | 1355 void GraphicsContext::strokeRect(const FloatRect& rect, float lineWidth) |
| 1351 { | 1356 { |
| 1352 if (paintingDisabled()) | 1357 if (paintingDisabled()) |
| 1353 return; | 1358 return; |
| 1354 | 1359 |
| 1355 SkPaint paint(immutableState()->strokePaint()); | 1360 SkPaint paint(immutableState()->strokePaint()); |
| 1356 paint.setStrokeWidth(WebCoreFloatToSkScalar(lineWidth)); | 1361 paint.setStrokeWidth(WebCoreFloatToSkScalar(lineWidth)); |
| 1357 // Reset the dash effect to account for the width | 1362 // Reset the dash effect to account for the width |
| 1358 immutableState()->strokeData().setupPaintDashPathEffect(&paint, 0); | 1363 immutableState()->strokeData().setupPaintDashPathEffect(&paint, 0); |
| 1359 // strokerect has special rules for CSS when the rect is degenerate: | 1364 // strokerect has special rules for CSS when the rect is degenerate: |
| (...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1880 | 1885 |
| 1881 void GraphicsContext::didDrawTextInRect(const SkRect& textRect) | 1886 void GraphicsContext::didDrawTextInRect(const SkRect& textRect) |
| 1882 { | 1887 { |
| 1883 if (m_trackTextRegion) { | 1888 if (m_trackTextRegion) { |
| 1884 TRACE_EVENT0("skia", "PlatformContextSkia::trackTextRegion"); | 1889 TRACE_EVENT0("skia", "PlatformContextSkia::trackTextRegion"); |
| 1885 m_textRegion.join(textRect); | 1890 m_textRegion.join(textRect); |
| 1886 } | 1891 } |
| 1887 } | 1892 } |
| 1888 | 1893 |
| 1889 } | 1894 } |
| OLD | NEW |