Theme Editor: WorkingWorking on speeding up the renderer, replaced for-loops with faster method call
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27329 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
60d8cff4f6
commit
e03d373957
1 changed files with 6 additions and 15 deletions
|
@ -109,11 +109,8 @@ RBFont::RBFont(QString file)
|
||||||
|
|
||||||
/* Loading the image data */
|
/* Loading the image data */
|
||||||
imageData = new quint8[header.value("nbits").toInt()];
|
imageData = new quint8[header.value("nbits").toInt()];
|
||||||
for(int i = 0; i < header.value("nbits").toInt(); i++)
|
data.readRawData(reinterpret_cast<char*>(imageData),
|
||||||
{
|
header.value("nbits").toInt());
|
||||||
data >> byte;
|
|
||||||
imageData[i] = byte;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Aligning on 16-bit boundary */
|
/* Aligning on 16-bit boundary */
|
||||||
if(header.value("nbits").toInt() % 2 == 1)
|
if(header.value("nbits").toInt() % 2 == 1)
|
||||||
|
@ -123,22 +120,16 @@ RBFont::RBFont(QString file)
|
||||||
if(header.value("noffset").toInt() > 0)
|
if(header.value("noffset").toInt() > 0)
|
||||||
{
|
{
|
||||||
offsetData = new quint16[header.value("noffset").toInt()];
|
offsetData = new quint16[header.value("noffset").toInt()];
|
||||||
for(int i = 0; i < header.value("noffset").toInt(); i++)
|
data.readRawData(reinterpret_cast<char*>(offsetData),
|
||||||
{
|
header.value("noffset").toInt() * 2);
|
||||||
data >> word;
|
|
||||||
offsetData[i] = word;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Loading the width table if necessary */
|
/* Loading the width table if necessary */
|
||||||
if(header.value("nwidth").toInt() > 0)
|
if(header.value("nwidth").toInt() > 0)
|
||||||
{
|
{
|
||||||
widthData = new quint8[header.value("nwidth").toInt()];
|
widthData = new quint8[header.value("nwidth").toInt()];
|
||||||
for(int i = 0; i < header.value("nwidth").toInt(); i++)
|
data.readRawData(reinterpret_cast<char*>(widthData),
|
||||||
{
|
header.value("nwidth").toInt());
|
||||||
data >> byte;
|
|
||||||
widthData[i] = byte;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fin.close();
|
fin.close();
|
||||||
|
|
Loading…
Reference in a new issue