OSDN Git Service

Make points drawn with default paint visible
authorRob Tsuk <robtsuk@google.com>
Tue, 4 Nov 2014 00:29:03 +0000 (16:29 -0800)
committerRob Tsuk <robtsuk@google.com>
Tue, 4 Nov 2014 00:31:45 +0000 (00:31 +0000)
When no stroke width is set, use 0.5 instead of 0.25 to make
sure the resulting rectangle spans at least one pixel.

Bug: 15455111
Change-Id: Id0a4b6d014c542ffc98b13a032f88ae0ce69b3a1

libs/hwui/PathTessellator.cpp

index 281ca02..27ef06f 100644 (file)
@@ -812,7 +812,7 @@ void PathTessellator::tessellatePoints(const float* points, int count, const SkP
     // determine point shape
     SkPath path;
     float radius = paintInfo.halfStrokeWidth;
-    if (radius == 0.0f) radius = 0.25f;
+    if (radius == 0.0f) radius = 0.5f;
 
     if (paintInfo.cap == SkPaint::kRound_Cap) {
         path.addCircle(0, 0, radius);