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

Side by Side Diff: src/gpu/glsl/GrGLSL.cpp

Issue 1693113002: Revert of Add infastructure for gl_SampleMask (Closed) Base URL: https://skia.googlesource.com/skia.git@upload7_interp
Patch Set: 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/gpu/glsl/GrGLSL.h ('k') | src/gpu/glsl/GrGLSLCaps.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 "GrGLSLCaps.h" 9 #include "GrGLSLCaps.h"
10 #include "SkString.h" 10 #include "SkString.h"
11 11
12 bool GrGLSLSupportsNamedFragmentShaderOutputs(GrGLSLGeneration gen) { 12 bool GrGLSLSupportsNamedFragmentShaderOutputs(GrGLSLGeneration gen) {
13 switch (gen) { 13 switch (gen) {
14 case k110_GrGLSLGeneration: 14 case k110_GrGLSLGeneration:
15 return false; 15 return false;
16 case k130_GrGLSLGeneration: 16 case k130_GrGLSLGeneration:
17 case k140_GrGLSLGeneration: 17 case k140_GrGLSLGeneration:
18 case k150_GrGLSLGeneration: 18 case k150_GrGLSLGeneration:
19 case k330_GrGLSLGeneration: 19 case k330_GrGLSLGeneration:
20 case k400_GrGLSLGeneration:
21 case k310es_GrGLSLGeneration: 20 case k310es_GrGLSLGeneration:
22 case k320es_GrGLSLGeneration:
23 return true; 21 return true;
24 } 22 }
25 return false; 23 return false;
26 } 24 }
27 25
28 void GrGLSLAppendDefaultFloatPrecisionDeclaration(GrSLPrecision p, 26 void GrGLSLAppendDefaultFloatPrecisionDeclaration(GrSLPrecision p,
29 const GrGLSLCaps& glslCaps, 27 const GrGLSLCaps& glslCaps,
30 SkString* out) { 28 SkString* out) {
31 if (glslCaps.usesPrecisionModifiers()) { 29 if (glslCaps.usesPrecisionModifiers()) {
32 switch (p) { 30 switch (p) {
(...skipping 16 matching lines...) Expand all
49 if (mulFactor.isOnes()) { 47 if (mulFactor.isOnes()) {
50 *outAppend = SkString(); 48 *outAppend = SkString();
51 } 49 }
52 50
53 if (mulFactor.isZeros()) { 51 if (mulFactor.isZeros()) {
54 outAppend->appendf("%s = vec4(0);", vec4VarName); 52 outAppend->appendf("%s = vec4(0);", vec4VarName);
55 } else { 53 } else {
56 outAppend->appendf("%s *= %s;", vec4VarName, mulFactor.c_str()); 54 outAppend->appendf("%s *= %s;", vec4VarName, mulFactor.c_str());
57 } 55 }
58 } 56 }
OLDNEW
« no previous file with comments | « src/gpu/glsl/GrGLSL.h ('k') | src/gpu/glsl/GrGLSLCaps.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698