| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #include "GrDashingEffect.h" | 8 #include "GrDashingEffect.h" |
| 9 | 9 |
| 10 #include "GrBatch.h" | 10 #include "GrBatch.h" |
| (...skipping 581 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 592 } else { | 592 } else { |
| 593 SkPoint* verts = reinterpret_cast<SkPoint*>(vertices); | 593 SkPoint* verts = reinterpret_cast<SkPoint*>(vertices); |
| 594 SkASSERT(gp->getVertexStride() == sizeof(SkPoint)); | 594 SkASSERT(gp->getVertexStride() == sizeof(SkPoint)); |
| 595 setup_dashed_rect_pos(rects[rectIndex], curVIdx, geom.fSrcRo
tInv, verts); | 595 setup_dashed_rect_pos(rects[rectIndex], curVIdx, geom.fSrcRo
tInv, verts); |
| 596 } | 596 } |
| 597 curVIdx += 4; | 597 curVIdx += 4; |
| 598 } | 598 } |
| 599 rectIndex++; | 599 rectIndex++; |
| 600 } | 600 } |
| 601 SkASSERT(0 == (curVIdx % 4) && (curVIdx / 4) == totalRectCount); | 601 SkASSERT(0 == (curVIdx % 4) && (curVIdx / 4) == totalRectCount); |
| 602 helper.issueDraws(batchTarget); | 602 helper.issueDraw(batchTarget); |
| 603 } | 603 } |
| 604 | 604 |
| 605 SkSTArray<1, Geometry, true>* geoData() { return &fGeoData; } | 605 SkSTArray<1, Geometry, true>* geoData() { return &fGeoData; } |
| 606 | 606 |
| 607 private: | 607 private: |
| 608 DashBatch(const Geometry& geometry, SkPaint::Cap cap, DashAAMode aaMode, boo
l fullDash) { | 608 DashBatch(const Geometry& geometry, SkPaint::Cap cap, DashAAMode aaMode, boo
l fullDash) { |
| 609 this->initClassID<DashBatch>(); | 609 this->initClassID<DashBatch>(); |
| 610 fGeoData.push_back(geometry); | 610 fGeoData.push_back(geometry); |
| 611 | 611 |
| 612 fBatch.fAAMode = aaMode; | 612 fBatch.fAAMode = aaMode; |
| (...skipping 730 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1343 info.fIntervals = intervals; | 1343 info.fIntervals = intervals; |
| 1344 info.fCount = 2; | 1344 info.fCount = 2; |
| 1345 info.fPhase = phase; | 1345 info.fPhase = phase; |
| 1346 SkDEBUGCODE(bool success = ) strokeInfo.setDashInfo(info); | 1346 SkDEBUGCODE(bool success = ) strokeInfo.setDashInfo(info); |
| 1347 SkASSERT(success); | 1347 SkASSERT(success); |
| 1348 | 1348 |
| 1349 return create_batch(color, viewMatrix, pts, useAA, strokeInfo, msaaRT); | 1349 return create_batch(color, viewMatrix, pts, useAA, strokeInfo, msaaRT); |
| 1350 } | 1350 } |
| 1351 | 1351 |
| 1352 #endif | 1352 #endif |
| OLD | NEW |