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

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

Issue 648463002: Remove tab parameter from GrGLSLMulVarBy4f function (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix comment Created 6 years, 2 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/effects/SkMorphologyImageFilter.cpp ('k') | src/gpu/effects/GrConvolutionEffect.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 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 "GrConfigConversionEffect.h" 8 #include "GrConfigConversionEffect.h"
9 #include "GrContext.h" 9 #include "GrContext.h"
10 #include "GrTBackendProcessorFactory.h" 10 #include "GrTBackendProcessorFactory.h"
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 "%s = %s.a <= 0.0 ? vec4(0,0,0,0) : vec4(floor(%s.%s / % s.a * 255.0) / 255.0, %s.a);", 74 "%s = %s.a <= 0.0 ? vec4(0,0,0,0) : vec4(floor(%s.%s / % s.a * 255.0) / 255.0, %s.a);",
75 tmpVar.c_str(), tmpVar.c_str(), tmpVar.c_str(), swiz, tm pVar.c_str(), tmpVar.c_str()); 75 tmpVar.c_str(), tmpVar.c_str(), tmpVar.c_str(), swiz, tm pVar.c_str(), tmpVar.c_str());
76 break; 76 break;
77 default: 77 default:
78 SkFAIL("Unknown conversion op."); 78 SkFAIL("Unknown conversion op.");
79 break; 79 break;
80 } 80 }
81 fsBuilder->codeAppendf("%s = %s;", outputColor, tmpVar.c_str()); 81 fsBuilder->codeAppendf("%s = %s;", outputColor, tmpVar.c_str());
82 } 82 }
83 SkString modulate; 83 SkString modulate;
84 GrGLSLMulVarBy4f(&modulate, 2, outputColor, inputColor); 84 GrGLSLMulVarBy4f(&modulate, outputColor, inputColor);
85 fsBuilder->codeAppend(modulate.c_str()); 85 fsBuilder->codeAppend(modulate.c_str());
86 } 86 }
87 87
88 static inline void GenKey(const GrProcessor& processor, const GrGLCaps&, 88 static inline void GenKey(const GrProcessor& processor, const GrGLCaps&,
89 GrProcessorKeyBuilder* b) { 89 GrProcessorKeyBuilder* b) {
90 const GrConfigConversionEffect& conv = processor.cast<GrConfigConversion Effect>(); 90 const GrConfigConversionEffect& conv = processor.cast<GrConfigConversion Effect>();
91 uint32_t key = (conv.swapsRedAndBlue() ? 0 : 1) | (conv.pmConversion() < < 1); 91 uint32_t key = (conv.swapsRedAndBlue() ? 0 : 1) | (conv.pmConversion() < < 1);
92 b->add32(key); 92 b->add32(key);
93 } 93 }
94 94
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 kNone_PMConversion != pmConversion) { 276 kNone_PMConversion != pmConversion) {
277 // The PM conversions assume colors are 0..255 277 // The PM conversions assume colors are 0..255
278 return NULL; 278 return NULL;
279 } 279 }
280 return SkNEW_ARGS(GrConfigConversionEffect, (texture, 280 return SkNEW_ARGS(GrConfigConversionEffect, (texture,
281 swapRedAndBlue, 281 swapRedAndBlue,
282 pmConversion, 282 pmConversion,
283 matrix)); 283 matrix));
284 } 284 }
285 } 285 }
OLDNEW
« no previous file with comments | « src/effects/SkMorphologyImageFilter.cpp ('k') | src/gpu/effects/GrConvolutionEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698