зеркало из https://github.com/mozilla/moz-skia.git
set nominmax on windows
R=scroggo@google.com Review URL: https://codereview.chromium.org/20990007 git-svn-id: http://skia.googlecode.com/svn/trunk@10470 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
Родитель
b6bd24d31f
Коммит
f3f2d1619e
|
@ -20,16 +20,15 @@ TimerData::TimerData(const SkString& perIterTimeFormat, const SkString& normalTi
|
|||
, fTruncatedCpuStr(" Cmsecs = ")
|
||||
, fGpuStr(" gmsecs = ")
|
||||
, fWallSum(0.0)
|
||||
, fWallMin((numeric_limits<double>::max)()) // Extra parens to make the windows build work, due to
|
||||
// 'max' macro
|
||||
, fWallMin(numeric_limits<double>::max())
|
||||
, fTruncatedWallSum(0.0)
|
||||
, fTruncatedWallMin((numeric_limits<double>::max)())
|
||||
, fTruncatedWallMin(numeric_limits<double>::max())
|
||||
, fCpuSum(0.0)
|
||||
, fCpuMin((numeric_limits<double>::max)())
|
||||
, fCpuMin(numeric_limits<double>::max())
|
||||
, fTruncatedCpuSum(0.0)
|
||||
, fTruncatedCpuMin((numeric_limits<double>::max)())
|
||||
, fTruncatedCpuMin(numeric_limits<double>::max())
|
||||
, fGpuSum(0.0)
|
||||
, fGpuMin((numeric_limits<double>::max)())
|
||||
, fGpuMin(numeric_limits<double>::max())
|
||||
, fPerIterTimeFormat(perIterTimeFormat)
|
||||
, fNormalTimeFormat(normalTimeFormat)
|
||||
{}
|
||||
|
|
|
@ -140,13 +140,23 @@
|
|||
#define WIN32_LEAN_AND_MEAN
|
||||
#define WIN32_IS_MEAN_WAS_LOCALLY_DEFINED
|
||||
#endif
|
||||
#ifndef NOMINMAX
|
||||
#define NOMINMAX
|
||||
#define NOMINMAX_WAS_LOCALLY_DEFINED
|
||||
#endif
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
#ifdef WIN32_IS_MEAN_WAS_LOCALLY_DEFINED
|
||||
#undef WIN32_IS_MEAN_WAS_LOCALLY_DEFINED
|
||||
#undef WIN32_LEAN_AND_MEAN
|
||||
#endif
|
||||
|
||||
#ifdef NOMINMAX_WAS_LOCALLY_DEFINED
|
||||
#undef NOMINMAX_WAS_LOCALLY_DEFINED
|
||||
#undef NOMINMAX
|
||||
#endif
|
||||
|
||||
#ifndef SK_DEBUGBREAK
|
||||
#define SK_DEBUGBREAK(cond) do { if (!(cond)) { SkNO_RETURN_HINT(); __debugbreak(); }} while (false)
|
||||
#endif
|
||||
|
|
|
@ -312,7 +312,7 @@ HGLRC SkCreateWGLContext(HDC dc, int msaaSampleCount, bool preferCoreProfile) {
|
|||
unsigned int num;
|
||||
int formats[64];
|
||||
extensions.choosePixelFormat(dc, msaaIAttrs, fAttrs, 64, formats, &num);
|
||||
num = min(num,64);
|
||||
num = SkTMin(num, 64U);
|
||||
int formatToTry = extensions.selectFormat(formats,
|
||||
num,
|
||||
dc,
|
||||
|
|
Загрузка…
Ссылка в новой задаче