Update rive-cpp to 2.0 version
[platform/core/uifw/rive-tizen.git] / submodule / rive-cpp / test / no_op_factory.hpp
1 #ifndef _RIVE_NOOP_FACTORY_HPP_
2 #define _RIVE_NOOP_FACTORY_HPP_
3
4 #include <rive/renderer.hpp>
5 #include <rive/factory.hpp>
6
7 namespace rive {
8
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;
13
14         rcp<RenderShader> makeLinearGradient(float sx, float sy,
15                                                      float ex, float ey,
16                                                      const ColorInt colors[],    // [count]
17                                                      const float stops[],        // [count]
18                                                      int count,
19                                                      RenderTileMode,
20                                                      const Mat2D* localMatrix = nullptr) override;
21
22         rcp<RenderShader> makeRadialGradient(float cx, float cy, float radius,
23                                                      const ColorInt colors[],    // [count]
24                                                      const float stops[],        // [count]
25                                                      int count,
26                                                      RenderTileMode,
27                                                      const Mat2D* localMatrix = nullptr) override;
28
29         std::unique_ptr<RenderPath> makeRenderPath(Span<const Vec2D> points,
30                                                    Span<const uint8_t> verbs,
31                                                    FillRule) override;
32
33         std::unique_ptr<RenderPath> makeEmptyRenderPath() override;
34
35         std::unique_ptr<RenderPaint> makeRenderPaint() override;
36
37         std::unique_ptr<RenderImage> decodeImage(Span<const uint8_t>) override;
38     };
39
40     static NoOpFactory gNoOpFactory;
41
42 } // namespace rive
43 #endif