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

Unified Diff: src/effects/gradients/SkGradientShader.cpp

Issue 365853002: Rename GrGLUniformManager to GrGLProgramResourceManager (Closed) Base URL: https://skia.googlesource.com/skia.git@02-path-program-fragment
Patch Set: rebase Created 6 years, 5 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/effects/SkTableColorFilter.cpp ('k') | src/effects/gradients/SkGradientShaderPriv.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/gradients/SkGradientShader.cpp
diff --git a/src/effects/gradients/SkGradientShader.cpp b/src/effects/gradients/SkGradientShader.cpp
index 48904fa8fd6c83ce06be296f8d7f1d8e2fc10e0a..5f0983630b6b224224502237b6ff61a318c5ad4b 100644
--- a/src/effects/gradients/SkGradientShader.cpp
+++ b/src/effects/gradients/SkGradientShader.cpp
@@ -884,29 +884,29 @@ void GrGLGradientEffect::emitUniforms(GrGLShaderBuilder* builder, uint32_t baseK
}
}
-static inline void set_color_uni(const GrGLUniformManager& uman,
- const GrGLUniformManager::UniformHandle uni,
+static inline void set_color_uni(const GrGLProgramDataManager& pdman,
+ const GrGLProgramDataManager::UniformHandle uni,
const SkColor* color) {
- uman.set4f(uni,
- SkColorGetR(*color) / 255.f,
- SkColorGetG(*color) / 255.f,
- SkColorGetB(*color) / 255.f,
- SkColorGetA(*color) / 255.f);
+ pdman.set4f(uni,
+ SkColorGetR(*color) / 255.f,
+ SkColorGetG(*color) / 255.f,
+ SkColorGetB(*color) / 255.f,
+ SkColorGetA(*color) / 255.f);
}
-static inline void set_mul_color_uni(const GrGLUniformManager& uman,
- const GrGLUniformManager::UniformHandle uni,
+static inline void set_mul_color_uni(const GrGLProgramDataManager& pdman,
+ const GrGLProgramDataManager::UniformHandle uni,
const SkColor* color){
float a = SkColorGetA(*color) / 255.f;
float aDiv255 = a / 255.f;
- uman.set4f(uni,
- SkColorGetR(*color) * aDiv255,
- SkColorGetG(*color) * aDiv255,
- SkColorGetB(*color) * aDiv255,
- a);
+ pdman.set4f(uni,
+ SkColorGetR(*color) * aDiv255,
+ SkColorGetG(*color) * aDiv255,
+ SkColorGetB(*color) * aDiv255,
+ a);
}
-void GrGLGradientEffect::setData(const GrGLUniformManager& uman,
+void GrGLGradientEffect::setData(const GrGLProgramDataManager& pdman,
const GrDrawEffect& drawEffect) {
const GrGradientEffect& e = drawEffect.castEffect<GrGradientEffect>();
@@ -915,29 +915,29 @@ void GrGLGradientEffect::setData(const GrGLUniformManager& uman,
if (SkGradientShaderBase::kTwo_GpuColorType == e.getColorType()){
if (GrGradientEffect::kBeforeInterp_PremulType == e.getPremulType()) {
- set_mul_color_uni(uman, fColorStartUni, e.getColors(0));
- set_mul_color_uni(uman, fColorEndUni, e.getColors(1));
+ set_mul_color_uni(pdman, fColorStartUni, e.getColors(0));
+ set_mul_color_uni(pdman, fColorEndUni, e.getColors(1));
} else {
- set_color_uni(uman, fColorStartUni, e.getColors(0));
- set_color_uni(uman, fColorEndUni, e.getColors(1));
+ set_color_uni(pdman, fColorStartUni, e.getColors(0));
+ set_color_uni(pdman, fColorEndUni, e.getColors(1));
}
} else if (SkGradientShaderBase::kThree_GpuColorType == e.getColorType()){
if (GrGradientEffect::kBeforeInterp_PremulType == e.getPremulType()) {
- set_mul_color_uni(uman, fColorStartUni, e.getColors(0));
- set_mul_color_uni(uman, fColorMidUni, e.getColors(1));
- set_mul_color_uni(uman, fColorEndUni, e.getColors(2));
+ set_mul_color_uni(pdman, fColorStartUni, e.getColors(0));
+ set_mul_color_uni(pdman, fColorMidUni, e.getColors(1));
+ set_mul_color_uni(pdman, fColorEndUni, e.getColors(2));
} else {
- set_color_uni(uman, fColorStartUni, e.getColors(0));
- set_color_uni(uman, fColorMidUni, e.getColors(1));
- set_color_uni(uman, fColorEndUni, e.getColors(2));
+ set_color_uni(pdman, fColorStartUni, e.getColors(0));
+ set_color_uni(pdman, fColorMidUni, e.getColors(1));
+ set_color_uni(pdman, fColorEndUni, e.getColors(2));
}
} else {
SkScalar yCoord = e.getYCoord();
if (yCoord != fCachedYCoord) {
- uman.set1f(fFSYUni, yCoord);
+ pdman.set1f(fFSYUni, yCoord);
fCachedYCoord = yCoord;
}
}
« no previous file with comments | « src/effects/SkTableColorFilter.cpp ('k') | src/effects/gradients/SkGradientShaderPriv.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698