macOS: Fix OSR configuration of device scale factor

This commit is contained in:
Marshall Greenblatt
2018-07-25 16:55:11 -04:00
parent 7f3c21b64a
commit 0fb03e7aa1
3 changed files with 49 additions and 18 deletions

View File

@ -452,11 +452,7 @@ class OSRTestHandler : public RoutingTestHandler,
EXPECT_EQ(dirtyRects.size(), 1U);
EXPECT_TRUE(IsFullRepaint(dirtyRects[0], GetScaledInt(kOsrWidth),
GetScaledInt(kOsrHeight)));
#if defined(OS_MACOSX)
EXPECT_EQ(0xfffd8081U, *(reinterpret_cast<const uint32*>(buffer)));
#else
EXPECT_EQ(0xffff7f7fU, *(reinterpret_cast<const uint32*>(buffer)));
#endif
DestroySucceededTestSoon();
}
break;
@ -466,11 +462,7 @@ class OSRTestHandler : public RoutingTestHandler,
EXPECT_EQ(dirtyRects.size(), 1U);
EXPECT_TRUE(IsFullRepaint(dirtyRects[0], GetScaledInt(kOsrWidth),
GetScaledInt(kOsrHeight)));
#if defined(OS_MACOSX)
EXPECT_EQ(0x807F070EU, *(reinterpret_cast<const uint32*>(buffer)));
#else
EXPECT_EQ(0x80800000U, *(reinterpret_cast<const uint32*>(buffer)));
#endif
DestroySucceededTestSoon();
}
break;
@ -715,7 +707,7 @@ class OSRTestHandler : public RoutingTestHandler,
// first pixel of border
#if defined(OS_MACOSX)
EXPECT_EQ(0xff609ad4U, *(reinterpret_cast<const uint32*>(buffer)));
EXPECT_EQ(0xff5d99d6U, *(reinterpret_cast<const uint32*>(buffer)));
#else
EXPECT_EQ(0xff6497eaU, *(reinterpret_cast<const uint32*>(buffer)));
#endif