| 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" |
| 11 #include "GrBatchTarget.h" | 11 #include "GrBatchTarget.h" |
| 12 #include "GrBufferAllocPool.h" | 12 #include "GrBufferAllocPool.h" |
| 13 #include "GrGeometryProcessor.h" | 13 #include "GrGeometryProcessor.h" |
| 14 #include "GrContext.h" | 14 #include "GrContext.h" |
| 15 #include "GrCoordTransform.h" | 15 #include "GrCoordTransform.h" |
| 16 #include "GrDefaultGeoProcFactory.h" | 16 #include "GrDefaultGeoProcFactory.h" |
| 17 #include "GrDrawTarget.h" | 17 #include "GrDrawTarget.h" |
| 18 #include "GrDrawTargetCaps.h" | 18 #include "GrDrawTargetCaps.h" |
| 19 #include "GrInvariantOutput.h" | 19 #include "GrInvariantOutput.h" |
| 20 #include "GrProcessor.h" | 20 #include "GrProcessor.h" |
| 21 #include "GrStrokeInfo.h" | 21 #include "GrStrokeInfo.h" |
| 22 #include "GrVertexBuffer.h" |
| 22 #include "SkGr.h" | 23 #include "SkGr.h" |
| 23 #include "gl/GrGLGeometryProcessor.h" | 24 #include "gl/GrGLGeometryProcessor.h" |
| 24 #include "gl/GrGLProcessor.h" | 25 #include "gl/GrGLProcessor.h" |
| 25 #include "gl/GrGLSL.h" | 26 #include "gl/GrGLSL.h" |
| 26 #include "gl/builders/GrGLProgramBuilder.h" | 27 #include "gl/builders/GrGLProgramBuilder.h" |
| 27 | 28 |
| 28 /////////////////////////////////////////////////////////////////////////////// | 29 /////////////////////////////////////////////////////////////////////////////// |
| 29 | 30 |
| 30 // Returns whether or not the gpu can fast path the dash line effect. | 31 // Returns whether or not the gpu can fast path the dash line effect. |
| 31 bool GrDashingEffect::CanDrawDashLine(const SkPoint pts[2], const GrStrokeInfo&
strokeInfo, | 32 bool GrDashingEffect::CanDrawDashLine(const SkPoint pts[2], const GrStrokeInfo&
strokeInfo, |
| (...skipping 1240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1272 switch (cap) { | 1273 switch (cap) { |
| 1273 case kRound_DashCap: | 1274 case kRound_DashCap: |
| 1274 return DashingCircleEffect::Create(color, dashAAMode, localMatrix); | 1275 return DashingCircleEffect::Create(color, dashAAMode, localMatrix); |
| 1275 case kNonRound_DashCap: | 1276 case kNonRound_DashCap: |
| 1276 return DashingLineEffect::Create(color, dashAAMode, localMatrix); | 1277 return DashingLineEffect::Create(color, dashAAMode, localMatrix); |
| 1277 default: | 1278 default: |
| 1278 SkFAIL("Unexpected dashed cap."); | 1279 SkFAIL("Unexpected dashed cap."); |
| 1279 } | 1280 } |
| 1280 return NULL; | 1281 return NULL; |
| 1281 } | 1282 } |
| OLD | NEW |