aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm
diff options
context:
space:
mode:
Diffstat (limited to 'gm')
-rw-r--r--gm/beziereffects.cpp17
-rw-r--r--gm/convexpolyeffect.cpp5
2 files changed, 13 insertions, 9 deletions
diff --git a/gm/beziereffects.cpp b/gm/beziereffects.cpp
index 7f7bf8ffb7..dea6150549 100644
--- a/gm/beziereffects.cpp
+++ b/gm/beziereffects.cpp
@@ -91,13 +91,14 @@ private:
void onPrepareDraws(Target* target) override {
QuadHelper helper;
- SkASSERT(this->gp()->debugOnly_vertexStride() == sizeof(SkPoint));
- SkPoint* pts = reinterpret_cast<SkPoint*>(helper.init(target, sizeof(SkPoint), 1));
+ size_t vertexStride = this->gp()->getVertexStride();
+ SkASSERT(vertexStride == sizeof(SkPoint));
+ SkPoint* pts = reinterpret_cast<SkPoint*>(helper.init(target, vertexStride, 1));
if (!pts) {
return;
}
SkRect rect = this->rect();
- SkPointPriv::SetRectTriStrip(pts, rect, sizeof(SkPoint));
+ SkPointPriv::SetRectTriStrip(pts, rect, vertexStride);
helper.recordDraw(target, this->gp(), this->makePipeline(target));
}
@@ -281,8 +282,9 @@ private:
void onPrepareDraws(Target* target) override {
QuadHelper helper;
- SkASSERT(this->gp()->debugOnly_vertexStride() == sizeof(Vertex));
- Vertex* verts = reinterpret_cast<Vertex*>(helper.init(target, sizeof(Vertex), 1));
+ size_t vertexStride = this->gp()->getVertexStride();
+ SkASSERT(vertexStride == sizeof(Vertex));
+ Vertex* verts = reinterpret_cast<Vertex*>(helper.init(target, vertexStride, 1));
if (!verts) {
return;
}
@@ -500,8 +502,9 @@ private:
void onPrepareDraws(Target* target) override {
QuadHelper helper;
- SkASSERT(this->gp()->debugOnly_vertexStride() == sizeof(Vertex));
- Vertex* verts = reinterpret_cast<Vertex*>(helper.init(target, sizeof(Vertex), 1));
+ size_t vertexStride = this->gp()->getVertexStride();
+ SkASSERT(vertexStride == sizeof(Vertex));
+ Vertex* verts = reinterpret_cast<Vertex*>(helper.init(target, vertexStride, 1));
if (!verts) {
return;
}
diff --git a/gm/convexpolyeffect.cpp b/gm/convexpolyeffect.cpp
index da3d0657ae..8f8d1b4d50 100644
--- a/gm/convexpolyeffect.cpp
+++ b/gm/convexpolyeffect.cpp
@@ -81,9 +81,10 @@ private:
sk_sp<GrGeometryProcessor> gp(GrDefaultGeoProcFactory::Make(
color, Coverage::kSolid_Type, LocalCoords::kUnused_Type, SkMatrix::I()));
- SkASSERT(gp->debugOnly_vertexStride() == sizeof(SkPoint));
+ size_t vertexStride = gp->getVertexStride();
+ SkASSERT(vertexStride == sizeof(SkPoint));
QuadHelper helper;
- SkPoint* verts = reinterpret_cast<SkPoint*>(helper.init(target, sizeof(SkPoint), 1));
+ SkPoint* verts = reinterpret_cast<SkPoint*>(helper.init(target, vertexStride, 1));
if (!verts) {
return;
}