OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 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 "GrAARectRenderer.h" | 8 #include "GrAARectRenderer.h" |
9 #include "GrGpu.h" | 9 #include "GrGpu.h" |
10 #include "gl/GrGLEffect.h" | 10 #include "gl/GrGLEffect.h" |
11 #include "gl/GrGLVertexEffect.h" | 11 #include "gl/GrGLVertexEffect.h" |
12 #include "GrTBackendEffectFactory.h" | 12 #include "GrTBackendEffectFactory.h" |
13 #include "SkColorPriv.h" | 13 #include "SkColorPriv.h" |
14 #include "effects/GrVertexEffect.h" | 14 #include "effects/GrVertexEffect.h" |
15 | 15 |
16 SK_DEFINE_INST_COUNT(GrAARectRenderer) | |
17 | |
18 /////////////////////////////////////////////////////////////////////////////// | 16 /////////////////////////////////////////////////////////////////////////////// |
19 class GrGLAlignedRectEffect; | 17 class GrGLAlignedRectEffect; |
20 | 18 |
21 // Axis Aligned special case | 19 // Axis Aligned special case |
22 class GrAlignedRectEffect : public GrVertexEffect { | 20 class GrAlignedRectEffect : public GrVertexEffect { |
23 public: | 21 public: |
24 static GrEffectRef* Create() { | 22 static GrEffectRef* Create() { |
25 GR_CREATE_STATIC_EFFECT(gAlignedRectEffect, GrAlignedRectEffect, ()); | 23 GR_CREATE_STATIC_EFFECT(gAlignedRectEffect, GrAlignedRectEffect, ()); |
26 gAlignedRectEffect->ref(); | 24 gAlignedRectEffect->ref(); |
27 return gAlignedRectEffect; | 25 return gAlignedRectEffect; |
(...skipping 897 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
925 combinedMatrix.mapPoints((SkPoint*)&devInside, (const SkPoint*)&rects[1], 2)
; | 923 combinedMatrix.mapPoints((SkPoint*)&devInside, (const SkPoint*)&rects[1], 2)
; |
926 | 924 |
927 if (devInside.isEmpty()) { | 925 if (devInside.isEmpty()) { |
928 this->fillAARect(gpu, target, devOutside, SkMatrix::I(), devOutside, use
VertexCoverage); | 926 this->fillAARect(gpu, target, devOutside, SkMatrix::I(), devOutside, use
VertexCoverage); |
929 return; | 927 return; |
930 } | 928 } |
931 | 929 |
932 this->geometryStrokeAARect(gpu, target, devOutside, devOutsideAssist, | 930 this->geometryStrokeAARect(gpu, target, devOutside, devOutsideAssist, |
933 devInside, useVertexCoverage, true); | 931 devInside, useVertexCoverage, true); |
934 } | 932 } |
OLD | NEW |