Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(115)

Side by Side Diff: third_party/WebKit/Source/platform/graphics/StrokeData.cpp

Issue 2398453002: Rewrap comments to 80 columns in Source/platform/graphics/. (Closed)
Patch Set: Review feedback Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/RecordingImageBufferSurfaceTest.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (C) 2013 Google Inc. All rights reserved. 1 // Copyright (C) 2013 Google Inc. All rights reserved.
2 // 2 //
3 // Redistribution and use in source and binary forms, with or without 3 // Redistribution and use in source and binary forms, with or without
4 // modification, are permitted provided that the following conditions are 4 // modification, are permitted provided that the following conditions are
5 // met: 5 // met:
6 // 6 //
7 // * Redistributions of source code must retain the above copyright 7 // * 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 // * Redistributions in binary form must reproduce the above 9 // * Redistributions in binary form must reproduce the above
10 // copyright notice, this list of conditions and the following disclaimer 10 // copyright notice, this list of conditions and the following disclaimer
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 68
69 void StrokeData::setupPaintDashPathEffect(SkPaint* paint, int length) const { 69 void StrokeData::setupPaintDashPathEffect(SkPaint* paint, int length) const {
70 float width = m_thickness; 70 float width = m_thickness;
71 if (m_dash) { 71 if (m_dash) {
72 paint->setPathEffect(m_dash); 72 paint->setPathEffect(m_dash);
73 } else { 73 } else {
74 switch (m_style) { 74 switch (m_style) {
75 case NoStroke: 75 case NoStroke:
76 case SolidStroke: 76 case SolidStroke:
77 case DoubleStroke: 77 case DoubleStroke:
78 case WavyStroke: // FIXME: https://code.google.com/p/chromium/issues/deta il?id=229574 78 case WavyStroke: // FIXME: https://crbug.com/229574
79 paint->setPathEffect(0); 79 paint->setPathEffect(0);
80 return; 80 return;
81 case DashedStroke: 81 case DashedStroke:
82 width = dashRatio * width; 82 width = dashRatio * width;
83 // Fall through. 83 // Fall through.
84 case DottedStroke: 84 case DottedStroke:
85 // Truncate the width, since we don't want fuzzy dots or dashes. 85 // Truncate the width, since we don't want fuzzy dots or dashes.
86 int dashLength = static_cast<int>(width); 86 int dashLength = static_cast<int>(width);
87 // Subtract off the endcaps, since they're rendered separately. 87 // Subtract off the endcaps, since they're rendered separately.
88 int distance = length - 2 * static_cast<int>(m_thickness); 88 int distance = length - 2 * static_cast<int>(m_thickness);
(...skipping 13 matching lines...) Expand all
102 } 102 }
103 SkScalar dashLengthSk = SkIntToScalar(dashLength); 103 SkScalar dashLengthSk = SkIntToScalar(dashLength);
104 SkScalar intervals[2] = {dashLengthSk, dashLengthSk}; 104 SkScalar intervals[2] = {dashLengthSk, dashLengthSk};
105 paint->setPathEffect( 105 paint->setPathEffect(
106 SkDashPathEffect::Make(intervals, 2, SkIntToScalar(phase))); 106 SkDashPathEffect::Make(intervals, 2, SkIntToScalar(phase)));
107 } 107 }
108 } 108 }
109 } 109 }
110 110
111 } // namespace blink 111 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/RecordingImageBufferSurfaceTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698