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

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

Issue 1116713002: Pull out shader-specific caps into GrShaderCaps and GrGLSLCaps (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Clean up some comments Created 5 years, 8 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/GrGLProgramDesc.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 c739f1162a63fdd3faf3fcd61244f811c3485618..daea878b260d9c6952689520cb61457f012d5dd5 100644
--- a/src/gpu/gl/builders/GrGLFragmentShaderBuilder.cpp
+++ b/src/gpu/gl/builders/GrGLFragmentShaderBuilder.cpp
@@ -39,7 +39,7 @@ static void append_default_precision_qualifier(GrSLPrecision p,
GrGLFragmentShaderBuilder::DstReadKey
GrGLFragmentShaderBuilder::KeyForDstRead(const GrTexture* dstCopy, const GrGLCaps& caps) {
uint32_t key = kYesDstRead_DstReadKeyBit;
- if (caps.fbFetchSupport()) {
+ if (caps.glslCaps()->fbFetchSupport()) {
return key;
}
SkASSERT(dstCopy);
@@ -79,7 +79,7 @@ bool GrGLFragmentShaderBuilder::enableFeature(GLSLFeature feature) {
switch (feature) {
case kStandardDerivatives_GLSLFeature: {
GrGLGpu* gpu = fProgramBuilder->gpu();
- if (!gpu->glCaps().shaderDerivativeSupport()) {
+ if (!gpu->glCaps().shaderCaps()->shaderDerivativeSupport()) {
return false;
}
if (kGLES_GrGLStandard == gpu->glStandard() &&
@@ -166,13 +166,13 @@ const char* GrGLFragmentShaderBuilder::dstColor() {
fHasReadDstColor = true;
GrGLGpu* gpu = fProgramBuilder->gpu();
- if (gpu->glCaps().fbFetchSupport()) {
+ if (gpu->glCaps().glslCaps()->fbFetchSupport()) {
this->addFeature(1 << (GrGLFragmentShaderBuilder::kLastGLSLPrivateFeature + 1),
- gpu->glCaps().fbFetchExtensionString());
+ gpu->glCaps().glslCaps()->fbFetchExtensionString());
// Some versions of this extension string require declaring custom color output on ES 3.0+
- const char* fbFetchColorName = gpu->glCaps().fbFetchColorName();
- if (gpu->glCaps().fbFetchNeedsCustomOutput()) {
+ const char* fbFetchColorName = gpu->glCaps().glslCaps()->fbFetchColorName();
+ if (gpu->glCaps().glslCaps()->fbFetchNeedsCustomOutput()) {
this->enableCustomOutput();
fOutputs[fCustomColorOutputIndex].setTypeModifier(GrShaderVar::kInOut_TypeModifier);
fbFetchColorName = declared_color_output_name();
« no previous file with comments | « src/gpu/gl/GrGLProgramDesc.cpp ('k') | src/gpu/gl/builders/GrGLProgramBuilder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698