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

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

Issue 571163002: removing GrDrawEffect (Closed) Base URL: https://skia.googlesource.com/skia.git@gp3
Patch Set: rebase after revert 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 d7ba287cfa623bc9050cd3b93ccdba686c5ff302..4056c77808750f97620e30f2e1ab0119a6edfa71 100644
--- a/src/gpu/gl/GrGLProgramDesc.cpp
+++ b/src/gpu/gl/GrGLProgramDesc.cpp
@@ -8,7 +8,6 @@
#include "gl/builders/GrGLProgramBuilder.h"
#include "GrGLProgramDesc.h"
#include "GrBackendEffectFactory.h"
-#include "GrDrawEffect.h"
#include "GrEffect.h"
#include "GrGpuGL.h"
@@ -23,24 +22,27 @@ bool GrGLProgramDesc::GetEffectKeyAndUpdateStats(const GrEffectStage& stage,
bool* setTrueIfReadsPos,
bool* setTrueIfRequiresVertexShader) {
const GrBackendEffectFactory& factory = stage.getEffect()->getFactory();
- GrDrawEffect drawEffect(stage, useExplicitLocalCoords);
- if (stage.getEffect()->willReadDstColor()) {
+ const GrEffect& effect = *stage.getEffect();
+ if (effect.willReadDstColor()) {
*setTrueIfReadsDst = true;
}
- if (stage.getEffect()->willReadFragmentPosition()) {
+ if (effect.willReadFragmentPosition()) {
*setTrueIfReadsPos = true;
}
- if (stage.getEffect()->requiresVertexShader()) {
+ if (effect.requiresVertexShader()) {
*setTrueIfRequiresVertexShader = true;
}
- factory.getGLEffectKey(drawEffect, caps, b);
+ factory.getGLEffectKey(effect, caps, b);
size_t size = b->size();
if (size > SK_MaxU16) {
*effectKeySize = 0; // suppresses a warning.
return false;
}
*effectKeySize = SkToU16(size);
- if (!GrGLProgramEffects::GenEffectMetaKey(drawEffect, caps, b)) {
+ if (!GrGLProgramEffects::GenEffectMetaKey(stage,
+ useExplicitLocalCoords,
+ 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