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

Side by Side Diff: src/gpu/gl/GrGLSL.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/gl/GrGLRenderTarget.cpp ('k') | src/gpu/gl/GrGLTexture.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 * Copyright 2011 Google Inc. 2 * Copyright 2011 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 "GrGLSL.h" 8 #include "GrGLSL.h"
9 #include "GrGLShaderVar.h" 9 #include "GrGLShaderVar.h"
10 #include "SkString.h" 10 #include "SkString.h"
11 11
12 bool GrGetGLSLGeneration(const GrGLInterface* gl, GrGLSLGeneration* generation) { 12 bool GrGetGLSLGeneration(const GrGLInterface* gl, GrGLSLGeneration* generation) {
13 SkASSERT(NULL != generation); 13 SkASSERT(generation);
14 GrGLSLVersion ver = GrGLGetGLSLVersion(gl); 14 GrGLSLVersion ver = GrGLGetGLSLVersion(gl);
15 if (GR_GLSL_INVALID_VER == ver) { 15 if (GR_GLSL_INVALID_VER == ver) {
16 return false; 16 return false;
17 } 17 }
18 switch (gl->fStandard) { 18 switch (gl->fStandard) {
19 case kGL_GrGLStandard: 19 case kGL_GrGLStandard:
20 SkASSERT(ver >= GR_GLSL_VER(1,10)); 20 SkASSERT(ver >= GR_GLSL_VER(1,10));
21 if (ver >= GR_GLSL_VER(1,50)) { 21 if (ver >= GR_GLSL_VER(1,50)) {
22 *generation = k150_GrGLSLGeneration; 22 *generation = k150_GrGLSLGeneration;
23 } else if (ver >= GR_GLSL_VER(1,40)) { 23 } else if (ver >= GR_GLSL_VER(1,40)) {
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 } 89 }
90 90
91 append_tabs(outAppend, tabCnt); 91 append_tabs(outAppend, tabCnt);
92 92
93 if (mulFactor.isZeros()) { 93 if (mulFactor.isZeros()) {
94 outAppend->appendf("%s = vec4(0);\n", vec4VarName); 94 outAppend->appendf("%s = vec4(0);\n", vec4VarName);
95 } else { 95 } else {
96 outAppend->appendf("%s *= %s;\n", vec4VarName, mulFactor.c_str()); 96 outAppend->appendf("%s *= %s;\n", vec4VarName, mulFactor.c_str());
97 } 97 }
98 } 98 }
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLRenderTarget.cpp ('k') | src/gpu/gl/GrGLTexture.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698