OLD | NEW |
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 #include "SkTypes.h" | 8 #include "SkTypes.h" |
9 | 9 |
10 #if defined(SK_BUILD_FOR_WIN) | 10 #if defined(SK_BUILD_FOR_WIN) |
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
444 EGLint msaaConfigAttribList[kConfigAttribListCnt + 4]; | 444 EGLint msaaConfigAttribList[kConfigAttribListCnt + 4]; |
445 memcpy(msaaConfigAttribList, | 445 memcpy(msaaConfigAttribList, |
446 configAttribList, | 446 configAttribList, |
447 sizeof(configAttribList)); | 447 sizeof(configAttribList)); |
448 SkASSERT(EGL_NONE == msaaConfigAttribList[kConfigAttribListCnt - 1]); | 448 SkASSERT(EGL_NONE == msaaConfigAttribList[kConfigAttribListCnt - 1]); |
449 msaaConfigAttribList[kConfigAttribListCnt - 1] = EGL_SAMPLE_BUFFERS; | 449 msaaConfigAttribList[kConfigAttribListCnt - 1] = EGL_SAMPLE_BUFFERS; |
450 msaaConfigAttribList[kConfigAttribListCnt + 0] = 1; | 450 msaaConfigAttribList[kConfigAttribListCnt + 0] = 1; |
451 msaaConfigAttribList[kConfigAttribListCnt + 1] = EGL_SAMPLES; | 451 msaaConfigAttribList[kConfigAttribListCnt + 1] = EGL_SAMPLES; |
452 msaaConfigAttribList[kConfigAttribListCnt + 2] = msaaSampleCount; | 452 msaaConfigAttribList[kConfigAttribListCnt + 2] = msaaSampleCount; |
453 msaaConfigAttribList[kConfigAttribListCnt + 3] = EGL_NONE; | 453 msaaConfigAttribList[kConfigAttribListCnt + 3] = EGL_NONE; |
454 if (eglChooseConfig(display, configAttribList, eglConfig, 1, &numConfigs
)) { | 454 if (eglChooseConfig(display, msaaConfigAttribList, eglConfig, 1, &numCon
figs)) { |
455 SkASSERT(numConfigs > 0); | 455 SkASSERT(numConfigs > 0); |
456 foundConfig = true; | 456 foundConfig = true; |
457 } | 457 } |
458 } | 458 } |
459 if (!foundConfig) { | 459 if (!foundConfig) { |
460 if (!eglChooseConfig(display, configAttribList, eglConfig, 1, &numConfig
s)) { | 460 if (!eglChooseConfig(display, configAttribList, eglConfig, 1, &numConfig
s)) { |
461 return false; | 461 return false; |
462 } | 462 } |
463 } | 463 } |
464 | 464 |
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
768 } | 768 } |
769 | 769 |
770 void SkOSWindow::closeWindow() { | 770 void SkOSWindow::closeWindow() { |
771 DestroyWindow((HWND)fHWND); | 771 DestroyWindow((HWND)fHWND); |
772 if (fFullscreen) { | 772 if (fFullscreen) { |
773 DestroyWindow((HWND)fSavedWindowState.fHWND); | 773 DestroyWindow((HWND)fSavedWindowState.fHWND); |
774 } | 774 } |
775 gHwndToOSWindowMap.remove(fHWND); | 775 gHwndToOSWindowMap.remove(fHWND); |
776 } | 776 } |
777 #endif | 777 #endif |
OLD | NEW |