зеркало из 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 = ")
|
, fTruncatedCpuStr(" Cmsecs = ")
|
||||||
, fGpuStr(" gmsecs = ")
|
, fGpuStr(" gmsecs = ")
|
||||||
, fWallSum(0.0)
|
, fWallSum(0.0)
|
||||||
, fWallMin((numeric_limits<double>::max)()) // Extra parens to make the windows build work, due to
|
, fWallMin(numeric_limits<double>::max())
|
||||||
// 'max' macro
|
|
||||||
, fTruncatedWallSum(0.0)
|
, fTruncatedWallSum(0.0)
|
||||||
, fTruncatedWallMin((numeric_limits<double>::max)())
|
, fTruncatedWallMin(numeric_limits<double>::max())
|
||||||
, fCpuSum(0.0)
|
, fCpuSum(0.0)
|
||||||
, fCpuMin((numeric_limits<double>::max)())
|
, fCpuMin(numeric_limits<double>::max())
|
||||||
, fTruncatedCpuSum(0.0)
|
, fTruncatedCpuSum(0.0)
|
||||||
, fTruncatedCpuMin((numeric_limits<double>::max)())
|
, fTruncatedCpuMin(numeric_limits<double>::max())
|
||||||
, fGpuSum(0.0)
|
, fGpuSum(0.0)
|
||||||
, fGpuMin((numeric_limits<double>::max)())
|
, fGpuMin(numeric_limits<double>::max())
|
||||||
, fPerIterTimeFormat(perIterTimeFormat)
|
, fPerIterTimeFormat(perIterTimeFormat)
|
||||||
, fNormalTimeFormat(normalTimeFormat)
|
, fNormalTimeFormat(normalTimeFormat)
|
||||||
{}
|
{}
|
||||||
|
|
|
@ -140,13 +140,23 @@
|
||||||
#define WIN32_LEAN_AND_MEAN
|
#define WIN32_LEAN_AND_MEAN
|
||||||
#define WIN32_IS_MEAN_WAS_LOCALLY_DEFINED
|
#define WIN32_IS_MEAN_WAS_LOCALLY_DEFINED
|
||||||
#endif
|
#endif
|
||||||
|
#ifndef NOMINMAX
|
||||||
|
#define NOMINMAX
|
||||||
|
#define NOMINMAX_WAS_LOCALLY_DEFINED
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
|
||||||
#ifdef WIN32_IS_MEAN_WAS_LOCALLY_DEFINED
|
#ifdef WIN32_IS_MEAN_WAS_LOCALLY_DEFINED
|
||||||
|
#undef WIN32_IS_MEAN_WAS_LOCALLY_DEFINED
|
||||||
#undef WIN32_LEAN_AND_MEAN
|
#undef WIN32_LEAN_AND_MEAN
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef NOMINMAX_WAS_LOCALLY_DEFINED
|
||||||
|
#undef NOMINMAX_WAS_LOCALLY_DEFINED
|
||||||
|
#undef NOMINMAX
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef SK_DEBUGBREAK
|
#ifndef SK_DEBUGBREAK
|
||||||
#define SK_DEBUGBREAK(cond) do { if (!(cond)) { SkNO_RETURN_HINT(); __debugbreak(); }} while (false)
|
#define SK_DEBUGBREAK(cond) do { if (!(cond)) { SkNO_RETURN_HINT(); __debugbreak(); }} while (false)
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -312,7 +312,7 @@ HGLRC SkCreateWGLContext(HDC dc, int msaaSampleCount, bool preferCoreProfile) {
|
||||||
unsigned int num;
|
unsigned int num;
|
||||||
int formats[64];
|
int formats[64];
|
||||||
extensions.choosePixelFormat(dc, msaaIAttrs, fAttrs, 64, formats, &num);
|
extensions.choosePixelFormat(dc, msaaIAttrs, fAttrs, 64, formats, &num);
|
||||||
num = min(num,64);
|
num = SkTMin(num, 64U);
|
||||||
int formatToTry = extensions.selectFormat(formats,
|
int formatToTry = extensions.selectFormat(formats,
|
||||||
num,
|
num,
|
||||||
dc,
|
dc,
|
||||||
|
|
Загрузка…
Ссылка в новой задаче