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

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

Issue 544233002: "NULL !=" = NULL (Closed) Base URL: https://skia.googlesource.com/skia.git@are
Patch Set: rebase Created 6 years, 3 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/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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 fColorStages[i].getEffect()->getConstantColorComponents(&color, &colorCo mps); 69 fColorStages[i].getEffect()->getConstantColorComponents(&color, &colorCo mps);
70 } 70 }
71 71
72 SkASSERT((NULL == solidColor) == (NULL == solidColorKnownComponents)); 72 SkASSERT((NULL == solidColor) == (NULL == solidColorKnownComponents));
73 73
74 GrBlendCoeff srcCoeff = fSrcBlendCoeff; 74 GrBlendCoeff srcCoeff = fSrcBlendCoeff;
75 GrBlendCoeff dstCoeff = fDstBlendCoeff; 75 GrBlendCoeff dstCoeff = fDstBlendCoeff;
76 GrSimplifyBlend(&srcCoeff, &dstCoeff, color, colorComps, 0, 0, 0); 76 GrSimplifyBlend(&srcCoeff, &dstCoeff, color, colorComps, 0, 0, 0);
77 77
78 bool opaque = kZero_GrBlendCoeff == dstCoeff && !GrBlendCoeffRefsDst(srcCoef f); 78 bool opaque = kZero_GrBlendCoeff == dstCoeff && !GrBlendCoeffRefsDst(srcCoef f);
79 if (NULL != solidColor) { 79 if (solidColor) {
80 if (opaque) { 80 if (opaque) {
81 switch (srcCoeff) { 81 switch (srcCoeff) {
82 case kZero_GrBlendCoeff: 82 case kZero_GrBlendCoeff:
83 *solidColor = 0; 83 *solidColor = 0;
84 *solidColorKnownComponents = kRGBA_GrColorComponentFlags; 84 *solidColorKnownComponents = kRGBA_GrColorComponentFlags;
85 break; 85 break;
86 86
87 case kOne_GrBlendCoeff: 87 case kOne_GrBlendCoeff:
88 *solidColor = color; 88 *solidColor = color;
89 *solidColorKnownComponents = colorComps; 89 *solidColorKnownComponents = colorComps;
(...skipping 20 matching lines...) Expand all
110 case kIConstA_GrBlendCoeff: 110 case kIConstA_GrBlendCoeff:
111 *solidColorKnownComponents = 0; 111 *solidColorKnownComponents = 0;
112 break; 112 break;
113 } 113 }
114 } else { 114 } else {
115 solidColorKnownComponents = 0; 115 solidColorKnownComponents = 0;
116 } 116 }
117 } 117 }
118 return opaque; 118 return opaque;
119 } 119 }
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