From 8be02fc2a72ae69a9142de68a483edf378aff1c8 Mon Sep 17 00:00:00 2001 From: "skia.committer@gmail.com" Date: Fri, 17 May 2013 07:01:11 +0000 Subject: Sanitizing source files in Housekeeper-Nightly git-svn-id: http://skia.googlecode.com/svn/trunk@9174 2bbb7eff-a529-9590-31e7-b0007b416f81 --- src/gpu/GrOvalRenderer.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/gpu/GrOvalRenderer.cpp') diff --git a/src/gpu/GrOvalRenderer.cpp b/src/gpu/GrOvalRenderer.cpp index b1825f5f42..dd9b19e17a 100644 --- a/src/gpu/GrOvalRenderer.cpp +++ b/src/gpu/GrOvalRenderer.cpp @@ -155,9 +155,9 @@ GrEffectRef* CircleEdgeEffect::TestCreate(SkMWCRandom* random, /** * The output of this effect is a modulation of the input color and coverage for an axis-aligned - * ellipse, specified as a 2D offset from center, and the reciprocals of the outer and inner radii, - * in both x and y directions. - * + * ellipse, specified as a 2D offset from center, and the reciprocals of the outer and inner radii, + * in both x and y directions. + * * We are using an implicit function of x^2/a^2 + y^2/b^2 - 1 = 0. */ @@ -217,7 +217,7 @@ public: builder->getEffectAttributeName(drawEffect.getVertexAttribIndices()[1]); builder->vsCodeAppendf("\t%s = %s;\n", vsRadiiName, attr1Name->c_str()); - // for outer curve + // for outer curve builder->fsCodeAppendf("\tvec2 scaledOffset = %s*%s.xy;\n", fsOffsetName, fsRadiiName); builder->fsCodeAppend("\tfloat test = dot(scaledOffset, scaledOffset) - 1.0;\n"); builder->fsCodeAppendf("\tvec2 grad = 2.0*scaledOffset*%s.xy;\n", fsRadiiName); @@ -703,7 +703,7 @@ bool GrOvalRenderer::drawSimpleRRect(GrDrawTarget* target, GrContext* context, b GrEffectRef* effect = CircleEdgeEffect::Create(isStroked); static const int kCircleEdgeAttrIndex = 1; drawState->setEffect(kEdgeEffectStage, effect, kCircleEdgeAttrIndex)->unref(); - + // The radii are outset for two reasons. First, it allows the shader to simply perform // clamp(distance-to-center - radius, 0, 1). Second, the outer radius is used to compute the // verts of the bounding box that is rendered and the outset ensures the box will cover all @@ -772,7 +772,7 @@ bool GrOvalRenderer::drawSimpleRRect(GrDrawTarget* target, GrContext* context, b } // we only handle thick strokes for near-circular ellipses - if (scaledStroke.length() > SK_ScalarHalf && + if (scaledStroke.length() > SK_ScalarHalf && (SK_ScalarHalf*xRadius > yRadius || SK_ScalarHalf*yRadius > xRadius)) { return false; } -- cgit v1.2.3