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

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

Issue 1690963003: Add gl_SampleMask functionality to fragment builders (Closed) Base URL: https://skia.googlesource.com/skia.git@upload7_interp
Patch Set: ordering 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:
20 case k310es_GrGLSLGeneration: 21 case k310es_GrGLSLGeneration:
22 case k320es_GrGLSLGeneration:
21 return true; 23 return true;
22 } 24 }
23 return false; 25 return false;
24 } 26 }
25 27
26 void GrGLSLAppendDefaultFloatPrecisionDeclaration(GrSLPrecision p, 28 void GrGLSLAppendDefaultFloatPrecisionDeclaration(GrSLPrecision p,
27 const GrGLSLCaps& glslCaps, 29 const GrGLSLCaps& glslCaps,
28 SkString* out) { 30 SkString* out) {
29 if (glslCaps.usesPrecisionModifiers()) { 31 if (glslCaps.usesPrecisionModifiers()) {
30 switch (p) { 32 switch (p) {
(...skipping 16 matching lines...) Expand all
47 if (mulFactor.isOnes()) { 49 if (mulFactor.isOnes()) {
48 *outAppend = SkString(); 50 *outAppend = SkString();
49 } 51 }
50 52
51 if (mulFactor.isZeros()) { 53 if (mulFactor.isZeros()) {
52 outAppend->appendf("%s = vec4(0);", vec4VarName); 54 outAppend->appendf("%s = vec4(0);", vec4VarName);
53 } else { 55 } else {
54 outAppend->appendf("%s *= %s;", vec4VarName, mulFactor.c_str()); 56 outAppend->appendf("%s *= %s;", vec4VarName, mulFactor.c_str());
55 } 57 }
56 } 58 }
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