speculative fix for debug/release problem on windows with mirror bitmaps

Review URL: https://codereview.appspot.com/6063051

git-svn-id: http://skia.googlecode.com/svn/trunk@3728 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
reed@google.com 2012-04-18 20:16:18 +00:00
parent aeb0786405
commit a4b0d139e3

View File

@ -93,6 +93,12 @@ static inline U16CPU fixed_repeat(SkFixed x)
return x & 0xFFFF;
}
// Visual Studio 2010 (MSC_VER=1600) optimizes bit-shift code incorrectly.
// See http://code.google.com/p/skia/issues/detail?id=472
#if defined(_MSC_VER) && (_MSC_VER >= 1600)
#pragma optimize("", off)
#endif
static inline U16CPU fixed_mirror(SkFixed x)
{
SkFixed s = x << 15 >> 31;
@ -100,6 +106,10 @@ static inline U16CPU fixed_mirror(SkFixed x)
return (x ^ s) & 0xFFFF;
}
#if defined(_MSC_VER) && (_MSC_VER >= 1600)
#pragma optimize("", on)
#endif
static SkBitmapProcState::FixedTileProc choose_tile_proc(unsigned m)
{
if (SkShader::kClamp_TileMode == m)