1 // [Blend2D] 2 // 2D Vector Graphics Powered by a JIT Compiler. 3 // 4 // [License] 5 // Zlib - See LICENSE.md file in the package. 6 7 #ifndef BLEND2D_PIPEGEN_FETCHSOLIDPART_P_H 8 #define BLEND2D_PIPEGEN_FETCHSOLIDPART_P_H 9 10 #include "../pipegen/fetchpart_p.h" 11 12 //! \cond INTERNAL 13 //! \addtogroup blend2d_internal_pipegen 14 //! \{ 15 16 namespace BLPipeGen { 17 18 // ============================================================================ 19 // [BLPipeGen::FetchSolidPart] 20 // ============================================================================ 21 22 //! Pipeline solid-fetch part. 23 class FetchSolidPart : public FetchPart { 24 public: 25 BL_NONCOPYABLE(FetchSolidPart) 26 27 //! Source pixel, expanded to the whole register if necessary. 28 Pixel _pixel; 29 30 FetchSolidPart(PipeCompiler* pc, uint32_t fetchType, uint32_t fetchPayload, uint32_t format) noexcept; 31 32 void _initPart(x86::Gp& x, x86::Gp& y) noexcept override; 33 void _finiPart() noexcept override; 34 35 //! Injects code at the beginning of the pipeline that is required to prepare 36 //! the requested variables that will be used by a special compositor that can 37 //! composite the destination with solid pixels. Multiple calls to `prepareSolid()` 38 //! are allowed and this feature is used to setup variables required by various 39 //! parts of the pipeline. 40 //! 41 //! \note Initialization means code injection, calling `prepareSolid()` will 42 //! not emit any code at the current position, it will instead inject code to 43 //! the position saved by `init()`. 44 void initSolidFlags(uint32_t flags) noexcept; 45 46 void fetch1(Pixel& p, uint32_t flags) noexcept override; 47 void fetch4(Pixel& p, uint32_t flags) noexcept override; 48 }; 49 50 } // {BLPipeGen} 51 52 //! \} 53 //! \endcond 54 55 #endif // BLEND2D_PIPEGEN_FETCHSOLIDPART_P_H 56