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

Side by Side Diff: src/gpu/effects/GrTextureDomain.cpp

Issue 1842753002: Style bikeshed - remove extraneous whitespace (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 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/effects/GrTextureDomain.h ('k') | src/gpu/gl/GrGLAssembleInterface.h » ('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 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 "GrTextureDomain.h" 8 #include "GrTextureDomain.h"
9 #include "GrInvariantOutput.h" 9 #include "GrInvariantOutput.h"
10 #include "GrSimpleTextureEffect.h" 10 #include "GrSimpleTextureEffect.h"
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 // call) causes the compilation error "Calls to any function tha t 95 // call) causes the compilation error "Calls to any function tha t
96 // may require a gradient calculation inside a conditional block 96 // may require a gradient calculation inside a conditional block
97 // may return undefined results". This appears to be an issue wi th 97 // may return undefined results". This appears to be an issue wi th
98 // the 'any' call since even the simple "result=black; if (any() ) 98 // the 'any' call since even the simple "result=black; if (any() )
99 // result=white;" code fails to compile. 99 // result=white;" code fails to compile.
100 builder->codeAppend("vec4 outside = vec4(0.0, 0.0, 0.0, 0.0);"); 100 builder->codeAppend("vec4 outside = vec4(0.0, 0.0, 0.0, 0.0);");
101 builder->codeAppend("vec4 inside = "); 101 builder->codeAppend("vec4 inside = ");
102 builder->appendTextureLookupAndModulate(inModulateColor, sampler , 102 builder->appendTextureLookupAndModulate(inModulateColor, sampler ,
103 inCoords.c_str()); 103 inCoords.c_str());
104 builder->codeAppend(";"); 104 builder->codeAppend(";");
105 105
106 builder->codeAppend(GrGLSLShaderVar::PrecisionString(glslCaps, 106 builder->codeAppend(GrGLSLShaderVar::PrecisionString(glslCaps,
107 kHigh_GrSLP recision)); 107 kHigh_GrSLP recision));
108 builder->codeAppendf("float x = (%s).x;", inCoords.c_str()); 108 builder->codeAppendf("float x = (%s).x;", inCoords.c_str());
109 builder->codeAppend(GrGLSLShaderVar::PrecisionString(glslCaps, 109 builder->codeAppend(GrGLSLShaderVar::PrecisionString(glslCaps,
110 kHigh_GrSLP recision)); 110 kHigh_GrSLP recision));
111 builder->codeAppendf("float y = (%s).y;", inCoords.c_str()); 111 builder->codeAppendf("float y = (%s).y;", inCoords.c_str());
112 112
113 builder->codeAppendf("x = abs(2.0*(x - %s.x)/(%s.z - %s.x) - 1.0 );", 113 builder->codeAppendf("x = abs(2.0*(x - %s.x)/(%s.z - %s.x) - 1.0 );",
114 domain, domain, domain); 114 domain, domain, domain);
115 builder->codeAppendf("y = abs(2.0*(y - %s.y)/(%s.w - %s.y) - 1.0 );", 115 builder->codeAppendf("y = abs(2.0*(y - %s.y)/(%s.w - %s.y) - 1.0 );",
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 bool bilerp = mode != GrTextureDomain::kRepeat_Mode ? d->fRandom->nextBool() : false; 294 bool bilerp = mode != GrTextureDomain::kRepeat_Mode ? d->fRandom->nextBool() : false;
295 GrCoordSet coords = d->fRandom->nextBool() ? kLocal_GrCoordSet : kDevice_GrC oordSet; 295 GrCoordSet coords = d->fRandom->nextBool() ? kLocal_GrCoordSet : kDevice_GrC oordSet;
296 return GrTextureDomainEffect::Create( 296 return GrTextureDomainEffect::Create(
297 d->fTextures[texIdx], 297 d->fTextures[texIdx],
298 matrix, 298 matrix,
299 domain, 299 domain,
300 mode, 300 mode,
301 bilerp ? GrTextureParams::kBilerp_FilterMode : GrTextureParams::kNone_Fi lterMode, 301 bilerp ? GrTextureParams::kBilerp_FilterMode : GrTextureParams::kNone_Fi lterMode,
302 coords); 302 coords);
303 } 303 }
OLDNEW
« no previous file with comments | « src/gpu/effects/GrTextureDomain.h ('k') | src/gpu/gl/GrGLAssembleInterface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698