Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/imbuf/intern/rasterizer_target.hh')
-rw-r--r--source/blender/imbuf/intern/rasterizer_target.hh11
1 files changed, 6 insertions, 5 deletions
diff --git a/source/blender/imbuf/intern/rasterizer_target.hh b/source/blender/imbuf/intern/rasterizer_target.hh
index 25830b4006a..d181d9e1e06 100644
--- a/source/blender/imbuf/intern/rasterizer_target.hh
+++ b/source/blender/imbuf/intern/rasterizer_target.hh
@@ -17,19 +17,20 @@ namespace blender::imbuf::rasterizer {
* An abstract implementation of a drawing target. Will make it possible to switch to other render
* targets then only ImBuf types.
*/
-template<typename Inner> class AbstractDrawingTarget {
+template<typename Buffer, typename Pixel = float> class AbstractDrawingTarget {
public:
- using InnerType = Inner;
+ using BufferType = Buffer;
+ using PixelType = Pixel;
virtual uint64_t get_width() const = 0;
virtual uint64_t get_height() const = 0;
- virtual float *get_pixel_ptr(uint64_t x, uint64_t y) = 0;
+ virtual PixelType *get_pixel_ptr(uint64_t x, uint64_t y) = 0;
virtual int64_t get_pixel_stride() const = 0;
virtual bool has_active_target() const = 0;
- virtual void activate(Inner *instance) = 0;
+ virtual void activate(BufferType *instance) = 0;
virtual void deactivate() = 0;
};
-class ImageBufferDrawingTarget : public AbstractDrawingTarget<ImBuf> {
+class ImageBufferDrawingTarget : public AbstractDrawingTarget<ImBuf, float> {
private:
ImBuf *image_buffer_ = nullptr;