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_FETCHPIXELPTRPART_P_H 8 #define BLEND2D_PIPEGEN_FETCHPIXELPTRPART_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::FetchPixelPtrPart] 20 // ============================================================================ 21 22 //! Pipeline fetch pixel-pointer part. 23 class FetchPixelPtrPart : public FetchPart { 24 public: 25 BL_NONCOPYABLE(FetchPixelPtrPart) 26 27 //! Pixel pointer. 28 x86::Gp _ptr; 29 //! Pixel pointer alignment (updated by FillPart|CompOpPart). 30 uint8_t _ptrAlignment; 31 32 FetchPixelPtrPart(PipeCompiler* pc, uint32_t fetchType, uint32_t fetchPayload, uint32_t format) noexcept; 33 34 //! Initializes the pixel pointer to `p`. initPtr(const x86::Gp & p)35 inline void initPtr(const x86::Gp& p) noexcept { _ptr = p; } 36 //! Returns the pixel-pointer. ptr()37 inline x86::Gp& ptr() noexcept { return _ptr; } 38 39 //! Returns the pixel-pointer alignment. ptrAlignment()40 inline uint32_t ptrAlignment() const noexcept { return _ptrAlignment; } 41 //! Sets the pixel-pointer alignment. setPtrAlignment(uint32_t alignment)42 inline void setPtrAlignment(uint32_t alignment) noexcept { _ptrAlignment = uint8_t(alignment); } 43 44 void fetch1(Pixel& p, uint32_t flags) noexcept override; 45 void fetch4(Pixel& p, uint32_t flags) noexcept override; 46 void fetch8(Pixel& p, uint32_t flags) noexcept override; 47 }; 48 49 } // {BLPipeGen} 50 51 //! \} 52 //! \endcond 53 54 #endif // BLEND2D_PIPEGEN_FETCHPIXELPTRPART_P_H 55