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

Unified Diff: src/gpu/gl/GrGLGLSL.cpp

Issue 1202293002: Move GLSL-specific routines/classes to separate glsl directory (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Rename GrGLGLSL.{cpp,h} Created 5 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/gl/GrGLGLSL.h ('k') | src/gpu/gl/GrGLGpu.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLGLSL.cpp
diff --git a/src/gpu/gl/GrGLSL.cpp b/src/gpu/gl/GrGLGLSL.cpp
old mode 100644
new mode 100755
similarity index 78%
rename from src/gpu/gl/GrGLSL.cpp
rename to src/gpu/gl/GrGLGLSL.cpp
index 20e6e209384ddfc12339ac46532311673186aa95..ea65842c91a9fb8adb56e1593011f07eb9b4cd55
--- a/src/gpu/gl/GrGLSL.cpp
+++ b/src/gpu/gl/GrGLGLSL.cpp
@@ -5,11 +5,11 @@
* found in the LICENSE file.
*/
-#include "GrGLSL.h"
+#include "GrGLGLSL.h"
#include "GrGLShaderVar.h"
#include "SkString.h"
-bool GrGetGLSLGeneration(const GrGLInterface* gl, GrGLSLGeneration* generation) {
+bool GrGLGetGLSLGeneration(const GrGLInterface* gl, GrGLSLGeneration* generation) {
SkASSERT(generation);
GrGLSLVersion ver = GrGLGetGLSLVersion(gl);
if (GR_GLSL_INVALID_VER == ver) {
@@ -47,7 +47,7 @@ bool GrGetGLSLGeneration(const GrGLInterface* gl, GrGLSLGeneration* generation)
}
}
-const char* GrGetGLSLVersionDecl(const GrGLContextInfo& info) {
+const char* GrGLGetGLSLVersionDecl(const GrGLContextInfo& info) {
switch (info.glslGeneration()) {
case k110_GrGLSLGeneration:
if (kGLES_GrGLStandard == info.standard()) {
@@ -89,21 +89,7 @@ const char* GrGetGLSLVersionDecl(const GrGLContextInfo& info) {
return "<no version>";
}
-bool GrGLSLSupportsNamedFragmentShaderOutputs(GrGLSLGeneration gen) {
- switch (gen) {
- case k110_GrGLSLGeneration:
- return false;
- case k130_GrGLSLGeneration:
- case k140_GrGLSLGeneration:
- case k150_GrGLSLGeneration:
- case k330_GrGLSLGeneration:
- case k310es_GrGLSLGeneration:
- return true;
- }
- return false;
-}
-
-void GrGLSLAppendDefaultFloatPrecisionDeclaration(GrSLPrecision p, GrGLStandard s, SkString* out) {
+void GrGLAppendGLSLDefaultFloatPrecisionDeclaration(GrSLPrecision p, GrGLStandard s, SkString* out) {
// Desktop GLSL has added precision qualifiers but they don't do anything.
if (kGLES_GrGLStandard == s) {
switch (p) {
@@ -121,15 +107,3 @@ void GrGLSLAppendDefaultFloatPrecisionDeclaration(GrSLPrecision p, GrGLStandard
}
}
}
-
-void GrGLSLMulVarBy4f(SkString* outAppend, const char* vec4VarName, const GrGLSLExpr4& mulFactor) {
- if (mulFactor.isOnes()) {
- *outAppend = SkString();
- }
-
- if (mulFactor.isZeros()) {
- outAppend->appendf("%s = vec4(0);", vec4VarName);
- } else {
- outAppend->appendf("%s *= %s;", vec4VarName, mulFactor.c_str());
- }
-}
« no previous file with comments | « src/gpu/gl/GrGLGLSL.h ('k') | src/gpu/gl/GrGLGpu.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698