]> git.tdb.fi Git - libs/gl.git/blobdiff - source/pixelstore.h
Be less eager to optimize constant conditions in loops
[libs/gl.git] / source / pixelstore.h
index 0c430300d9be0b5bb9c89c6bdb65c2629b741fce..80032c3c3fdc7bee3eb62d76ff2cc16e43b6f563 100644 (file)
@@ -10,6 +10,13 @@ namespace GL {
 class PixelStore: public BindableWithDefault<PixelStore>
 {
 private:
+       enum ParameterMask
+       {
+               SIZE = 1,
+               ORIGIN = 2,
+               ALIGNMENT = 4
+       };
+
        unsigned row_length;
        unsigned image_height;
        unsigned skip_pixels;
@@ -22,6 +29,10 @@ public:
 
        static PixelStore from_image(const Graphics::Image &);
 
+private:
+       void update_parameter(int) const;
+
+public:
        void set_canvas_size(unsigned, unsigned);
        void set_origin(unsigned, unsigned, unsigned);
        void set_alignment(unsigned);