| 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/GrGLContext.h" |
| 11 #include "gl/GrGLFragmentProcessor.h" | 12 #include "gl/GrGLFragmentProcessor.h" |
| 12 #include "gl/builders/GrGLProgramBuilder.h" | 13 #include "gl/builders/GrGLProgramBuilder.h" |
| 13 | 14 |
| 14 ////////////////////////////////////////////////////////////////////////////// | 15 ////////////////////////////////////////////////////////////////////////////// |
| 15 class AARectEffect : public GrFragmentProcessor { | 16 class AARectEffect : public GrFragmentProcessor { |
| 16 public: | 17 public: |
| 17 const SkRect& getRect() const { return fRect; } | 18 const SkRect& getRect() const { return fRect; } |
| 18 | 19 |
| 19 static GrFragmentProcessor* Create(GrPrimitiveEdgeType edgeType, const SkRec
t& rect) { | 20 static GrFragmentProcessor* Create(GrPrimitiveEdgeType edgeType, const SkRec
t& rect) { |
| 20 return new AARectEffect(edgeType, rect); | 21 return new AARectEffect(edgeType, rect); |
| (...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 347 } | 348 } |
| 348 | 349 |
| 349 GrFragmentProcessor* fp; | 350 GrFragmentProcessor* fp; |
| 350 do { | 351 do { |
| 351 GrPrimitiveEdgeType edgeType = static_cast<GrPrimitiveEdgeType>( | 352 GrPrimitiveEdgeType edgeType = static_cast<GrPrimitiveEdgeType>( |
| 352 d->fRandom->nextULessThan(kGrProcessorEdgeTypeCnt)); | 353 d->fRandom->nextULessThan(kGrProcessorEdgeTypeCnt)); |
| 353 fp = GrConvexPolyEffect::Create(edgeType, count, edges); | 354 fp = GrConvexPolyEffect::Create(edgeType, count, edges); |
| 354 } while (nullptr == fp); | 355 } while (nullptr == fp); |
| 355 return fp; | 356 return fp; |
| 356 } | 357 } |
| OLD | NEW |