| 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 "GrOvalEffect.h" | 8 #include "GrOvalEffect.h" |
| 9 | 9 |
| 10 #include "gl/GrGLEffect.h" | 10 #include "gl/GrGLEffect.h" |
| 11 #include "gl/GrGLShaderBuilder.h" |
| 11 #include "gl/GrGLSL.h" | 12 #include "gl/GrGLSL.h" |
| 12 #include "GrTBackendEffectFactory.h" | 13 #include "GrTBackendEffectFactory.h" |
| 13 | 14 |
| 14 #include "SkRect.h" | 15 #include "SkRect.h" |
| 15 | 16 |
| 16 ////////////////////////////////////////////////////////////////////////////// | 17 ////////////////////////////////////////////////////////////////////////////// |
| 17 | 18 |
| 18 class GLCircleEffect; | 19 class GLCircleEffect; |
| 19 | 20 |
| 20 class CircleEffect : public GrEffect { | 21 class CircleEffect : public GrEffect { |
| (...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 374 w /= 2; | 375 w /= 2; |
| 375 return CircleEffect::Create(edgeType, SkPoint::Make(oval.fLeft + w, oval
.fTop + w), w); | 376 return CircleEffect::Create(edgeType, SkPoint::Make(oval.fLeft + w, oval
.fTop + w), w); |
| 376 } else { | 377 } else { |
| 377 w /= 2; | 378 w /= 2; |
| 378 h /= 2; | 379 h /= 2; |
| 379 return EllipseEffect::Create(edgeType, SkPoint::Make(oval.fLeft + w, ova
l.fTop + h), w, h); | 380 return EllipseEffect::Create(edgeType, SkPoint::Make(oval.fLeft + w, ova
l.fTop + h), w, h); |
| 380 } | 381 } |
| 381 | 382 |
| 382 return NULL; | 383 return NULL; |
| 383 } | 384 } |
| OLD | NEW |