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

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

Issue 1567733005: Add a class representing texture swizzle. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: comment change Created 4 years, 11 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
OLDNEW
1 /* 1 /*
2 * Copyright 2012 Google Inc. 2 * Copyright 2012 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 8
9 #include "GrGLSLCaps.h" 9 #include "GrGLSLCaps.h"
10 10
(...skipping 13 matching lines...) Expand all
24 fCanUseMinAndAbsTogether = true; 24 fCanUseMinAndAbsTogether = true;
25 fMustForceNegatedAtanParamToFloat = false; 25 fMustForceNegatedAtanParamToFloat = false;
26 fVersionDeclString = nullptr; 26 fVersionDeclString = nullptr;
27 fShaderDerivativeExtensionString = nullptr; 27 fShaderDerivativeExtensionString = nullptr;
28 fFragCoordConventionsExtensionString = nullptr; 28 fFragCoordConventionsExtensionString = nullptr;
29 fSecondaryOutputExtensionString = nullptr; 29 fSecondaryOutputExtensionString = nullptr;
30 fExternalTextureExtensionString = nullptr; 30 fExternalTextureExtensionString = nullptr;
31 fFBFetchColorName = nullptr; 31 fFBFetchColorName = nullptr;
32 fFBFetchExtensionString = nullptr; 32 fFBFetchExtensionString = nullptr;
33 fAdvBlendEqInteraction = kNotSupported_AdvBlendEqInteraction; 33 fAdvBlendEqInteraction = kNotSupported_AdvBlendEqInteraction;
34
35 fMustSwizzleInShader = false;
36 memset(fConfigSwizzle, 0, sizeof(fConfigSwizzle));
37 } 34 }
38 35
39 SkString GrGLSLCaps::dump() const { 36 SkString GrGLSLCaps::dump() const {
40 SkString r = INHERITED::dump(); 37 SkString r = INHERITED::dump();
41 38
42 static const char* kAdvBlendEqInteractionStr[] = { 39 static const char* kAdvBlendEqInteractionStr[] = {
43 "Not Supported", 40 "Not Supported",
44 "Automatic", 41 "Automatic",
45 "General Enable", 42 "General Enable",
46 "Specific Enables", 43 "Specific Enables",
(...skipping 13 matching lines...) Expand all
60 r.appendf("Can use any() function: %s\n", (fCanUseAnyFunctionInShader ? "YES " : "NO")); 57 r.appendf("Can use any() function: %s\n", (fCanUseAnyFunctionInShader ? "YES " : "NO"));
61 r.appendf("Can use min() and abs() together: %s\n", (fCanUseMinAndAbsTogethe r ? "YES" : "NO")); 58 r.appendf("Can use min() and abs() together: %s\n", (fCanUseMinAndAbsTogethe r ? "YES" : "NO"));
62 r.appendf("Must force negated atan param to float: %s\n", (fMustForceNegated AtanParamToFloat ? 59 r.appendf("Must force negated atan param to float: %s\n", (fMustForceNegated AtanParamToFloat ?
63 "YES" : "NO")); 60 "YES" : "NO"));
64 r.appendf("Advanced blend equation interaction: %s\n", 61 r.appendf("Advanced blend equation interaction: %s\n",
65 kAdvBlendEqInteractionStr[fAdvBlendEqInteraction]); 62 kAdvBlendEqInteractionStr[fAdvBlendEqInteraction]);
66 return r; 63 return r;
67 } 64 }
68 65
69 void GrGLSLCaps::onApplyOptionsOverrides(const GrContextOptions& options) { 66 void GrGLSLCaps::onApplyOptionsOverrides(const GrContextOptions& options) {
70 if (options.fUseShaderSwizzling) {
71 fMustSwizzleInShader = true;
72 }
73 } 67 }
74 68
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698