~townsend/compiz/fix-auto-vp-switch-0.9.10

« back to all changes in this revision

Viewing changes to plugins/text/src/private.h

Text, speed improvements:

Introduced
const float halfPi    = PI / 2.0f; and
const float triHalfPi = halfPi * 3;
and used those to draw the rounded background.
Introduced
GLfloat xPlusWidth   = x + width; and
GLfloat yMinusHeight = y - height;
and used those coordinates for the vertexData array.

Text, cleanup:

Declaration of local variables outside of loops.
Fixed indentation.

Approved by PS Jenkins bot, Sam Spilsbury.

Show diffs side-by-side

added added

removed removed

Lines of Context:
77
77
        bool render (const CompText::Attrib &attrib,
78
78
                     const CompString       &text);
79
79
 
80
 
        int                  mWidth;
81
 
        int                  mHeight;
82
 
        Pixmap               mPixmap;
 
80
        int    mWidth;
 
81
        int    mHeight;
 
82
        Pixmap mPixmap;
83
83
 
84
84
    private:
85
85