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

Side by Side Diff: src/gpu/glsl/GrGLSLXferProcessor.cpp

Issue 1862373003: Rename EmitArgs::fSamplers to fTexSamplers (Closed) Base URL: https://skia.googlesource.com/skia.git@upload3_infer
Patch Set: rebase 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/glsl/GrGLSLXferProcessor.h ('k') | no next file » | 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 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 "glsl/GrGLSLXferProcessor.h" 8 #include "glsl/GrGLSLXferProcessor.h"
9 9
10 #include "GrXferProcessor.h" 10 #include "GrXferProcessor.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 50
51 fragBuilder->codeAppend("// Read color from copy of the destination.\n") ; 51 fragBuilder->codeAppend("// Read color from copy of the destination.\n") ;
52 fragBuilder->codeAppendf("vec2 _dstTexCoord = (%s.xy - %s) * %s;", 52 fragBuilder->codeAppendf("vec2 _dstTexCoord = (%s.xy - %s) * %s;",
53 fragPos, dstTopLeftName, dstCoordScaleName); 53 fragPos, dstTopLeftName, dstCoordScaleName);
54 54
55 if (!topDown) { 55 if (!topDown) {
56 fragBuilder->codeAppend("_dstTexCoord.y = 1.0 - _dstTexCoord.y;"); 56 fragBuilder->codeAppend("_dstTexCoord.y = 1.0 - _dstTexCoord.y;");
57 } 57 }
58 58
59 fragBuilder->codeAppendf("vec4 %s = ", dstColor); 59 fragBuilder->codeAppendf("vec4 %s = ", dstColor);
60 fragBuilder->appendTextureLookup(args.fSamplers[0], "_dstTexCoord", kVec 2f_GrSLType); 60 fragBuilder->appendTextureLookup(args.fTexSamplers[0], "_dstTexCoord", k Vec2f_GrSLType);
61 fragBuilder->codeAppend(";"); 61 fragBuilder->codeAppend(";");
62 } 62 }
63 63
64 this->emitBlendCodeForDstRead(fragBuilder, 64 this->emitBlendCodeForDstRead(fragBuilder,
65 uniformHandler, 65 uniformHandler,
66 args.fInputColor, 66 args.fInputColor,
67 args.fInputCoverage, 67 args.fInputCoverage,
68 dstColor, 68 dstColor,
69 args.fOutputPrimary, 69 args.fOutputPrimary,
70 args.fOutputSecondary, 70 args.fOutputSecondary,
(...skipping 28 matching lines...) Expand all
99 fragBuilder->codeAppendf("%s *= %s;", outColor, srcCoverage); 99 fragBuilder->codeAppendf("%s *= %s;", outColor, srcCoverage);
100 fragBuilder->codeAppendf("%s = %s;", outColorSecondary, srcCoverage) ; 100 fragBuilder->codeAppendf("%s = %s;", outColorSecondary, srcCoverage) ;
101 } else { 101 } else {
102 fragBuilder->codeAppendf("%s = vec4(1.0);", outColorSecondary); 102 fragBuilder->codeAppendf("%s = vec4(1.0);", outColorSecondary);
103 } 103 }
104 } else if (srcCoverage) { 104 } else if (srcCoverage) {
105 fragBuilder->codeAppendf("%s = %s * %s + (vec4(1.0) - %s) * %s;", 105 fragBuilder->codeAppendf("%s = %s * %s + (vec4(1.0) - %s) * %s;",
106 outColor, srcCoverage, outColor, srcCoverage, d stColor); 106 outColor, srcCoverage, outColor, srcCoverage, d stColor);
107 } 107 }
108 } 108 }
OLDNEW
« no previous file with comments | « src/gpu/glsl/GrGLSLXferProcessor.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698