Change SkShader;asFragmentProcessor signature to no longer take skpaint\grcolor*
Committed: https://skia.googlesource.com/skia/+/ecfdc251be71f3d634e76afdd6375bf55fc061aa
Review URL: https://codereview.chromium.org/1316513002
diff --git a/src/gpu/SkGr.cpp b/src/gpu/SkGr.cpp
index ca78ff1..4293194 100644
--- a/src/gpu/SkGr.cpp
+++ b/src/gpu/SkGr.cpp
@@ -851,22 +851,13 @@
GrColor paintColor = SkColor2GrColor(skPaint.getColor());
- // Start a new block here in order to preserve our context state after calling
- // asFragmentProcessor(). Since these calls get passed back to the client, we don't really
- // want them messing around with the context.
- {
- // Allow the shader to modify paintColor and also create an effect to be installed as
- // the first color effect on the GrPaint.
- GrFragmentProcessor* fp = nullptr;
- if (!shader->asFragmentProcessor(context, skPaint, viewM, nullptr, &paintColor,
- grPaint->getProcessorDataManager(), &fp)) {
- return false;
- }
- if (fp) {
- grPaint->addColorFragmentProcessor(fp)->unref();
- constantColor = false;
- }
+ const GrFragmentProcessor* fp = shader->asFragmentProcessor(context, viewM, NULL,
+ skPaint.getFilterQuality(), grPaint->getProcessorDataManager());
+ if (!fp) {
+ return false;
}
+ grPaint->addColorFragmentProcessor(fp)->unref();
+ constantColor = false;
// The grcolor is automatically set when calling asFragmentProcessor.
// If the shader can be seen as an effect it returns true and adds its effect to the grpaint.