From 27942ce1947d3fcd18b67702f4565bb399441bb8 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Fri, 17 Feb 2017 10:35:00 +0100 Subject: Optimize PixelBuffer and PixelBufferAlpha setPixel method when no alpha is used. --- plugingui/pixelbuffer.h | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'plugingui/pixelbuffer.h') 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 +#include -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:: -- cgit v1.2.3