Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1030)

Side by Side Diff: src/utils/win/SkWGL_win.cpp

Issue 20990007: set nominmax on windows (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « include/core/SkPostConfig.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 #include "SkWGL.h" 9 #include "SkWGL.h"
10 10
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 msaaIAttrs[kIAttrsCount + 3] = 1; 305 msaaIAttrs[kIAttrsCount + 3] = 1;
306 msaaIAttrs[kIAttrsCount + 4] = 0; 306 msaaIAttrs[kIAttrsCount + 4] = 0;
307 msaaIAttrs[kIAttrsCount + 5] = 0; 307 msaaIAttrs[kIAttrsCount + 5] = 0;
308 } else { 308 } else {
309 msaaIAttrs[kIAttrsCount + 2] = 0; 309 msaaIAttrs[kIAttrsCount + 2] = 0;
310 msaaIAttrs[kIAttrsCount + 3] = 0; 310 msaaIAttrs[kIAttrsCount + 3] = 0;
311 } 311 }
312 unsigned int num; 312 unsigned int num;
313 int formats[64]; 313 int formats[64];
314 extensions.choosePixelFormat(dc, msaaIAttrs, fAttrs, 64, formats, &num); 314 extensions.choosePixelFormat(dc, msaaIAttrs, fAttrs, 64, formats, &num);
315 num = min(num,64); 315 num = SkTMin(num, 64U);
316 int formatToTry = extensions.selectFormat(formats, 316 int formatToTry = extensions.selectFormat(formats,
317 num, 317 num,
318 dc, 318 dc,
319 msaaSampleCount); 319 msaaSampleCount);
320 DescribePixelFormat(dc, formatToTry, sizeof(pfd), &pfd); 320 DescribePixelFormat(dc, formatToTry, sizeof(pfd), &pfd);
321 if (SetPixelFormat(dc, formatToTry, &pfd)) { 321 if (SetPixelFormat(dc, formatToTry, &pfd)) {
322 format = formatToTry; 322 format = formatToTry;
323 } 323 }
324 } 324 }
325 325
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 } 359 }
360 360
361 if (NULL == glrc) { 361 if (NULL == glrc) {
362 glrc = wglCreateContext(dc); 362 glrc = wglCreateContext(dc);
363 } 363 }
364 SkASSERT(glrc); 364 SkASSERT(glrc);
365 365
366 wglMakeCurrent(prevDC, prevGLRC); 366 wglMakeCurrent(prevDC, prevGLRC);
367 return glrc; 367 return glrc;
368 } 368 }
OLDNEW
« no previous file with comments | « include/core/SkPostConfig.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698