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 710 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
721 geometry.fColor = color; | 721 geometry.fColor = color; |
722 geometry.fViewMatrix = viewMatrix; | 722 geometry.fViewMatrix = viewMatrix; |
723 geometry.fPhase = phase; | 723 geometry.fPhase = phase; |
724 geometry.fIntervals[0] = intervals[0]; | 724 geometry.fIntervals[0] = intervals[0]; |
725 geometry.fIntervals[1] = intervals[1]; | 725 geometry.fIntervals[1] = intervals[1]; |
726 | 726 |
727 return DashBatch::Create(geometry, cap, aaMode, fullDash); | 727 return DashBatch::Create(geometry, cap, aaMode, fullDash); |
728 } | 728 } |
729 | 729 |
730 bool GrDashingEffect::DrawDashLine(GrDrawTarget* target, | 730 bool GrDashingEffect::DrawDashLine(GrDrawTarget* target, |
731 GrPipelineBuilder* pipelineBuilder, GrColor c
olor, | 731 const GrPipelineBuilder& pipelineBuilder, GrC
olor color, |
732 const SkMatrix& viewMatrix, const SkPoint pts
[2], | 732 const SkMatrix& viewMatrix, const SkPoint pts
[2], |
733 bool useAA, const GrStrokeInfo& strokeInfo) { | 733 bool useAA, const GrStrokeInfo& strokeInfo) { |
734 SkAutoTUnref<GrBatch> batch(create_batch(color, viewMatrix, pts, useAA, stro
keInfo, | 734 SkAutoTUnref<GrBatch> batch( |
735 pipelineBuilder->getRenderTarget()->isUnifie
dMultisampled())); | 735 create_batch(color, viewMatrix, pts, useAA, strokeInfo, |
| 736 pipelineBuilder.getRenderTarget()->isUnifiedMultisample
d())); |
736 if (!batch) { | 737 if (!batch) { |
737 return false; | 738 return false; |
738 } | 739 } |
739 | 740 |
740 target->drawBatch(pipelineBuilder, batch); | 741 target->drawBatch(pipelineBuilder, batch); |
741 return true; | 742 return true; |
742 } | 743 } |
743 | 744 |
744 ////////////////////////////////////////////////////////////////////////////// | 745 ////////////////////////////////////////////////////////////////////////////// |
745 | 746 |
(...skipping 544 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1290 info.fIntervals = intervals; | 1291 info.fIntervals = intervals; |
1291 info.fCount = 2; | 1292 info.fCount = 2; |
1292 info.fPhase = phase; | 1293 info.fPhase = phase; |
1293 SkDEBUGCODE(bool success = ) strokeInfo.setDashInfo(info); | 1294 SkDEBUGCODE(bool success = ) strokeInfo.setDashInfo(info); |
1294 SkASSERT(success); | 1295 SkASSERT(success); |
1295 | 1296 |
1296 return create_batch(color, viewMatrix, pts, useAA, strokeInfo, msaaRT); | 1297 return create_batch(color, viewMatrix, pts, useAA, strokeInfo, msaaRT); |
1297 } | 1298 } |
1298 | 1299 |
1299 #endif | 1300 #endif |
OLD | NEW |