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

Unified Diff: src/gpu/glsl/GrGLSLShaderVar.h

Issue 1626553002: Revert of added support for PLS path rendering (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/glsl/GrGLSLProgramBuilder.cpp ('k') | src/gpu/glsl/GrGLSLXferProcessor.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/glsl/GrGLSLShaderVar.h
diff --git a/src/gpu/glsl/GrGLSLShaderVar.h b/src/gpu/glsl/GrGLSLShaderVar.h
index e26a75c0966794143980f48a66b7755f823bd806..1aedb916613384cc24f4fa6f9f8c67444ed72825 100644
--- a/src/gpu/glsl/GrGLSLShaderVar.h
+++ b/src/gpu/glsl/GrGLSLShaderVar.h
@@ -73,7 +73,7 @@ public:
const char* layoutQualifier = nullptr,
bool useUniformFloatArrays = USE_UNIFORM_FLOAT_ARRAYS) {
SkASSERT(kVoid_GrSLType != type);
- SkASSERT(kDefault_GrSLPrecision == precision || GrSLTypeIsNumeric(type));
+ SkASSERT(kDefault_GrSLPrecision == precision || GrSLTypeIsFloatType(type));
INHERITED::set(type, name, typeModifier, precision);
fLayoutQualifier = layoutQualifier;
fUseUniformFloatArrays = useUniformFloatArrays;
@@ -89,7 +89,7 @@ public:
const char* layoutQualifier = nullptr,
bool useUniformFloatArrays = USE_UNIFORM_FLOAT_ARRAYS) {
SkASSERT(kVoid_GrSLType != type);
- SkASSERT(kDefault_GrSLPrecision == precision || GrSLTypeIsNumeric(type));
+ SkASSERT(kDefault_GrSLPrecision == precision || GrSLTypeIsFloatType(type));
INHERITED::set(type, name, typeModifier, precision);
fLayoutQualifier = layoutQualifier;
fUseUniformFloatArrays = useUniformFloatArrays;
@@ -106,7 +106,7 @@ public:
const char* layoutQualifier = nullptr,
bool useUniformFloatArrays = USE_UNIFORM_FLOAT_ARRAYS) {
SkASSERT(kVoid_GrSLType != type);
- SkASSERT(kDefault_GrSLPrecision == precision || GrSLTypeIsNumeric(type));
+ SkASSERT(kDefault_GrSLPrecision == precision || GrSLTypeIsFloatType(type));
INHERITED::set(type, name, typeModifier, precision, count);
fLayoutQualifier = layoutQualifier;
fUseUniformFloatArrays = useUniformFloatArrays;
@@ -123,7 +123,7 @@ public:
const char* layoutQualifier = nullptr,
bool useUniformFloatArrays = USE_UNIFORM_FLOAT_ARRAYS) {
SkASSERT(kVoid_GrSLType != type);
- SkASSERT(kDefault_GrSLPrecision == precision || GrSLTypeIsNumeric(type));
+ SkASSERT(kDefault_GrSLPrecision == precision || GrSLTypeIsFloatType(type));
INHERITED::set(type, name, typeModifier, precision, count);
fLayoutQualifier = layoutQualifier;
fUseUniformFloatArrays = useUniformFloatArrays;
@@ -140,22 +140,16 @@ public:
* Write a declaration of this variable to out.
*/
void appendDecl(const GrGLSLCaps* glslCaps, SkString* out) const {
- SkASSERT(kDefault_GrSLPrecision == fPrecision || GrSLTypeIsNumeric(fType));
+ SkASSERT(kDefault_GrSLPrecision == fPrecision || GrSLTypeIsFloatType(fType));
if (!fLayoutQualifier.isEmpty()) {
out->appendf("layout(%s) ", fLayoutQualifier.c_str());
}
if (this->getTypeModifier() != kNone_TypeModifier) {
- if (GrSLTypeIsIntType(fType) && (this->getTypeModifier() == kVaryingIn_TypeModifier ||
- this->getTypeModifier() == kVaryingOut_TypeModifier)) {
- out->append("flat ");
- }
- out->append(TypeModifierString(glslCaps, this->getTypeModifier()));
- out->append(" ");
+ out->append(TypeModifierString(glslCaps, this->getTypeModifier()));
+ out->append(" ");
}
+ out->append(PrecisionString(glslCaps, fPrecision));
GrSLType effectiveType = this->getType();
- if (effectiveType != kBool_GrSLType) {
- out->append(PrecisionString(glslCaps, fPrecision));
- }
if (this->isArray()) {
if (this->isUnsizedArray()) {
out->appendf("%s %s[]",
« no previous file with comments | « src/gpu/glsl/GrGLSLProgramBuilder.cpp ('k') | src/gpu/glsl/GrGLSLXferProcessor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698