| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2012 Google Inc. | 3 * Copyright 2012 Google Inc. |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 #include "GrAAConvexPathRenderer.h" | 9 #include "GrAAConvexPathRenderer.h" |
| 10 | 10 |
| (...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 501 * window space (y-down). If either the third or fourth component of the interpo
lated | 501 * window space (y-down). If either the third or fourth component of the interpo
lated |
| 502 * vertex coord is > 0 then the pixel is considered outside the edge. This is us
ed to | 502 * vertex coord is > 0 then the pixel is considered outside the edge. This is us
ed to |
| 503 * attempt to trim to a portion of the infinite quad. | 503 * attempt to trim to a portion of the infinite quad. |
| 504 * Requires shader derivative instruction support. | 504 * Requires shader derivative instruction support. |
| 505 */ | 505 */ |
| 506 | 506 |
| 507 class QuadEdgeEffect : public GrGeometryProcessor { | 507 class QuadEdgeEffect : public GrGeometryProcessor { |
| 508 public: | 508 public: |
| 509 | 509 |
| 510 static GrGeometryProcessor* Create() { | 510 static GrGeometryProcessor* Create() { |
| 511 GR_CREATE_STATIC_GEOMETRY_PROCESSOR(gQuadEdgeEffect, QuadEdgeEffect, ())
; | 511 GR_CREATE_STATIC_PROCESSOR(gQuadEdgeEffect, QuadEdgeEffect, ()); |
| 512 gQuadEdgeEffect->ref(); | 512 gQuadEdgeEffect->ref(); |
| 513 return gQuadEdgeEffect; | 513 return gQuadEdgeEffect; |
| 514 } | 514 } |
| 515 | 515 |
| 516 virtual ~QuadEdgeEffect() {} | 516 virtual ~QuadEdgeEffect() {} |
| 517 | 517 |
| 518 static const char* Name() { return "QuadEdge"; } | 518 static const char* Name() { return "QuadEdge"; } |
| 519 | 519 |
| 520 const GrShaderVar& inQuadEdge() const { return fInQuadEdge; } | 520 const GrShaderVar& inQuadEdge() const { return fInQuadEdge; } |
| 521 | 521 |
| (...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 712 vOffset, // start vertex | 712 vOffset, // start vertex |
| 713 0, // start index | 713 0, // start index |
| 714 draw.fVertexCnt, | 714 draw.fVertexCnt, |
| 715 draw.fIndexCnt, | 715 draw.fIndexCnt, |
| 716 &devBounds); | 716 &devBounds); |
| 717 vOffset += draw.fVertexCnt; | 717 vOffset += draw.fVertexCnt; |
| 718 } | 718 } |
| 719 | 719 |
| 720 return true; | 720 return true; |
| 721 } | 721 } |
| OLD | NEW |