| 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 "GrConvexPolyEffect.h" | 8 #include "GrConvexPolyEffect.h" |
| 9 | 9 |
| 10 #include "gl/GrGLEffect.h" | 10 #include "gl/GrGLEffect.h" |
| 11 #include "gl/GrGLSL.h" | 11 #include "gl/GrGLSL.h" |
| 12 #include "gl/GrGLVertexEffect.h" | |
| 13 #include "GrTBackendEffectFactory.h" | 12 #include "GrTBackendEffectFactory.h" |
| 14 | 13 |
| 15 #include "SkPath.h" | 14 #include "SkPath.h" |
| 16 | 15 |
| 17 ////////////////////////////////////////////////////////////////////////////// | 16 ////////////////////////////////////////////////////////////////////////////// |
| 18 class GLAARectEffect; | 17 class GLAARectEffect; |
| 19 | 18 |
| 20 class AARectEffect : public GrEffect { | 19 class AARectEffect : public GrEffect { |
| 21 public: | 20 public: |
| 22 typedef GLAARectEffect GLEffect; | 21 typedef GLAARectEffect GLEffect; |
| (...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 323 GrTexture*[]) { | 322 GrTexture*[]) { |
| 324 EdgeType edgeType = static_cast<EdgeType>(random->nextULessThan(kEdgeTypeCnt
)); | 323 EdgeType edgeType = static_cast<EdgeType>(random->nextULessThan(kEdgeTypeCnt
)); |
| 325 int count = random->nextULessThan(kMaxEdges) + 1; | 324 int count = random->nextULessThan(kMaxEdges) + 1; |
| 326 SkScalar edges[kMaxEdges * 3]; | 325 SkScalar edges[kMaxEdges * 3]; |
| 327 for (int i = 0; i < 3 * count; ++i) { | 326 for (int i = 0; i < 3 * count; ++i) { |
| 328 edges[i] = random->nextSScalar1(); | 327 edges[i] = random->nextSScalar1(); |
| 329 } | 328 } |
| 330 | 329 |
| 331 return GrConvexPolyEffect::Create(edgeType, count, edges); | 330 return GrConvexPolyEffect::Create(edgeType, count, edges); |
| 332 } | 331 } |
| OLD | NEW |