| 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 602 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 613 fBounds.set(geometry.fPtsRot[0], geometry.fPtsRot[1]); | 613 fBounds.set(geometry.fPtsRot[0], geometry.fPtsRot[1]); |
| 614 fBounds.outset(xBloat, halfStrokeWidth); | 614 fBounds.outset(xBloat, halfStrokeWidth); |
| 615 | 615 |
| 616 // Note, we actually create the combined matrix here, and save the work | 616 // Note, we actually create the combined matrix here, and save the work |
| 617 SkMatrix& combinedMatrix = fGeoData[0].fSrcRotInv; | 617 SkMatrix& combinedMatrix = fGeoData[0].fSrcRotInv; |
| 618 combinedMatrix.postConcat(geometry.fViewMatrix); | 618 combinedMatrix.postConcat(geometry.fViewMatrix); |
| 619 combinedMatrix.mapRect(&fBounds); | 619 combinedMatrix.mapRect(&fBounds); |
| 620 } | 620 } |
| 621 | 621 |
| 622 bool onCombineIfPossible(GrBatch* t) override { | 622 bool onCombineIfPossible(GrBatch* t) override { |
| 623 if (!this->pipeline()->isEqual(*t->pipeline())) { |
| 624 return false; |
| 625 } |
| 626 |
| 623 DashBatch* that = t->cast<DashBatch>(); | 627 DashBatch* that = t->cast<DashBatch>(); |
| 624 | 628 |
| 625 if (this->aaMode() != that->aaMode()) { | 629 if (this->aaMode() != that->aaMode()) { |
| 626 return false; | 630 return false; |
| 627 } | 631 } |
| 628 | 632 |
| 629 if (this->fullDash() != that->fullDash()) { | 633 if (this->fullDash() != that->fullDash()) { |
| 630 return false; | 634 return false; |
| 631 } | 635 } |
| 632 | 636 |
| (...skipping 658 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1291 info.fIntervals = intervals; | 1295 info.fIntervals = intervals; |
| 1292 info.fCount = 2; | 1296 info.fCount = 2; |
| 1293 info.fPhase = phase; | 1297 info.fPhase = phase; |
| 1294 SkDEBUGCODE(bool success = ) strokeInfo.setDashInfo(info); | 1298 SkDEBUGCODE(bool success = ) strokeInfo.setDashInfo(info); |
| 1295 SkASSERT(success); | 1299 SkASSERT(success); |
| 1296 | 1300 |
| 1297 return create_batch(color, viewMatrix, pts, useAA, strokeInfo, msaaRT); | 1301 return create_batch(color, viewMatrix, pts, useAA, strokeInfo, msaaRT); |
| 1298 } | 1302 } |
| 1299 | 1303 |
| 1300 #endif | 1304 #endif |
| OLD | NEW |