| 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 716 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 727 geometry.fIntervals[1] = intervals[1]; | 727 geometry.fIntervals[1] = intervals[1]; |
| 728 | 728 |
| 729 return DashBatch::Create(geometry, cap, aaMode, fullDash); | 729 return DashBatch::Create(geometry, cap, aaMode, fullDash); |
| 730 } | 730 } |
| 731 | 731 |
| 732 bool GrDashingEffect::DrawDashLine(GrDrawTarget* target, | 732 bool GrDashingEffect::DrawDashLine(GrDrawTarget* target, |
| 733 GrPipelineBuilder* pipelineBuilder, GrColor c
olor, | 733 GrPipelineBuilder* pipelineBuilder, GrColor c
olor, |
| 734 const SkMatrix& viewMatrix, const SkPoint pts
[2], | 734 const SkMatrix& viewMatrix, const SkPoint pts
[2], |
| 735 bool useAA, const GrStrokeInfo& strokeInfo) { | 735 bool useAA, const GrStrokeInfo& strokeInfo) { |
| 736 SkAutoTUnref<GrBatch> batch(create_batch(color, viewMatrix, pts, useAA, stro
keInfo, | 736 SkAutoTUnref<GrBatch> batch(create_batch(color, viewMatrix, pts, useAA, stro
keInfo, |
| 737 pipelineBuilder->getRenderTarget()-
>isMultisampled())); | 737 pipelineBuilder->getRenderTarget()->isUnifie
dMultisampled())); |
| 738 if (!batch) { | 738 if (!batch) { |
| 739 return false; | 739 return false; |
| 740 } | 740 } |
| 741 | 741 |
| 742 target->drawBatch(pipelineBuilder, batch); | 742 target->drawBatch(pipelineBuilder, batch); |
| 743 return true; | 743 return true; |
| 744 } | 744 } |
| 745 | 745 |
| 746 ////////////////////////////////////////////////////////////////////////////// | 746 ////////////////////////////////////////////////////////////////////////////// |
| 747 | 747 |
| (...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1297 info.fIntervals = intervals; | 1297 info.fIntervals = intervals; |
| 1298 info.fCount = 2; | 1298 info.fCount = 2; |
| 1299 info.fPhase = phase; | 1299 info.fPhase = phase; |
| 1300 SkDEBUGCODE(bool success = ) strokeInfo.setDashInfo(info); | 1300 SkDEBUGCODE(bool success = ) strokeInfo.setDashInfo(info); |
| 1301 SkASSERT(success); | 1301 SkASSERT(success); |
| 1302 | 1302 |
| 1303 return create_batch(color, viewMatrix, pts, useAA, strokeInfo, msaaRT); | 1303 return create_batch(color, viewMatrix, pts, useAA, strokeInfo, msaaRT); |
| 1304 } | 1304 } |
| 1305 | 1305 |
| 1306 #endif | 1306 #endif |
| OLD | NEW |