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

Unified Diff: src/gpu/gl/builders/GrGLShaderBuilder.cpp

Issue 1142003003: Revert of Move copy-surface-as-draw fallback to GrGLGpu. (Closed) Base URL: https://skia.googlesource.com/skia.git@vares
Patch Set: Created 5 years, 7 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/builders/GrGLProgramBuilder.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/builders/GrGLShaderBuilder.cpp
diff --git a/src/gpu/gl/builders/GrGLShaderBuilder.cpp b/src/gpu/gl/builders/GrGLShaderBuilder.cpp
index 984233dd77f0bb74f72083734594d05a16ec8585..67fbe2451dc4c148977c2a1ce10df4675c384f78 100644
--- a/src/gpu/gl/builders/GrGLShaderBuilder.cpp
+++ b/src/gpu/gl/builders/GrGLShaderBuilder.cpp
@@ -12,6 +12,14 @@
#include "../GrGLShaderVar.h"
namespace {
+inline const char* sample_function_name(GrSLType type, GrGLSLGeneration glslGen) {
+ if (kVec2f_GrSLType == type) {
+ return glslGen >= k130_GrGLSLGeneration ? "texture" : "texture2D";
+ } else {
+ SkASSERT(kVec3f_GrSLType == type);
+ return glslGen >= k130_GrGLSLGeneration ? "textureProj" : "texture2DProj";
+ }
+}
void append_texture_lookup(SkString* out,
GrGLGpu* gpu,
const char* samplerName,
@@ -22,7 +30,7 @@
SkASSERT(coordName);
out->appendf("%s(%s, %s)",
- GrGLSLTexture2DFunctionName(varyingType, gpu->glslGeneration()),
+ sample_function_name(varyingType, gpu->glslGeneration()),
samplerName,
coordName);
« no previous file with comments | « src/gpu/gl/builders/GrGLProgramBuilder.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698