Update GrPaint APIs to reflect lack of multiple color processors.
Change-Id: Ic7799b3c5f4294cba9ff72f8c11a2ad285ab189f
Bug: skia:10217
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/304738
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
diff --git a/gm/yuvtorgbeffect.cpp b/gm/yuvtorgbeffect.cpp
index 24ed674..7f5c81d 100644
--- a/gm/yuvtorgbeffect.cpp
+++ b/gm/yuvtorgbeffect.cpp
@@ -129,7 +129,7 @@
if (fp) {
GrPaint grPaint;
grPaint.setXPFactory(GrPorterDuffXPFactory::Get(SkBlendMode::kSrc));
- grPaint.addColorFragmentProcessor(std::move(fp));
+ grPaint.setColorFragmentProcessor(std::move(fp));
SkMatrix viewMatrix;
viewMatrix.setTranslate(x, y);
renderTargetContext->priv().testingOnly_addDrawOp(
@@ -244,7 +244,7 @@
if (fp) {
SkMatrix viewMatrix;
viewMatrix.setTranslate(x, y);
- grPaint.addColorFragmentProcessor(std::move(fp));
+ grPaint.setColorFragmentProcessor(std::move(fp));
std::unique_ptr<GrDrawOp> op(GrFillRectOp::MakeNonAARect(
context, std::move(grPaint), viewMatrix, renderRect));
renderTargetContext->priv().testingOnly_addDrawOp(std::move(op));
@@ -362,7 +362,7 @@
samplerState, caps, SkMatrix::I(), subset));
if (fp) {
GrPaint grPaint;
- grPaint.addColorFragmentProcessor(std::move(fp));
+ grPaint.setColorFragmentProcessor(std::move(fp));
renderTargetContext->drawRect(
nullptr, std::move(grPaint), GrAA::kYes, ctm, rect);
}