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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 fSurface = EGL_NO_SURFACE; | 53 fSurface = EGL_NO_SURFACE; |
54 #endif | 54 #endif |
55 fHGLRC = NULL; | 55 fHGLRC = NULL; |
56 #endif | 56 #endif |
57 fAttached = kNone_BackEndType; | 57 fAttached = kNone_BackEndType; |
58 gEventTarget = (HWND)hWnd; | 58 gEventTarget = (HWND)hWnd; |
59 } | 59 } |
60 | 60 |
61 SkOSWindow::~SkOSWindow() { | 61 SkOSWindow::~SkOSWindow() { |
62 #if SK_SUPPORT_GPU | 62 #if SK_SUPPORT_GPU |
63 if (NULL != fHGLRC) { | 63 if (fHGLRC) { |
64 wglDeleteContext((HGLRC)fHGLRC); | 64 wglDeleteContext((HGLRC)fHGLRC); |
65 } | 65 } |
66 #if SK_ANGLE | 66 #if SK_ANGLE |
67 if (EGL_NO_CONTEXT != fContext) { | 67 if (EGL_NO_CONTEXT != fContext) { |
68 eglDestroyContext(fDisplay, fContext); | 68 eglDestroyContext(fDisplay, fContext); |
69 fContext = EGL_NO_CONTEXT; | 69 fContext = EGL_NO_CONTEXT; |
70 } | 70 } |
71 | 71 |
72 if (EGL_NO_SURFACE != fSurface) { | 72 if (EGL_NO_SURFACE != fSurface) { |
73 eglDestroySurface(fDisplay, fSurface); | 73 eglDestroySurface(fDisplay, fSurface); |
(...skipping 536 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
610 break; | 610 break; |
611 #endif // SK_ANGLE | 611 #endif // SK_ANGLE |
612 #endif // SK_SUPPORT_GPU | 612 #endif // SK_SUPPORT_GPU |
613 default: | 613 default: |
614 SkASSERT(false); | 614 SkASSERT(false); |
615 break; | 615 break; |
616 } | 616 } |
617 } | 617 } |
618 | 618 |
619 #endif | 619 #endif |
OLD | NEW |