aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrAAHairLinePathRenderer.cpp
diff options
context:
space:
mode:
authorGravatar egdaniel <egdaniel@google.com>2014-08-28 05:41:14 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2014-08-28 05:41:14 -0700
commit7b3d5ee72c2238aa239bce4d5b3aea98a437ca7a (patch)
treeb1d226cbbf2572337c494e3cc72ca83d628e4787 /src/gpu/GrAAHairLinePathRenderer.cpp
parent90e8457ab32bcc14b15876144ca47489d7b836ce (diff)
Make setVertexAttribs in GrDrawState take a stride parameter.
BUG=skia: Committed: https://skia.googlesource.com/skia/+/af013bf8afc4c77ab8ff230f536e2ade973427fa R=bsalomon@google.com Author: egdaniel@google.com Review URL: https://codereview.chromium.org/511593004
Diffstat (limited to 'src/gpu/GrAAHairLinePathRenderer.cpp')
-rw-r--r--src/gpu/GrAAHairLinePathRenderer.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gpu/GrAAHairLinePathRenderer.cpp b/src/gpu/GrAAHairLinePathRenderer.cpp
index d5ff40d955..2114720f34 100644
--- a/src/gpu/GrAAHairLinePathRenderer.cpp
+++ b/src/gpu/GrAAHairLinePathRenderer.cpp
@@ -731,8 +731,8 @@ bool GrAAHairLinePathRenderer::createLineGeom(const SkPath& path,
int vertCnt = kVertsPerLineSeg * lineCnt;
- drawState->setVertexAttribs<gHairlineLineAttribs>(SK_ARRAY_COUNT(gHairlineLineAttribs));
- SkASSERT(sizeof(LineVertex) == drawState->getVertexSize());
+ drawState->setVertexAttribs<gHairlineLineAttribs>(SK_ARRAY_COUNT(gHairlineLineAttribs),
+ sizeof(LineVertex));
if (!arg->set(target, vertCnt, 0)) {
return false;
@@ -778,8 +778,8 @@ bool GrAAHairLinePathRenderer::createBezierGeom(
int vertCnt = kVertsPerQuad * quadCnt + kVertsPerQuad * conicCnt;
- target->drawState()->setVertexAttribs<gHairlineBezierAttribs>(SK_ARRAY_COUNT(gHairlineBezierAttribs));
- SkASSERT(sizeof(BezierVertex) == target->getDrawState().getVertexSize());
+ int vAttribCnt = SK_ARRAY_COUNT(gHairlineBezierAttribs);
+ target->drawState()->setVertexAttribs<gHairlineBezierAttribs>(vAttribCnt, sizeof(BezierVertex));
if (!arg->set(target, vertCnt, 0)) {
return false;