Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(160)

Side by Side Diff: src/gpu/GrOvalRenderer.cpp

Issue 1088763005: Cleanup: Remove unnecessary double-semicolons. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/gpu/GrDrawTarget.h ('k') | src/images/SkImageDecoder_wbmp.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2013 Google Inc. 2 * Copyright 2013 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 "GrOvalRenderer.h" 8 #include "GrOvalRenderer.h"
9 9
10 #include "GrBatch.h" 10 #include "GrBatch.h"
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 103
104 // Setup pass through color 104 // Setup pass through color
105 this->setupColorPassThrough(pb, local.fInputColorType, args.fOutputC olor, NULL, 105 this->setupColorPassThrough(pb, local.fInputColorType, args.fOutputC olor, NULL,
106 &fColorUniform); 106 &fColorUniform);
107 107
108 // Setup position 108 // Setup position
109 this->setupPosition(pb, gpArgs, ce.inPosition()->fName, ce.viewMatri x()); 109 this->setupPosition(pb, gpArgs, ce.inPosition()->fName, ce.viewMatri x());
110 110
111 // emit transforms 111 // emit transforms
112 this->emitTransforms(args.fPB, gpArgs->fPositionVar, ce.inPosition() ->fName, 112 this->emitTransforms(args.fPB, gpArgs->fPositionVar, ce.inPosition() ->fName,
113 ce.localMatrix(), args.fTransformsIn, args.fTra nsformsOut);; 113 ce.localMatrix(), args.fTransformsIn, args.fTra nsformsOut);
114 114
115 GrGLGPFragmentBuilder* fsBuilder = args.fPB->getFragmentShaderBuilde r(); 115 GrGLGPFragmentBuilder* fsBuilder = args.fPB->getFragmentShaderBuilde r();
116 fsBuilder->codeAppendf("float d = length(%s.xy);", v.fsIn()); 116 fsBuilder->codeAppendf("float d = length(%s.xy);", v.fsIn());
117 fsBuilder->codeAppendf("float edgeAlpha = clamp(%s.z * (1.0 - d), 0. 0, 1.0);", v.fsIn()); 117 fsBuilder->codeAppendf("float edgeAlpha = clamp(%s.z * (1.0 - d), 0. 0, 1.0);", v.fsIn());
118 if (ce.isStroked()) { 118 if (ce.isStroked()) {
119 fsBuilder->codeAppendf("float innerAlpha = clamp(%s.z * (d - %s. w), 0.0, 1.0);", 119 fsBuilder->codeAppendf("float innerAlpha = clamp(%s.z * (d - %s. w), 0.0, 1.0);",
120 v.fsIn(), v.fsIn()); 120 v.fsIn(), v.fsIn());
121 fsBuilder->codeAppend("edgeAlpha *= innerAlpha;"); 121 fsBuilder->codeAppend("edgeAlpha *= innerAlpha;");
122 } 122 }
123 123
(...skipping 2098 matching lines...) Expand 10 before | Expand all | Expand 10 after
2222 geometry.fInnerXRadius = innerXRadius; 2222 geometry.fInnerXRadius = innerXRadius;
2223 geometry.fInnerYRadius = innerYRadius; 2223 geometry.fInnerYRadius = innerYRadius;
2224 geometry.fStroke = isStrokeOnly; 2224 geometry.fStroke = isStrokeOnly;
2225 geometry.fDevBounds = bounds; 2225 geometry.fDevBounds = bounds;
2226 2226
2227 SkAutoTUnref<GrBatch> batch(RRectEllipseRendererBatch::Create(geometry, indexBuffer)); 2227 SkAutoTUnref<GrBatch> batch(RRectEllipseRendererBatch::Create(geometry, indexBuffer));
2228 target->drawBatch(pipelineBuilder, batch, &bounds); 2228 target->drawBatch(pipelineBuilder, batch, &bounds);
2229 } 2229 }
2230 return true; 2230 return true;
2231 } 2231 }
OLDNEW
« no previous file with comments | « src/gpu/GrDrawTarget.h ('k') | src/images/SkImageDecoder_wbmp.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698