mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-12-24 18:08:44 +00:00
Changed: Cast to CRGBA* is faster than set8888
This commit is contained in:
parent
3fae0fe91f
commit
459d6b611b
1 changed files with 3 additions and 3 deletions
|
@ -443,14 +443,14 @@ bool CBitmap::isGrayscale() const
|
||||||
uint32 *data = (uint32*)_Data[0].getPtr();
|
uint32 *data = (uint32*)_Data[0].getPtr();
|
||||||
uint32 *endData = (uint32*)((uint8*)data + size);
|
uint32 *endData = (uint32*)((uint8*)data + size);
|
||||||
|
|
||||||
NLMISC::CRGBA color;
|
NLMISC::CRGBA *color = NULL;
|
||||||
|
|
||||||
// check if all alphas have the same value
|
// check if all alphas have the same value
|
||||||
while(data < endData)
|
while(data < endData)
|
||||||
{
|
{
|
||||||
color.set8888(*data);
|
color = (NLMISC::CRGBA*)data;
|
||||||
|
|
||||||
if (!color.isGray()) return false;
|
if (!color->isGray()) return false;
|
||||||
|
|
||||||
++data;
|
++data;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue