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

Unified Diff: src/gpu/SkGr.cpp

Issue 2175563003: Bundle SkShader::asFragmentProcessor arguments in a struct (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix indentation to be less arbitrary Created 4 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/gradients/SkTwoPointConicalGradient_gpu.cpp ('k') | src/image/SkImageShader.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/SkGr.cpp
diff --git a/src/gpu/SkGr.cpp b/src/gpu/SkGr.cpp
index 452218f517b97d5440c6eb967d2f9a22aeda9782..15c389212e16376e233972f5d6ed971bad291b92 100644
--- a/src/gpu/SkGr.cpp
+++ b/src/gpu/SkGr.cpp
@@ -541,8 +541,9 @@ static inline bool skpaint_to_grpaint_impl(GrContext* context,
} else if (const SkShader* shader = skPaint.getShader()) {
SkSourceGammaTreatment gammaTreatment = allowSRGBInputs
? SkSourceGammaTreatment::kRespect : SkSourceGammaTreatment::kIgnore;
- shaderFP = shader->asFragmentProcessor(context, viewM, nullptr,
- skPaint.getFilterQuality(), gammaTreatment);
+ shaderFP = shader->asFragmentProcessor(SkShader::AsFPArgs(context, &viewM, nullptr,
+ skPaint.getFilterQuality(),
+ gammaTreatment));
if (!shaderFP) {
return false;
}
@@ -710,11 +711,11 @@ bool SkPaintToGrPaintWithTexture(GrContext* context,
if (const SkShader* shader = paint.getShader()) {
SkSourceGammaTreatment gammaTreatment = allowSRGBInputs
? SkSourceGammaTreatment::kRespect : SkSourceGammaTreatment::kIgnore;
- shaderFP = shader->asFragmentProcessor(context,
- viewM,
- nullptr,
- paint.getFilterQuality(),
- gammaTreatment);
+ shaderFP = shader->asFragmentProcessor(SkShader::AsFPArgs(context,
+ &viewM,
+ nullptr,
+ paint.getFilterQuality(),
+ gammaTreatment));
if (!shaderFP) {
return false;
}
« no previous file with comments | « src/effects/gradients/SkTwoPointConicalGradient_gpu.cpp ('k') | src/image/SkImageShader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698