display optimisation

This commit is contained in:
Edouard Dupin 2012-02-18 15:56:41 +01:00
parent 62852ff7c9
commit bd8b05eaf2
7 changed files with 20 additions and 4 deletions

View File

@ -630,7 +630,7 @@ template<typename MY_TYPE=int32_t> class VectorType
}
int32_t numberOfStep = m_allocated / devide;
if (newSize< ((numberOfStep-2)*devide + devide/2) ) {
//Allow Reallocation of a new size shoerter
//Allow Reallocation of a new size shorter
requestSize = ((newSize / devide)+1) * devide;
}
}

View File

@ -69,6 +69,11 @@ void ewol::OObject2DColored::Draw(void)
}
void ewol::OObject2DColored::Clear(void)
{
m_coord.Clear();
m_coordColor.Clear();
}
void ewol::OObject2DColored::UpdateOrigin(etkFloat_t x, etkFloat_t y)
{

View File

@ -45,6 +45,7 @@ namespace ewol {
void GenerateTriangle(void);
void ResetCount(void);
public:
void Clear(void);
void SetColor(etkFloat_t red, etkFloat_t green, etkFloat_t blue, etkFloat_t alpha = 1.0);
void SetColor(color_ts color);
void SetPoint(coord2D_ts point);

View File

@ -42,6 +42,11 @@ ewol::OObject2DTextColored::OObject2DTextColored(etk::UString FontName, int32_t
//m_FontId = GetFontIdWithName(FontName);
m_FontId = -1;
}
/*
m_coord.SetIncrement(50000);
m_coordTex.SetIncrement(50000);
m_coordColor.SetIncrement(50000);
*/
}
ewol::OObject2DTextColored::OObject2DTextColored(int32_t fontID)

View File

@ -51,6 +51,7 @@ namespace ewol {
etk::VectorType<texCoord_ts> m_coordTex; //!< internal texture coordinate for every point
etk::VectorType<color_ts> m_coordColor; //!< internal color of the different point
public:
void SetFontID(int32_t fontID) { m_FontId = fontID; };
int32_t GetFontID(void) { return m_FontId; };
virtual void UpdateOrigin(etkFloat_t x, etkFloat_t y);
};

View File

@ -255,11 +255,12 @@ namespace ewol {
private:
bool m_genericDraw;
bool m_specificDraw;
etk::VectorType<ewol::OObject*> m_listOObject[NB_BOUBLE_BUFFER]; //!< generic element to display...
bool GenericDraw(void);
protected:
int32_t m_currentDrawId;
int32_t m_currentCreateId;
bool m_needFlipFlop;
etk::VectorType<ewol::OObject*> m_listOObject[NB_BOUBLE_BUFFER]; //!< generic element to display...
bool GenericDraw(void);
public:
void DoubleBufferFlipFlop(void);
protected:

View File

@ -250,13 +250,16 @@ void EWOL_SystemStart(void)
//pthread_attr_setdetachstate(&androidJniThreadAttr, PTHREAD_CREATE_JOINABLE)
pthread_attr_setdetachstate(&androidJniThreadAttr, PTHREAD_CREATE_DETACHED);
//pthread_attr_setscope( &androidJniThreadAttr, PTHREAD_SCOPE_SYSTEM);
/* // note android does not permit to change the thread priority ...
// try to set prio :
struct sched_param pr;
pr.sched_priority = 10;
pthread_attr_setschedpolicy(&androidJniThreadAttr, SCHED_RR);
pthread_attr_setschedparam(&androidJniThreadAttr, &pr);
*/
pthread_setname_np(androidJniThread, "ewol_basic_thread");
pthread_create(&androidJniThread, &androidJniThreadAttr, BaseAppEntry, NULL);
//pthread_create(&androidJniThread, NULL, BaseAppEntry, NULL);
isGlobalSystemInit = true;
EWOL_DEBUG("Send Init message to the thread");