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" | |
11 #include "GrBatchTarget.h" | 10 #include "GrBatchTarget.h" |
12 #include "GrBatchTest.h" | 11 #include "GrBatchTest.h" |
13 #include "GrCaps.h" | 12 #include "GrCaps.h" |
14 #include "GrGeometryProcessor.h" | 13 #include "GrGeometryProcessor.h" |
15 #include "GrContext.h" | 14 #include "GrContext.h" |
16 #include "GrCoordTransform.h" | 15 #include "GrCoordTransform.h" |
17 #include "GrDefaultGeoProcFactory.h" | 16 #include "GrDefaultGeoProcFactory.h" |
18 #include "GrDrawTarget.h" | 17 #include "GrDrawTarget.h" |
19 #include "GrInvariantOutput.h" | 18 #include "GrInvariantOutput.h" |
20 #include "GrProcessor.h" | 19 #include "GrProcessor.h" |
21 #include "GrStrokeInfo.h" | 20 #include "GrStrokeInfo.h" |
22 #include "GrVertexBuffer.h" | 21 #include "GrVertexBuffer.h" |
23 #include "SkGr.h" | 22 #include "SkGr.h" |
| 23 #include "batches/GrBatch.h" |
24 #include "gl/GrGLGeometryProcessor.h" | 24 #include "gl/GrGLGeometryProcessor.h" |
25 #include "gl/GrGLFragmentProcessor.h" | 25 #include "gl/GrGLFragmentProcessor.h" |
26 #include "gl/builders/GrGLProgramBuilder.h" | 26 #include "gl/builders/GrGLProgramBuilder.h" |
27 | 27 |
28 /////////////////////////////////////////////////////////////////////////////// | 28 /////////////////////////////////////////////////////////////////////////////// |
29 | 29 |
30 // Returns whether or not the gpu can fast path the dash line effect. | 30 // Returns whether or not the gpu can fast path the dash line effect. |
31 bool GrDashingEffect::CanDrawDashLine(const SkPoint pts[2], const GrStrokeInfo&
strokeInfo, | 31 bool GrDashingEffect::CanDrawDashLine(const SkPoint pts[2], const GrStrokeInfo&
strokeInfo, |
32 const SkMatrix& viewMatrix) { | 32 const SkMatrix& viewMatrix) { |
33 // Pts must be either horizontal or vertical in src space | 33 // Pts must be either horizontal or vertical in src space |
(...skipping 1263 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 |