| 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/GrGLFragmentProcessor.h" |
| 12 #include "gl/builders/GrGLProgramBuilder.h" | 12 #include "gl/builders/GrGLProgramBuilder.h" |
| 13 | 13 |
| 14 ////////////////////////////////////////////////////////////////////////////// | 14 ////////////////////////////////////////////////////////////////////////////// |
| 15 class AARectEffect : public GrFragmentProcessor { | 15 class AARectEffect : public GrFragmentProcessor { |
| 16 public: | 16 public: |
| 17 const SkRect& getRect() const { return fRect; } | 17 const SkRect& getRect() const { return fRect; } |
| 18 | 18 |
| 19 static GrFragmentProcessor* Create(GrPrimitiveEdgeType edgeType, const SkRec
t& rect) { | 19 static GrFragmentProcessor* Create(GrPrimitiveEdgeType edgeType, const SkRec
t& rect) { |
| 20 return SkNEW_ARGS(AARectEffect, (edgeType, rect)); | 20 return SkNEW_ARGS(AARectEffect, (edgeType, rect)); |
| 21 } | 21 } |
| (...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 365 } | 365 } |
| 366 | 366 |
| 367 GrFragmentProcessor* fp; | 367 GrFragmentProcessor* fp; |
| 368 do { | 368 do { |
| 369 GrPrimitiveEdgeType edgeType = static_cast<GrPrimitiveEdgeType>( | 369 GrPrimitiveEdgeType edgeType = static_cast<GrPrimitiveEdgeType>( |
| 370 d->fRandom->nextULessThan(kGrProcessorEdgeTypeCnt)); | 370 d->fRandom->nextULessThan(kGrProcessorEdgeTypeCnt)); |
| 371 fp = GrConvexPolyEffect::Create(edgeType, count, edges); | 371 fp = GrConvexPolyEffect::Create(edgeType, count, edges); |
| 372 } while (NULL == fp); | 372 } while (NULL == fp); |
| 373 return fp; | 373 return fp; |
| 374 } | 374 } |
| OLD | NEW |