From b493eebca14aefbd5f22fb5d45ba978b19db4b18 Mon Sep 17 00:00:00 2001 From: Robert Phillips Date: Wed, 13 Sep 2017 13:10:52 -0400 Subject: Add method to iterate over a GrOp's GrSurfaceProxies The extra generality of having a std::function is for MDB reordering. In the current MDB reordering world there is one pass through the surfaceProxies at creation time and a second pass after flush to create the usage intervals. Change-Id: I3f548417eddc1dad7503d919241301e404255ffe Reviewed-on: https://skia-review.googlesource.com/46200 Reviewed-by: Brian Osman Commit-Queue: Robert Phillips --- gm/convexpolyeffect.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'gm/convexpolyeffect.cpp') diff --git a/gm/convexpolyeffect.cpp b/gm/convexpolyeffect.cpp index dcde1045c9..ab9a4d08d0 100644 --- a/gm/convexpolyeffect.cpp +++ b/gm/convexpolyeffect.cpp @@ -42,12 +42,16 @@ class PolyBoundsOp : public GrMeshDrawOp { public: DEFINE_OP_CLASS_ID - const char* name() const override { return "PolyBoundsOp"; } - static std::unique_ptr Make(GrPaint&& paint, const SkRect& rect) { return std::unique_ptr(new PolyBoundsOp(std::move(paint), rect)); } + const char* name() const override { return "PolyBoundsOp"; } + + void visitProxies(VisitProxyFunc func) const override { + fProcessors.visitProxies(func); + } + FixedFunctionFlags fixedFunctionFlags() const override { return FixedFunctionFlags::kNone; } RequiresDstTexture finalize(const GrCaps& caps, const GrAppliedClip* clip) override { -- cgit v1.2.3