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

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

Issue 577593003: Revert of removing GrDrawEffect (Closed) Base URL: https://skia.googlesource.com/skia.git@gp3
Patch Set: Created 6 years, 3 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/GrGLProgram.cpp ('k') | src/gpu/gl/GrGLProgramEffects.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLProgramDesc.cpp
diff --git a/src/gpu/gl/GrGLProgramDesc.cpp b/src/gpu/gl/GrGLProgramDesc.cpp
index b49cff97af739ed22d0b804475914c232d54757a..bde4072cc3650b1bc2487bb4df30adcc1caf4901 100644
--- a/src/gpu/gl/GrGLProgramDesc.cpp
+++ b/src/gpu/gl/GrGLProgramDesc.cpp
@@ -8,6 +8,7 @@
#include "gl/builders/GrGLProgramBuilder.h"
#include "GrGLProgramDesc.h"
#include "GrBackendEffectFactory.h"
+#include "GrDrawEffect.h"
#include "GrEffect.h"
#include "GrGpuGL.h"
#include "GrOptDrawState.h"
@@ -23,27 +24,24 @@
bool* setTrueIfReadsPos,
bool* setTrueIfRequiresVertexShader) {
const GrBackendEffectFactory& factory = stage.getEffect()->getFactory();
- const GrEffect& effect = *stage.getEffect();
- if (effect.willReadDstColor()) {
+ GrDrawEffect drawEffect(stage, useExplicitLocalCoords);
+ if (stage.getEffect()->willReadDstColor()) {
*setTrueIfReadsDst = true;
}
- if (effect.willReadFragmentPosition()) {
+ if (stage.getEffect()->willReadFragmentPosition()) {
*setTrueIfReadsPos = true;
}
- if (effect.requiresVertexShader()) {
+ if (stage.getEffect()->requiresVertexShader()) {
*setTrueIfRequiresVertexShader = true;
}
- factory.getGLEffectKey(effect, caps, b);
+ factory.getGLEffectKey(drawEffect, caps, b);
size_t size = b->size();
if (size > SK_MaxU16) {
*effectKeySize = 0; // suppresses a warning.
return false;
}
*effectKeySize = SkToU16(size);
- if (!GrGLProgramEffects::GenEffectMetaKey(stage,
- useExplicitLocalCoords,
- caps,
- b)) {
+ if (!GrGLProgramEffects::GenEffectMetaKey(drawEffect, caps, b)) {
return false;
}
return true;
« no previous file with comments | « src/gpu/gl/GrGLProgram.cpp ('k') | src/gpu/gl/GrGLProgramEffects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698