| 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" |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 virtual bool onIsEqual(const GrEffect&) const SK_OVERRIDE { return true; } | 110 virtual bool onIsEqual(const GrEffect&) const SK_OVERRIDE { return true; } |
| 111 | 111 |
| 112 GR_DECLARE_EFFECT_TEST; | 112 GR_DECLARE_EFFECT_TEST; |
| 113 | 113 |
| 114 typedef GrEffect INHERITED; | 114 typedef GrEffect INHERITED; |
| 115 }; | 115 }; |
| 116 | 116 |
| 117 | 117 |
| 118 GR_DEFINE_EFFECT_TEST(GrAlignedRectEffect); | 118 GR_DEFINE_EFFECT_TEST(GrAlignedRectEffect); |
| 119 | 119 |
| 120 GrEffectRef* GrAlignedRectEffect::TestCreate(SkMWCRandom* random, | 120 GrEffectRef* GrAlignedRectEffect::TestCreate(SkRandom* random, |
| 121 GrContext* context, | 121 GrContext* context, |
| 122 const GrDrawTargetCaps&, | 122 const GrDrawTargetCaps&, |
| 123 GrTexture* textures[]) { | 123 GrTexture* textures[]) { |
| 124 return GrAlignedRectEffect::Create(); | 124 return GrAlignedRectEffect::Create(); |
| 125 } | 125 } |
| 126 | 126 |
| 127 /////////////////////////////////////////////////////////////////////////////// | 127 /////////////////////////////////////////////////////////////////////////////// |
| 128 class GrGLRectEffect; | 128 class GrGLRectEffect; |
| 129 | 129 |
| 130 /** | 130 /** |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 249 virtual bool onIsEqual(const GrEffect&) const SK_OVERRIDE { return true; } | 249 virtual bool onIsEqual(const GrEffect&) const SK_OVERRIDE { return true; } |
| 250 | 250 |
| 251 GR_DECLARE_EFFECT_TEST; | 251 GR_DECLARE_EFFECT_TEST; |
| 252 | 252 |
| 253 typedef GrEffect INHERITED; | 253 typedef GrEffect INHERITED; |
| 254 }; | 254 }; |
| 255 | 255 |
| 256 | 256 |
| 257 GR_DEFINE_EFFECT_TEST(GrRectEffect); | 257 GR_DEFINE_EFFECT_TEST(GrRectEffect); |
| 258 | 258 |
| 259 GrEffectRef* GrRectEffect::TestCreate(SkMWCRandom* random, | 259 GrEffectRef* GrRectEffect::TestCreate(SkRandom* random, |
| 260 GrContext* context, | 260 GrContext* context, |
| 261 const GrDrawTargetCaps&, | 261 const GrDrawTargetCaps&, |
| 262 GrTexture* textures[]) { | 262 GrTexture* textures[]) { |
| 263 return GrRectEffect::Create(); | 263 return GrRectEffect::Create(); |
| 264 } | 264 } |
| 265 | 265 |
| 266 /////////////////////////////////////////////////////////////////////////////// | 266 /////////////////////////////////////////////////////////////////////////////// |
| 267 | 267 |
| 268 namespace { | 268 namespace { |
| 269 | 269 |
| (...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 812 // can't call mapRect for devInside since it calls sort | 812 // can't call mapRect for devInside since it calls sort |
| 813 combinedMatrix.mapPoints((SkPoint*)&devInside, (const SkPoint*)&rects[1], 2)
; | 813 combinedMatrix.mapPoints((SkPoint*)&devInside, (const SkPoint*)&rects[1], 2)
; |
| 814 | 814 |
| 815 if (devInside.isEmpty()) { | 815 if (devInside.isEmpty()) { |
| 816 this->fillAARect(gpu, target, devOutside, SkMatrix::I(), devOutside, use
VertexCoverage); | 816 this->fillAARect(gpu, target, devOutside, SkMatrix::I(), devOutside, use
VertexCoverage); |
| 817 return; | 817 return; |
| 818 } | 818 } |
| 819 | 819 |
| 820 this->geometryStrokeAARect(gpu, target, devOutside, devInside, useVertexCove
rage); | 820 this->geometryStrokeAARect(gpu, target, devOutside, devInside, useVertexCove
rage); |
| 821 } | 821 } |
| OLD | NEW |