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

Unified Diff: src/gpu/effects/GrTextureDomain.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/effects/GrSimpleTextureEffect.cpp ('k') | src/gpu/effects/GrYUVtoRGBEffect.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/effects/GrTextureDomain.cpp
diff --git a/src/gpu/effects/GrTextureDomain.cpp b/src/gpu/effects/GrTextureDomain.cpp
index 40006a3f4998d63fd0f685d741eb01651e64659a..664c65c121d86c81c2cbe0d483e01795d57c03f3 100644
--- a/src/gpu/effects/GrTextureDomain.cpp
+++ b/src/gpu/effects/GrTextureDomain.cpp
@@ -167,19 +167,19 @@ void GrTextureDomain::GLDomain::setData(const GrGLProgramDataManager& pdman,
class GrGLTextureDomainEffect : public GrGLEffect {
public:
- GrGLTextureDomainEffect(const GrBackendEffectFactory&, const GrDrawEffect&);
+ GrGLTextureDomainEffect(const GrBackendEffectFactory&, const GrEffect&);
virtual void emitCode(GrGLProgramBuilder*,
- const GrDrawEffect&,
+ const GrEffect&,
const GrEffectKey&,
const char* outputColor,
const char* inputColor,
const TransformedCoordsArray&,
const TextureSamplerArray&) SK_OVERRIDE;
- virtual void setData(const GrGLProgramDataManager&, const GrDrawEffect&) SK_OVERRIDE;
+ virtual void setData(const GrGLProgramDataManager&, const GrEffect&) SK_OVERRIDE;
- static inline void GenKey(const GrDrawEffect&, const GrGLCaps&, GrEffectKeyBuilder*);
+ static inline void GenKey(const GrEffect&, const GrGLCaps&, GrEffectKeyBuilder*);
private:
GrTextureDomain::GLDomain fGLDomain;
@@ -187,19 +187,19 @@ private:
};
GrGLTextureDomainEffect::GrGLTextureDomainEffect(const GrBackendEffectFactory& factory,
- const GrDrawEffect&)
+ const GrEffect&)
: INHERITED(factory) {
}
void GrGLTextureDomainEffect::emitCode(GrGLProgramBuilder* builder,
- const GrDrawEffect& drawEffect,
+ const GrEffect& effect,
const GrEffectKey& key,
const char* outputColor,
const char* inputColor,
const TransformedCoordsArray& coords,
const TextureSamplerArray& samplers) {
- const GrTextureDomainEffect& effect = drawEffect.castEffect<GrTextureDomainEffect>();
- const GrTextureDomain& domain = effect.textureDomain();
+ const GrTextureDomainEffect& textureDomainEffect = effect.cast<GrTextureDomainEffect>();
+ const GrTextureDomain& domain = textureDomainEffect.textureDomain();
GrGLFragmentShaderBuilder* fsBuilder = builder->getFragmentShaderBuilder();
SkString coords2D = fsBuilder->ensureFSCoords2D(coords, 0);
@@ -207,15 +207,15 @@ void GrGLTextureDomainEffect::emitCode(GrGLProgramBuilder* builder,
}
void GrGLTextureDomainEffect::setData(const GrGLProgramDataManager& pdman,
- const GrDrawEffect& drawEffect) {
- const GrTextureDomainEffect& effect = drawEffect.castEffect<GrTextureDomainEffect>();
- const GrTextureDomain& domain = effect.textureDomain();
+ const GrEffect& effect) {
+ const GrTextureDomainEffect& textureDomainEffect = effect.cast<GrTextureDomainEffect>();
+ const GrTextureDomain& domain = textureDomainEffect.textureDomain();
fGLDomain.setData(pdman, domain, effect.texture(0)->origin());
}
-void GrGLTextureDomainEffect::GenKey(const GrDrawEffect& drawEffect, const GrGLCaps&,
+void GrGLTextureDomainEffect::GenKey(const GrEffect& effect, const GrGLCaps&,
GrEffectKeyBuilder* b) {
- const GrTextureDomain& domain = drawEffect.castEffect<GrTextureDomainEffect>().textureDomain();
+ const GrTextureDomain& domain = effect.cast<GrTextureDomainEffect>().textureDomain();
b->add32(GrTextureDomain::GLDomain::DomainKey(domain));
}
@@ -264,7 +264,7 @@ const GrBackendEffectFactory& GrTextureDomainEffect::getFactory() const {
}
bool GrTextureDomainEffect::onIsEqual(const GrEffect& sBase) const {
- const GrTextureDomainEffect& s = CastEffect<GrTextureDomainEffect>(sBase);
+ const GrTextureDomainEffect& s = sBase.cast<GrTextureDomainEffect>();
return this->hasSameTextureParamsMatrixAndSourceCoords(s) &&
this->fTextureDomain == s.fTextureDomain;
}
« no previous file with comments | « src/gpu/effects/GrSimpleTextureEffect.cpp ('k') | src/gpu/effects/GrYUVtoRGBEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698