| 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 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 324 gTimer = SetTimer(NULL, 0, delay, sk_timer_proc); | 324 gTimer = SetTimer(NULL, 0, delay, sk_timer_proc); |
| 325 //SkDebugf("SetTimer of %d returned %d\n", delay, gTimer); | 325 //SkDebugf("SetTimer of %d returned %d\n", delay, gTimer); |
| 326 } | 326 } |
| 327 } | 327 } |
| 328 | 328 |
| 329 #if SK_SUPPORT_GPU | 329 #if SK_SUPPORT_GPU |
| 330 | 330 |
| 331 bool SkOSWindow::attachGL(int msaaSampleCount, AttachmentInfo* info) { | 331 bool SkOSWindow::attachGL(int msaaSampleCount, AttachmentInfo* info) { |
| 332 HDC dc = GetDC((HWND)fHWND); | 332 HDC dc = GetDC((HWND)fHWND); |
| 333 if (NULL == fHGLRC) { | 333 if (NULL == fHGLRC) { |
| 334 fHGLRC = SkCreateWGLContext(dc, msaaSampleCount, | 334 fHGLRC = SkCreateWGLContext(dc, msaaSampleCount, false); |
| 335 kGLPreferCompatibilityProfile_SkWGLContextRequest); | |
| 336 if (NULL == fHGLRC) { | 335 if (NULL == fHGLRC) { |
| 337 return false; | 336 return false; |
| 338 } | 337 } |
| 339 glClearStencil(0); | 338 glClearStencil(0); |
| 340 glClearColor(0, 0, 0, 0); | 339 glClearColor(0, 0, 0, 0); |
| 341 glStencilMask(0xffffffff); | 340 glStencilMask(0xffffffff); |
| 342 glClear(GL_STENCIL_BUFFER_BIT | GL_COLOR_BUFFER_BIT); | 341 glClear(GL_STENCIL_BUFFER_BIT | GL_COLOR_BUFFER_BIT); |
| 343 } | 342 } |
| 344 if (wglMakeCurrent(dc, (HGLRC)fHGLRC)) { | 343 if (wglMakeCurrent(dc, (HGLRC)fHGLRC)) { |
| 345 // use DescribePixelFormat to get the stencil bit depth. | 344 // use DescribePixelFormat to get the stencil bit depth. |
| (...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 610 break; | 609 break; |
| 611 #endif // SK_ANGLE | 610 #endif // SK_ANGLE |
| 612 #endif // SK_SUPPORT_GPU | 611 #endif // SK_SUPPORT_GPU |
| 613 default: | 612 default: |
| 614 SkASSERT(false); | 613 SkASSERT(false); |
| 615 break; | 614 break; |
| 616 } | 615 } |
| 617 } | 616 } |
| 618 | 617 |
| 619 #endif | 618 #endif |
| OLD | NEW |