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

Side by Side Diff: src/gpu/GrPaint.cpp

Issue 22850006: Replace uses of GrAssert by SkASSERT. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: rebase 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 | « src/gpu/GrOvalRenderer.cpp ('k') | src/gpu/GrPathRenderer.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 /* 2 /*
3 * Copyright 2013 Google Inc. 3 * Copyright 2013 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 #include "GrPaint.h" 9 #include "GrPaint.h"
10 10
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 return false; 72 return false;
73 } 73 }
74 74
75 GrColor color = fColor; 75 GrColor color = fColor;
76 uint32_t colorComps = kRGBA_GrColorComponentFlags; 76 uint32_t colorComps = kRGBA_GrColorComponentFlags;
77 count = fColorStages.count(); 77 count = fColorStages.count();
78 for (int i = 0; i < count; ++i) { 78 for (int i = 0; i < count; ++i) {
79 (*fColorStages[i].getEffect())->getConstantColorComponents(&color, &colo rComps); 79 (*fColorStages[i].getEffect())->getConstantColorComponents(&color, &colo rComps);
80 } 80 }
81 81
82 GrAssert((NULL == solidColor) == (NULL == solidColorKnownComponents)); 82 SkASSERT((NULL == solidColor) == (NULL == solidColorKnownComponents));
83 83
84 GrBlendCoeff srcCoeff = fSrcBlendCoeff; 84 GrBlendCoeff srcCoeff = fSrcBlendCoeff;
85 GrBlendCoeff dstCoeff = fDstBlendCoeff; 85 GrBlendCoeff dstCoeff = fDstBlendCoeff;
86 GrSimplifyBlend(&srcCoeff, &dstCoeff, color, colorComps, 0, 0, 0); 86 GrSimplifyBlend(&srcCoeff, &dstCoeff, color, colorComps, 0, 0, 0);
87 87
88 bool opaque = kZero_GrBlendCoeff == dstCoeff && !GrBlendCoeffRefsDst(srcCoef f); 88 bool opaque = kZero_GrBlendCoeff == dstCoeff && !GrBlendCoeffRefsDst(srcCoef f);
89 if (NULL != solidColor) { 89 if (NULL != solidColor) {
90 if (opaque) { 90 if (opaque) {
91 switch (srcCoeff) { 91 switch (srcCoeff) {
92 case kZero_GrBlendCoeff: 92 case kZero_GrBlendCoeff:
(...skipping 27 matching lines...) Expand all
120 case kIConstA_GrBlendCoeff: 120 case kIConstA_GrBlendCoeff:
121 *solidColorKnownComponents = 0; 121 *solidColorKnownComponents = 0;
122 break; 122 break;
123 } 123 }
124 } else { 124 } else {
125 solidColorKnownComponents = 0; 125 solidColorKnownComponents = 0;
126 } 126 }
127 } 127 }
128 return opaque; 128 return opaque;
129 } 129 }
OLDNEW
« no previous file with comments | « src/gpu/GrOvalRenderer.cpp ('k') | src/gpu/GrPathRenderer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698