| Index: src/gpu/SkGpuDevice.cpp
|
| diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp
|
| index 517f082a4206c38538a5b14b4668585add722f7d..1d8287c49c158a9c023389932b80bcc9671a1f06 100644
|
| --- a/src/gpu/SkGpuDevice.cpp
|
| +++ b/src/gpu/SkGpuDevice.cpp
|
| @@ -23,6 +23,7 @@
|
| #include "SkColorFilter.h"
|
| #include "SkDeviceImageFilterProxy.h"
|
| #include "SkDrawProcs.h"
|
| +#include "SkVertState.h"
|
| #include "SkGlyphCache.h"
|
| #include "SkImageFilter.h"
|
| #include "SkMaskFilter.h"
|
| @@ -1730,6 +1731,31 @@ void SkGpuDevice::drawVertices(const SkDraw& draw, SkCanvas::VertexMode vmode,
|
| const SkPaint& paint) {
|
| CHECK_SHOULD_DRAW(draw, false);
|
|
|
| + // If both textures and vertex-colors are NULL, strokes hairlines with the paint's color.
|
| + if ((NULL == texs || NULL == paint.getShader()) && NULL == colors) {
|
| + texs = NULL;
|
| + SkPaint copy(paint);
|
| + copy.setStyle(SkPaint::kStroke_Style);
|
| + copy.setStrokeWidth(0);
|
| +
|
| + VertState state(vertexCount, indices, indexCount);
|
| + VertState::Proc vertProc = state.chooseProc(vmode);
|
| +
|
| + SkPoint* pts = new SkPoint[vertexCount * 6];
|
| + int i = 0;
|
| + while (vertProc(&state)) {
|
| + pts[i] = vertices[state.f0];
|
| + pts[i + 1] = vertices[state.f1];
|
| + pts[i + 2] = vertices[state.f1];
|
| + pts[i + 3] = vertices[state.f2];
|
| + pts[i + 4] = vertices[state.f2];
|
| + pts[i + 5] = vertices[state.f0];
|
| + i += 6;
|
| + }
|
| + draw.drawPoints(SkCanvas::kLines_PointMode, vertexCount * 6, pts, copy, true);
|
| + return;
|
| + }
|
| +
|
| GrPaint grPaint;
|
| // we ignore the shader if texs is null.
|
| if (NULL == texs) {
|
|
|