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

Unified Diff: WebCore/platform/graphics/skia/PlatformContextSkia.cpp

Issue 20163: Don't try to force dotted lines to have a dot on both ends.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/third_party/WebKit/
Patch Set: Created 11 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: WebCore/platform/graphics/skia/PlatformContextSkia.cpp
===================================================================
--- WebCore/platform/graphics/skia/PlatformContextSkia.cpp (revision 9357)
+++ WebCore/platform/graphics/skia/PlatformContextSkia.cpp (working copy)
@@ -311,17 +311,7 @@
width = m_state->m_dashRatio * width;
// Fall through.
case WebCore::DottedStroke:
- SkScalar dashLength;
- if (length) {
- // Determine about how many dashes or dots we should have.
- int numDashes = length / roundf(width);
- if (!(numDashes & 1))
- numDashes++; // Make it odd so we end on a dash/dot.
- // Use the number of dashes to determine the length of a
- // dash/dot, which will be approximately width
- dashLength = SkScalarDiv(SkIntToScalar(length), SkIntToScalar(numDashes));
- } else
- dashLength = SkFloatToScalar(width);
+ SkScalar dashLength = SkFloatToScalar(width);
SkScalar intervals[2] = { dashLength, dashLength };
paint->setPathEffect(new SkDashPathEffect(intervals, 2, 0))->unref();
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698