Rewrite of FbTk::TextureRender

* much more readable and easier to read code
* smaller code
* reduced binary size due to removed big lookup-table for square root
* simple 'optimizations (lookup tables, packing of data), nothing too fancy
This commit is contained in:
Mathias Gumz 2012-11-08 11:02:28 +01:00
parent 2e663cb784
commit b4534e0f28
3 changed files with 652 additions and 1148 deletions

File diff suppressed because it is too large Load diff

View file

@ -36,8 +36,10 @@ class Texture;
/// Renders texture to pixmap
/**
This is used with BImageControl to render textures
This is used with ImageControl to render textures
*/
struct RGBA;
class TextureRender {
public:
TextureRender(ImageControl &ic, unsigned int width, unsigned int height,
@ -67,10 +69,10 @@ private:
ImageControl &control;
int red_offset, green_offset, blue_offset, red_bits, green_bits, blue_bits,
cpc;
unsigned char *red, *green, *blue;
const unsigned char *red_table, *green_table, *blue_table;
int cpc, cpccpc;
RGBA* rgba;
//unsigned char *red, *green, *blue;
Orientation orientation;
unsigned int width, height;
};

View file

@ -186,7 +186,7 @@ texture44.colorTo: green
--- new line
texture45: Flat Solid bevel1
texture45.color: blue
texture45.color: grey
texture45.colorTo: green
texture46: Gradient Vertical bevel1