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

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

Issue 1161063003: Revert "Revert of Move copy-surface-as-draw fallback to GrGLGpu. (patchset #12 id:220001 of https:/… (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: update 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/GrGLVertexArray.cpp ('k') | src/gpu/gl/builders/GrGLProgramBuilder.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/builders/GrGLFragmentShaderBuilder.cpp
diff --git a/src/gpu/gl/builders/GrGLFragmentShaderBuilder.cpp b/src/gpu/gl/builders/GrGLFragmentShaderBuilder.cpp
index ee137c483a9218e84d3012155440f223e574b0b0..e6c07c2cdbee12c3e9ca65c4ee45694e4e31d58f 100644
--- a/src/gpu/gl/builders/GrGLFragmentShaderBuilder.cpp
+++ b/src/gpu/gl/builders/GrGLFragmentShaderBuilder.cpp
@@ -15,26 +15,6 @@
const char* GrGLFragmentShaderBuilder::kDstTextureColorName = "_dstColor";
static const char* declared_color_output_name() { return "fsColorOut"; }
static const char* dual_source_output_name() { return "dualSourceOut"; }
-static void append_default_precision_qualifier(GrSLPrecision p,
- GrGLStandard standard,
- SkString* str) {
- // Desktop GLSL has added precision qualifiers but they don't do anything.
- if (kGLES_GrGLStandard == standard) {
- switch (p) {
- case kHigh_GrSLPrecision:
- str->append("precision highp float;\n");
- break;
- case kMedium_GrSLPrecision:
- str->append("precision mediump float;\n");
- break;
- case kLow_GrSLPrecision:
- str->append("precision lowp float;\n");
- break;
- default:
- SkFAIL("Unknown precision value.");
- }
- }
-}
static const char* specific_layout_qualifier_name(GrBlendEquation equation) {
SkASSERT(GrBlendEquationIsAdvanced(equation));
@@ -270,9 +250,9 @@ bool GrGLFragmentShaderBuilder::compileAndAttachShaders(GrGLuint programId,
SkTDArray<GrGLuint>* shaderIds) {
GrGLGpu* gpu = fProgramBuilder->gpu();
this->versionDecl() = GrGetGLSLVersionDecl(gpu->ctxInfo());
- append_default_precision_qualifier(kDefault_GrSLPrecision,
- gpu->glStandard(),
- &this->precisionQualifier());
+ GrGLSLAppendDefaultFloatPrecisionDeclaration(kDefault_GrSLPrecision,
+ gpu->glStandard(),
+ &this->precisionQualifier());
this->compileAndAppendLayoutQualifiers();
fProgramBuilder->appendUniformDecls(GrGLProgramBuilder::kFragment_Visibility,
&this->uniforms());
« no previous file with comments | « src/gpu/gl/GrGLVertexArray.cpp ('k') | src/gpu/gl/builders/GrGLProgramBuilder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698