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

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

Issue 22418006: effects: Replaces uses of GrAssert with SkASSERT. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | src/effects/SkGpuBlurUtils.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 "SkArithmeticMode.h" 8 #include "SkArithmeticMode.h"
9 #include "SkColorPriv.h" 9 #include "SkColorPriv.h"
10 #include "SkFlattenableBuffers.h" 10 #include "SkFlattenableBuffers.h"
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 builder->appendTextureLookup(GrGLShaderBuilder::kFragment_ShaderType, 357 builder->appendTextureLookup(GrGLShaderBuilder::kFragment_ShaderType,
358 samplers[0], 358 samplers[0],
359 bgCoords, 359 bgCoords,
360 bgCoordsType); 360 bgCoordsType);
361 builder->fsCodeAppendf(";\n"); 361 builder->fsCodeAppendf(";\n");
362 dstColor = "bgColor"; 362 dstColor = "bgColor";
363 } else { 363 } else {
364 dstColor = builder->dstColor(); 364 dstColor = builder->dstColor();
365 } 365 }
366 366
367 GrAssert(NULL != dstColor); 367 SkASSERT(NULL != dstColor);
368 fKUni = builder->addUniform(GrGLShaderBuilder::kFragment_ShaderType, 368 fKUni = builder->addUniform(GrGLShaderBuilder::kFragment_ShaderType,
369 kVec4f_GrSLType, "k"); 369 kVec4f_GrSLType, "k");
370 const char* kUni = builder->getUniformCStr(fKUni); 370 const char* kUni = builder->getUniformCStr(fKUni);
371 371
372 // We don't try to optimize for this case at all 372 // We don't try to optimize for this case at all
373 if (NULL == inputColor) { 373 if (NULL == inputColor) {
374 builder->fsCodeAppendf("\t\tconst vec4 src = %s;\n", GrGLSLOnesVecf(4)); 374 builder->fsCodeAppendf("\t\tconst vec4 src = %s;\n", GrGLSLOnesVecf(4));
375 } else { 375 } else {
376 builder->fsCodeAppendf("\t\tvec4 src = %s;\n", inputColor); 376 builder->fsCodeAppendf("\t\tvec4 src = %s;\n", inputColor);
377 if (gUseUnpremul) { 377 if (gUseUnpremul) {
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
446 background); 446 background);
447 } 447 }
448 return true; 448 return true;
449 } 449 }
450 450
451 #endif 451 #endif
452 452
453 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkArithmeticMode) 453 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkArithmeticMode)
454 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkArithmeticMode_scalar) 454 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkArithmeticMode_scalar)
455 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END 455 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END
OLDNEW
« no previous file with comments | « no previous file | src/effects/SkGpuBlurUtils.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698