| 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 #include "GrInvariantOutput.h" | 9 #include "GrInvariantOutput.h" |
| 10 #include "SkPathPriv.h" | 10 #include "SkPathPriv.h" |
| 11 #include "gl/GrGLProcessor.h" | 11 #include "gl/GrGLProcessor.h" |
| 12 #include "gl/GrGLSL.h" | |
| 13 #include "gl/builders/GrGLProgramBuilder.h" | 12 #include "gl/builders/GrGLProgramBuilder.h" |
| 14 | 13 |
| 15 ////////////////////////////////////////////////////////////////////////////// | 14 ////////////////////////////////////////////////////////////////////////////// |
| 16 class AARectEffect : public GrFragmentProcessor { | 15 class AARectEffect : public GrFragmentProcessor { |
| 17 public: | 16 public: |
| 18 const SkRect& getRect() const { return fRect; } | 17 const SkRect& getRect() const { return fRect; } |
| 19 | 18 |
| 20 static GrFragmentProcessor* Create(GrPrimitiveEdgeType edgeType, const SkRec
t& rect) { | 19 static GrFragmentProcessor* Create(GrPrimitiveEdgeType edgeType, const SkRec
t& rect) { |
| 21 return SkNEW_ARGS(AARectEffect, (edgeType, rect)); | 20 return SkNEW_ARGS(AARectEffect, (edgeType, rect)); |
| 22 } | 21 } |
| (...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 372 } | 371 } |
| 373 | 372 |
| 374 GrFragmentProcessor* fp; | 373 GrFragmentProcessor* fp; |
| 375 do { | 374 do { |
| 376 GrPrimitiveEdgeType edgeType = static_cast<GrPrimitiveEdgeType>( | 375 GrPrimitiveEdgeType edgeType = static_cast<GrPrimitiveEdgeType>( |
| 377 random->nextULessThan(kGrProcessorEdgeTy
peCnt)); | 376 random->nextULessThan(kGrProcessorEdgeTy
peCnt)); |
| 378 fp = GrConvexPolyEffect::Create(edgeType, count, edges); | 377 fp = GrConvexPolyEffect::Create(edgeType, count, edges); |
| 379 } while (NULL == fp); | 378 } while (NULL == fp); |
| 380 return fp; | 379 return fp; |
| 381 } | 380 } |
| OLD | NEW |