1 #ifndef _RIVE_NOOP_FACTORY_HPP_
2 #define _RIVE_NOOP_FACTORY_HPP_
4 #include <rive/renderer.hpp>
5 #include <rive/factory.hpp>
9 class NoOpFactory : public Factory {
10 rcp<RenderBuffer> makeBufferU16(Span<const uint16_t>) override;
11 rcp<RenderBuffer> makeBufferU32(Span<const uint32_t>) override;
12 rcp<RenderBuffer> makeBufferF32(Span<const float>) override;
14 rcp<RenderShader> makeLinearGradient(float sx, float sy,
16 const ColorInt colors[], // [count]
17 const float stops[], // [count]
20 const Mat2D* localMatrix = nullptr) override;
22 rcp<RenderShader> makeRadialGradient(float cx, float cy, float radius,
23 const ColorInt colors[], // [count]
24 const float stops[], // [count]
27 const Mat2D* localMatrix = nullptr) override;
29 std::unique_ptr<RenderPath> makeRenderPath(Span<const Vec2D> points,
30 Span<const uint8_t> verbs,
33 std::unique_ptr<RenderPath> makeEmptyRenderPath() override;
35 std::unique_ptr<RenderPaint> makeRenderPaint() override;
37 std::unique_ptr<RenderImage> decodeImage(Span<const uint8_t>) override;
40 static NoOpFactory gNoOpFactory;