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

Side by Side Diff: src/effects/SkColorCubeFilter.cpp

Issue 1684063006: Add GrShaderFlags enum (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Bit->Flag Created 4 years, 10 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/SkBlurMaskFilter.cpp ('k') | src/effects/SkDisplacementMapEffect.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 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 "SkColorCubeFilter.h" 8 #include "SkColorCubeFilter.h"
9 #include "SkColorPriv.h" 9 #include "SkColorPriv.h"
10 #include "SkOnce.h" 10 #include "SkOnce.h"
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 } 231 }
232 232
233 /////////////////////////////////////////////////////////////////////////////// 233 ///////////////////////////////////////////////////////////////////////////////
234 234
235 void GrColorCubeEffect::GLSLProcessor::emitCode(EmitArgs& args) { 235 void GrColorCubeEffect::GLSLProcessor::emitCode(EmitArgs& args) {
236 if (nullptr == args.fInputColor) { 236 if (nullptr == args.fInputColor) {
237 args.fInputColor = "vec4(1)"; 237 args.fInputColor = "vec4(1)";
238 } 238 }
239 239
240 GrGLSLUniformHandler* uniformHandler = args.fUniformHandler; 240 GrGLSLUniformHandler* uniformHandler = args.fUniformHandler;
241 fColorCubeSizeUni = uniformHandler->addUniform(GrGLSLUniformHandler::kFragme nt_Visibility, 241 fColorCubeSizeUni = uniformHandler->addUniform(kFragment_GrShaderFlag,
242 kFloat_GrSLType, kDefault_GrS LPrecision, 242 kFloat_GrSLType, kDefault_GrS LPrecision,
243 "Size"); 243 "Size");
244 const char* colorCubeSizeUni = uniformHandler->getUniformCStr(fColorCubeSize Uni); 244 const char* colorCubeSizeUni = uniformHandler->getUniformCStr(fColorCubeSize Uni);
245 fColorCubeInvSizeUni = uniformHandler->addUniform(GrGLSLUniformHandler::kFra gment_Visibility, 245 fColorCubeInvSizeUni = uniformHandler->addUniform(kFragment_GrShaderFlag,
246 kFloat_GrSLType, kDefault_ GrSLPrecision, 246 kFloat_GrSLType, kDefault_ GrSLPrecision,
247 "InvSize"); 247 "InvSize");
248 const char* colorCubeInvSizeUni = uniformHandler->getUniformCStr(fColorCubeI nvSizeUni); 248 const char* colorCubeInvSizeUni = uniformHandler->getUniformCStr(fColorCubeI nvSizeUni);
249 249
250 const char* nonZeroAlpha = "nonZeroAlpha"; 250 const char* nonZeroAlpha = "nonZeroAlpha";
251 const char* unPMColor = "unPMColor"; 251 const char* unPMColor = "unPMColor";
252 const char* cubeIdx = "cubeIdx"; 252 const char* cubeIdx = "cubeIdx";
253 const char* cCoords1 = "cCoords1"; 253 const char* cCoords1 = "cCoords1";
254 const char* cCoords2 = "cCoords2"; 254 const char* cCoords2 = "cCoords2";
255 255
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 if (textureCube) { 319 if (textureCube) {
320 context->textureProvider()->assignUniqueKeyToTexture(key, textureCub e); 320 context->textureProvider()->assignUniqueKeyToTexture(key, textureCub e);
321 } else { 321 } else {
322 return nullptr; 322 return nullptr;
323 } 323 }
324 } 324 }
325 325
326 return GrColorCubeEffect::Create(textureCube); 326 return GrColorCubeEffect::Create(textureCube);
327 } 327 }
328 #endif 328 #endif
OLDNEW
« no previous file with comments | « src/effects/SkBlurMaskFilter.cpp ('k') | src/effects/SkDisplacementMapEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698