| 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, false); | 334 fHGLRC = SkCreateWGLContext(dc, msaaSampleCount, |
| 335 kGLPreferCompatibilityProfile_SkWGLContextRequest); |
| 335 if (NULL == fHGLRC) { | 336 if (NULL == fHGLRC) { |
| 336 return false; | 337 return false; |
| 337 } | 338 } |
| 338 glClearStencil(0); | 339 glClearStencil(0); |
| 339 glClearColor(0, 0, 0, 0); | 340 glClearColor(0, 0, 0, 0); |
| 340 glStencilMask(0xffffffff); | 341 glStencilMask(0xffffffff); |
| 341 glClear(GL_STENCIL_BUFFER_BIT | GL_COLOR_BUFFER_BIT); | 342 glClear(GL_STENCIL_BUFFER_BIT | GL_COLOR_BUFFER_BIT); |
| 342 } | 343 } |
| 343 if (wglMakeCurrent(dc, (HGLRC)fHGLRC)) { | 344 if (wglMakeCurrent(dc, (HGLRC)fHGLRC)) { |
| 344 // use DescribePixelFormat to get the stencil bit depth. | 345 // use DescribePixelFormat to get the stencil bit depth. |
| (...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 609 break; | 610 break; |
| 610 #endif // SK_ANGLE | 611 #endif // SK_ANGLE |
| 611 #endif // SK_SUPPORT_GPU | 612 #endif // SK_SUPPORT_GPU |
| 612 default: | 613 default: |
| 613 SkASSERT(false); | 614 SkASSERT(false); |
| 614 break; | 615 break; |
| 615 } | 616 } |
| 616 } | 617 } |
| 617 | 618 |
| 618 #endif | 619 #endif |
| OLD | NEW |