diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2017-02-17 10:35:00 +0100 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2017-02-17 10:35:00 +0100 |
commit | 27942ce1947d3fcd18b67702f4565bb399441bb8 (patch) | |
tree | c694568db9605ec6b7a7ff6c1db178b81a9c4629 /plugingui/pixelbuffer.h | |
parent | 57f5e6102deaf8903cff99ab30546e536c4d264d (diff) |
Optimize PixelBuffer and PixelBufferAlpha setPixel method when no alpha is used.
Diffstat (limited to 'plugingui/pixelbuffer.h')
-rw-r--r-- | plugingui/pixelbuffer.h | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/plugingui/pixelbuffer.h b/plugingui/pixelbuffer.h index b9096c9..94c5496 100644 --- a/plugingui/pixelbuffer.h +++ b/plugingui/pixelbuffer.h @@ -28,9 +28,10 @@ #include "colour.h" -#include <stdlib.h> +#include <cstddef> -namespace GUI { +namespace GUI +{ class PixelBuffer { public: @@ -80,10 +81,11 @@ public: bool managed{false}; unsigned char* buf{nullptr}; - size_t width{0}; - size_t height{0}; - size_t x{0}; - size_t y{0}; + std::size_t width{0}; + std::size_t height{0}; + int x{0}; + int y{0}; + bool dirty{true}; }; } // GUI:: |