summaryrefslogtreecommitdiff
path: root/src/resources/dye_unittest.cc
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-08-04 00:13:18 +0300
committerAndrei Karas <akaras@inbox.ru>2013-08-18 19:36:33 +0300
commitf97a167c445790fb380c2f730c377271e80e0d97 (patch)
tree24525423d2e50bab0dd519d016da33c0c5387e6d /src/resources/dye_unittest.cc
parentd99a3f4a96b754a788c4a147be27dd212d90f743 (diff)
downloadmv-f97a167c445790fb380c2f730c377271e80e0d97.tar.gz
mv-f97a167c445790fb380c2f730c377271e80e0d97.tar.bz2
mv-f97a167c445790fb380c2f730c377271e80e0d97.tar.xz
mv-f97a167c445790fb380c2f730c377271e80e0d97.zip
improve OpenGL A,S dye speed.
Diffstat (limited to 'src/resources/dye_unittest.cc')
-rw-r--r--src/resources/dye_unittest.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/resources/dye_unittest.cc b/src/resources/dye_unittest.cc
index 10059ca34..dcea7bba6 100644
--- a/src/resources/dye_unittest.cc
+++ b/src/resources/dye_unittest.cc
@@ -32,7 +32,7 @@ TEST(Dye, replaceSOGLColor1)
data[1] = 0x02;
data[2] = 0x03;
data[3] = 0x10;
- palette.replaceSOGLColor(&data[0]);
+ palette.replaceSOGLColor(reinterpret_cast<uint32_t*>(&data[0]), 1);
EXPECT_EQ(0x01, data[0]);
EXPECT_EQ(0x02, data[1]);
EXPECT_EQ(0x03, data[2]);
@@ -47,7 +47,7 @@ TEST(Dye, replaceSOGLColor2)
data[1] = 0xff;
data[2] = 0x00;
data[3] = 0x20;
- palette.replaceSOGLColor(&data[0]);
+ palette.replaceSOGLColor(reinterpret_cast<uint32_t*>(&data[0]), 1);
EXPECT_EQ(0x00, data[0]);
EXPECT_EQ(0x00, data[1]);
EXPECT_EQ(0x11, data[2]);
@@ -62,7 +62,7 @@ TEST(Dye, replaceSOGLColor3)
data[1] = 0x00;
data[2] = 0xee;
data[3] = 0x40;
- palette.replaceSOGLColor(&data[0]);
+ palette.replaceSOGLColor(reinterpret_cast<uint32_t*>(&data[0]), 1);
EXPECT_EQ(0x10, data[0]);
EXPECT_EQ(0x20, data[1]);
EXPECT_EQ(0x30, data[2]);
@@ -78,7 +78,7 @@ TEST(Dye, replaceAOGLColor1)
data[1] = 0x02;
data[2] = 0x03;
data[3] = 0x10;
- palette.replaceAOGLColor(&data[0]);
+ palette.replaceAOGLColor(reinterpret_cast<uint32_t*>(&data[0]), 1);
EXPECT_EQ(0x01, data[0]);
EXPECT_EQ(0x02, data[1]);
EXPECT_EQ(0x03, data[2]);
@@ -93,7 +93,7 @@ TEST(Dye, replaceAOGLColor2)
data[1] = 0xff;
data[2] = 0x00;
data[3] = 0x20;
- palette.replaceAOGLColor(&data[0]);
+ palette.replaceAOGLColor(reinterpret_cast<uint32_t*>(&data[0]), 1);
EXPECT_EQ(0x00, data[0]);
EXPECT_EQ(0x00, data[1]);
EXPECT_EQ(0x11, data[2]);
@@ -108,7 +108,7 @@ TEST(Dye, replaceAOGLColor3)
data[1] = 0x00;
data[2] = 0xee;
data[3] = 0x40;
- palette.replaceAOGLColor(&data[0]);
+ palette.replaceAOGLColor(reinterpret_cast<uint32_t*>(&data[0]), 1);
EXPECT_EQ(0x10, data[0]);
EXPECT_EQ(0x20, data[1]);
EXPECT_EQ(0x30, data[2]);