| 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 776 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 787 paint->setStrokeCap(m_state->m_lineCap); | 787 paint->setStrokeCap(m_state->m_lineCap); |
| 788 paint->setStrokeJoin(m_state->m_lineJoin); | 788 paint->setStrokeJoin(m_state->m_lineJoin); |
| 789 paint->setStrokeMiter(SkFloatToScalar(m_state->m_miterLimit)); | 789 paint->setStrokeMiter(SkFloatToScalar(m_state->m_miterLimit)); |
| 790 | 790 |
| 791 if (m_state->m_dash) | 791 if (m_state->m_dash) |
| 792 paint->setPathEffect(m_state->m_dash); | 792 paint->setPathEffect(m_state->m_dash); |
| 793 else { | 793 else { |
| 794 switch (m_state->m_strokeStyle) { | 794 switch (m_state->m_strokeStyle) { |
| 795 case NoStroke: | 795 case NoStroke: |
| 796 case SolidStroke: | 796 case SolidStroke: |
| 797 #if ENABLE(CSS3_TEXT) | |
| 798 case DoubleStroke: | 797 case DoubleStroke: |
| 799 case WavyStroke: // FIXME: https://bugs.webkit.org/show_bug.cgi?id=93509
- Needs platform support. | 798 case WavyStroke: // FIXME: https://code.google.com/p/chromium/issues/det
ail?id=229574 |
| 800 #endif // CSS3_TEXT | |
| 801 break; | 799 break; |
| 802 case DashedStroke: | 800 case DashedStroke: |
| 803 width = m_state->m_dashRatio * width; | 801 width = m_state->m_dashRatio * width; |
| 804 // Fall through. | 802 // Fall through. |
| 805 case DottedStroke: | 803 case DottedStroke: |
| 806 // Truncate the width, since we don't want fuzzy dots or dashes. | 804 // Truncate the width, since we don't want fuzzy dots or dashes. |
| 807 int dashLength = static_cast<int>(width); | 805 int dashLength = static_cast<int>(width); |
| 808 // Subtract off the endcaps, since they're rendered separately. | 806 // Subtract off the endcaps, since they're rendered separately. |
| 809 int distance = length - 2 * static_cast<int>(m_state->m_strokeThickn
ess); | 807 int distance = length - 2 * static_cast<int>(m_state->m_strokeThickn
ess); |
| 810 int phase = 1; | 808 int phase = 1; |
| (...skipping 1345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2156 SkPaint paint; | 2154 SkPaint paint; |
| 2157 paint.setXfermodeMode(SkXfermode::kDstIn_Mode); | 2155 paint.setXfermodeMode(SkXfermode::kDstIn_Mode); |
| 2158 realizeSave(SkCanvas::kMatrixClip_SaveFlag); | 2156 realizeSave(SkCanvas::kMatrixClip_SaveFlag); |
| 2159 m_canvas->save(SkCanvas::kMatrix_SaveFlag); | 2157 m_canvas->save(SkCanvas::kMatrix_SaveFlag); |
| 2160 m_canvas->resetMatrix(); | 2158 m_canvas->resetMatrix(); |
| 2161 m_canvas->drawBitmapRect(imageBuffer, 0, rect, &paint); | 2159 m_canvas->drawBitmapRect(imageBuffer, 0, rect, &paint); |
| 2162 m_canvas->restore(); | 2160 m_canvas->restore(); |
| 2163 } | 2161 } |
| 2164 | 2162 |
| 2165 } | 2163 } |
| OLD | NEW |